feature: new changes!
All checks were successful
Recommender Build and Deploy (internal) / Build Recommender Image (push) Successful in 3m59s
Recommender Build and Deploy (internal) / Deploy Recommender (internal) (push) Successful in 10s

This commit is contained in:
2026-03-25 20:09:32 -03:00
parent 26f61077b8
commit f9f3d95406
25 changed files with 964 additions and 696 deletions

View File

@@ -1,7 +1,7 @@
import { openai } from '../agent.js';
import type { InterpreterOutput, RetrievalOutput } from '../types/agents.js';
export async function runRetrieval(input: InterpreterOutput): Promise<RetrievalOutput> {
export async function runRetrieval(input: InterpreterOutput, brainstormCount = 100): Promise<RetrievalOutput> {
const response = await openai.chat.completions.create({
model: 'gpt-5.4',
temperature: 0.9,
@@ -10,7 +10,7 @@ export async function runRetrieval(input: InterpreterOutput): Promise<RetrievalO
messages: [
{
role: 'system',
content: `You are a TV show candidate generator. Your goal is to brainstorm a LARGE, DIVERSE pool of 6080 TV show candidates that match the user's structured preferences.
content: `You are a TV show candidate generator. Your goal is to brainstorm a LARGE, DIVERSE pool of ${brainstormCount} TV show candidates that match the user's structured preferences.
Your output MUST be valid JSON matching this schema:
{
@@ -25,7 +25,7 @@ Rules:
- Each "reason" should briefly explain why the show matches the preferences
- Avoid duplicates
- Include shows from different decades, countries, and networks
- Aim for 6080 candidates minimum`,
- Aim for ${brainstormCount} candidates minimum`,
},
{
role: 'user',