Skip to content

Commit d1a9be3

Browse files
committed
chore: update dev demo
1 parent 8aa91f9 commit d1a9be3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dev-demo/resources/carsResourseTemplate.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,19 @@ export default function carsResourseTemplate(resourceId: string, dataSource: str
247247
`${dataSource}/car_images/cars_promo_images_generated/${originalFilename}_${Date.now()}.${originalExtension}`,
248248
preview: {
249249
maxShowWidth: "300px",
250+
previewUrl({ filePath }) {
251+
return `https://tmpbucket-adminforth.s3.eu-central-1.amazonaws.com/${filePath}`;
252+
},
250253
},
251254
generation: {
252255
countToGenerate: 2,
253256
adapter: new ImageGenerationAdapterOpenAI({
254257
openAiApiKey: process.env.OPENAI_API_KEY as string,
255258
model: 'gpt-image-1',
256259
}),
260+
attachFiles: async ({ record }) => {
261+
return [`https://tmpbucket-adminforth.s3.eu-central-1.amazonaws.com/${record.promo_picture}`];
262+
},
257263
generationPrompt: "Generate a high-quality promotional image for a car with model {{model}} and color {{color}}. The car is a {{body_type}} type. The image should be vibrant and eye-catching, suitable for advertising purposes.",
258264
outputSize: '1536x1024'
259265
}

0 commit comments

Comments
 (0)