Improve AI description generation for video content and fix errors
Update the AI description generation process to correctly handle and display AI-generated descriptions in the admin interface, including error handling and success notifications. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/LY6xmBI
This commit is contained in:
+5
-2
@@ -1103,12 +1103,15 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
includeLabelInfo
|
||||
});
|
||||
|
||||
res.json({
|
||||
const result = {
|
||||
description,
|
||||
title: video.title,
|
||||
characterCount: description.length,
|
||||
maxCharacters
|
||||
});
|
||||
};
|
||||
|
||||
console.log("Sending AI response:", result); // Debug log
|
||||
res.json(result);
|
||||
|
||||
} catch (error) {
|
||||
console.error("Error generating AI description:", error);
|
||||
|
||||
Reference in New Issue
Block a user