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
-1
@@ -28,6 +28,7 @@ export interface DescriptionGenerationOptions {
|
||||
language?: string;
|
||||
includeArtistInfo?: boolean;
|
||||
includeLabelInfo?: boolean;
|
||||
customInstructions?: string;
|
||||
}
|
||||
|
||||
export async function generateVideoDescription(
|
||||
@@ -38,7 +39,8 @@ export async function generateVideoDescription(
|
||||
maxCharacters = 500,
|
||||
language = "slovenian",
|
||||
includeArtistInfo = true,
|
||||
includeLabelInfo = true
|
||||
includeLabelInfo = true,
|
||||
customInstructions = ""
|
||||
} = options;
|
||||
|
||||
try {
|
||||
@@ -73,6 +75,7 @@ Wenn du keine sicheren Informationen zu einem Punkt hast, lasse ihn WEG. Schreib
|
||||
Die Beschreibung soll maximal ${maxCharacters} Zeichen lang sein.
|
||||
Schreibe in einem freundlichen, informativen Ton.
|
||||
Verwende nicht die Wörter "Video" oder "Aufnahme" - schreibe über die Musik selbst.
|
||||
${customInstructions ? `\nZUSÄTZLICHE ANWEISUNGEN: ${customInstructions}` : ''}
|
||||
Schreibe nur die Beschreibung, keine zusätzlichen Erklärungen.${avoidRepetition}";`
|
||||
|
||||
console.log("Sending request to OpenAI with title:", title); // Debug log
|
||||
|
||||
Reference in New Issue
Block a user