diff --git a/src/photo/ai/index.ts b/src/photo/ai/index.ts index b6fa7d07..a2ea7b8e 100644 --- a/src/photo/ai/index.ts +++ b/src/photo/ai/index.ts @@ -1,12 +1,20 @@ import { streamOpenAiImageQuery } from '@/services/openai'; -export type ImageQuery = 'title' | 'caption' | 'tags' | 'description'; +export type ImageQuery = + 'title' | + 'caption' | + 'tags' | + 'descriptionSmall' | + 'descriptionMedium' | + 'descriptionLarge'; export const IMAGE_QUERIES: Record = { title: 'Provide a short title for this image', caption: 'What is the caption of this image?', tags: 'Describe this image three or less comma-separated keywords', - description: 'Describe this image in detail', + descriptionSmall: 'Describe this image succinctly', + descriptionMedium: 'Describe this image', + descriptionLarge: 'Describe this image in detail', }; export const streamImageQuery = (imageBase64: string, query: ImageQuery) => diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index 6b5b9ba5..5faac6b7 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -131,10 +131,16 @@ export default function PhotoForm({ ] = useImageQuery(imageData, 'tags'); const [ - requestDescription, - description, - isLoadingDescription, - ] = useImageQuery(imageData, 'description'); + requestDescriptionSmall, + descriptionSmall, + isLoadingDescriptionSmall, + ] = useImageQuery(imageData, 'descriptionSmall'); + + const [ + requestDescriptionLarge, + descriptionLarge, + isLoadingDescriptionLarge, + ] = useImageQuery(imageData, 'descriptionLarge'); return (
@@ -145,8 +151,17 @@ export default function PhotoForm({ - +
@@ -195,7 +210,14 @@ export default function PhotoForm({ }

- ✨ DESCRIPTION: {description} {isLoadingDescription && <> + ✨ DESCRIPTION (S): {descriptionSmall} {isLoadingDescriptionSmall && <> + + + + } +

+

+ ✨ DESCRIPTION (L): {descriptionLarge} {isLoadingDescriptionLarge && <>