console log image generation time
This commit is contained in:
@@ -225,6 +225,8 @@ Only return the JSON, no other text.`;
|
||||
|
||||
let response;
|
||||
try {
|
||||
console.log("Starting image generation...");
|
||||
const startTime = Date.now();
|
||||
response = await client.images.generate({
|
||||
model: IMAGE_MODEL,
|
||||
prompt: fullPrompt,
|
||||
@@ -234,6 +236,10 @@ Only return the JSON, no other text.`;
|
||||
reference_images:
|
||||
referenceImages.length > 0 ? referenceImages : undefined,
|
||||
});
|
||||
const endTime = Date.now();
|
||||
const durationMs = endTime - startTime;
|
||||
const durationSeconds = (durationMs / 1000).toFixed(2);
|
||||
console.log(`Image generation completed in ${durationSeconds} seconds`);
|
||||
} catch (error) {
|
||||
console.error("Together AI API error:", error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user