support new together.ai image generation api

This commit is contained in:
Devin Bayer
2024-10-11 17:48:33 +02:00
parent dcd3f13e62
commit ed8e379e54
2 changed files with 10 additions and 11 deletions

View File

@ -2675,8 +2675,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);