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('title') &&
|
||||||
textFieldsToGenerate.includes('caption')
|
textFieldsToGenerate.includes('caption')
|
||||||
) {
|
) {
|
||||||
const titleAndCaption = await generateOpenAiImageQuery(
|
const titleAndCaption = cleanUpAiTextResponse(
|
||||||
imageBase64,
|
await generateOpenAiImageQuery(
|
||||||
AI_IMAGE_QUERIES['title-and-caption'],
|
imageBase64,
|
||||||
);
|
AI_IMAGE_QUERIES['title-and-caption'],
|
||||||
|
));
|
||||||
if (titleAndCaption) {
|
if (titleAndCaption) {
|
||||||
const titleAndCaptionParsed = parseTitleAndCaption(titleAndCaption);
|
const titleAndCaptionParsed = parseTitleAndCaption(titleAndCaption);
|
||||||
title = titleAndCaptionParsed.title;
|
title = titleAndCaptionParsed.title;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user