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:
sebastjanartic
2025-09-02 13:09:04 +00:00
parent e948249a96
commit 7b2008baff
3 changed files with 24 additions and 6 deletions
+5 -2
View File
@@ -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);