Fix title/caption AI text generation when uploading multiple photos
This commit is contained in:
parent
6786f1aad6
commit
cb14f3c8f9
@ -28,10 +28,11 @@ export const generateAiImageQueries = async (
|
||||
textFieldsToGenerate.includes('title') &&
|
||||
textFieldsToGenerate.includes('caption')
|
||||
) {
|
||||
const titleAndCaption = await generateOpenAiImageQuery(
|
||||
imageBase64,
|
||||
AI_IMAGE_QUERIES['title-and-caption'],
|
||||
);
|
||||
const titleAndCaption = cleanUpAiTextResponse(
|
||||
await generateOpenAiImageQuery(
|
||||
imageBase64,
|
||||
AI_IMAGE_QUERIES['title-and-caption'],
|
||||
));
|
||||
if (titleAndCaption) {
|
||||
const titleAndCaptionParsed = parseTitleAndCaption(titleAndCaption);
|
||||
title = titleAndCaptionParsed.title;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user