changes and improvements
All checks were successful
Recommender Build and Deploy (internal) / Build Recommender Image (push) Successful in 5m40s
Recommender Build and Deploy (internal) / Deploy Recommender (internal) (push) Successful in 38s

This commit is contained in:
2026-04-01 18:31:14 -03:00
parent a73bc27356
commit 39edec4a7c
10 changed files with 114 additions and 31 deletions

View File

@@ -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: []
};
}