changes and improvements
This commit is contained in:
@@ -9,7 +9,8 @@ const InterpreterSchema = z.object({
|
||||
themes: z.array(z.string()),
|
||||
character_preferences: z.array(z.string()),
|
||||
tone: z.array(z.string()),
|
||||
avoid: z.array(z.string())
|
||||
avoid: z.array(z.string()),
|
||||
requirements: z.array(z.string())
|
||||
});
|
||||
|
||||
interface InterpreterInput {
|
||||
@@ -39,7 +40,8 @@ Rules:
|
||||
- Normalize terminology (e.g. "spy" → "espionage", "cop show" → "police procedural")
|
||||
- Detect and resolve contradictions (prefer explicit over implicit)
|
||||
- Do NOT assume anything not stated or clearly implied
|
||||
- Be specific and concrete, not vague`,
|
||||
- Be specific and concrete, not vague
|
||||
- For "requirements": capture explicit hard requirements the user stated that recommendations must satisfy — things like "must be from the 2000s onward", "must have subtitles", "must feature a female lead". Leave empty if no such constraints were stated.`,
|
||||
input: `Main prompt: ${input.main_prompt}
|
||||
Liked ${mediaLabel}s: ${input.liked_shows || '(none)'}
|
||||
Disliked ${mediaLabel}s: ${input.disliked_shows || '(none)'}
|
||||
@@ -47,6 +49,6 @@ Themes and requirements: ${input.themes || '(none)'}${feedbackSection}`,
|
||||
});
|
||||
|
||||
return (response.output_parsed as InterpreterOutput) ?? {
|
||||
liked: [], disliked: [], themes: [], character_preferences: [], tone: [], avoid: []
|
||||
liked: [], disliked: [], themes: [], character_preferences: [], tone: [], avoid: [], requirements: []
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user