Enhance AI description generation with custom instructions for users
Add a custom instructions input field to the admin video edit dialog and backend to allow users to guide the AI description generation process. 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:
+4
-3
@@ -1087,7 +1087,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
app.post('/api/admin/videos/:id/generate-description', isAdmin, async (req, res) => {
|
||||
try {
|
||||
const videoId = req.params.id;
|
||||
const { maxCharacters = 500, includeArtistInfo = true, includeLabelInfo = true } = req.body;
|
||||
const { maxCharacters = 500, includeArtistInfo = true, includeLabelInfo = true, customInstructions } = req.body;
|
||||
|
||||
console.log("AI description request for video:", videoId); // Debug log
|
||||
|
||||
@@ -1103,9 +1103,10 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
// Generate description using AI
|
||||
const description = await generateVideoDescription(video.title, {
|
||||
maxCharacters,
|
||||
language: "slovenian",
|
||||
language: "german",
|
||||
includeArtistInfo,
|
||||
includeLabelInfo
|
||||
includeLabelInfo,
|
||||
customInstructions
|
||||
});
|
||||
|
||||
console.log("Generated description:", description); // Debug log
|
||||
|
||||
Reference in New Issue
Block a user