Merge pull request #2975 from akvadrako/together-ai-new-image-api

Support the non-deprecated Together.ai Create Image API
This commit is contained in:
Cohee
2024-10-11 20:29:31 +03:00
committed by GitHub
2 changed files with 10 additions and 11 deletions

View File

@ -2674,8 +2674,7 @@ async function generateTogetherAIImage(prompt, negativePrompt, signal) {
});
if (result.ok) {
const data = await result.json();
return { format: 'jpg', data: data?.output?.choices?.[0]?.image_base64 };
return await result.json();
} else {
const text = await result.text();
throw new Error(text);