adding support for generic AI provider (OpenAI compatible)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { openai } from '../agent.js';
|
||||
import { openai, defaultModel, serviceOptions } from '../agent.js';
|
||||
import type { InterpreterOutput, RetrievalOutput, RankingOutput, MediaType } from '../types/agents.js';
|
||||
import { z } from 'zod';
|
||||
import { zodTextFormat } from 'openai/helpers/zod';
|
||||
@@ -42,9 +42,9 @@ export async function runRanking(
|
||||
const chunkTitles = chunk.map((c) => `- ${c.title}: ${c.reason}`).join('\n');
|
||||
|
||||
const response = await openai.responses.parse({
|
||||
model: 'gpt-5.4',
|
||||
model: defaultModel,
|
||||
temperature: 0.2,
|
||||
service_tier: 'flex',
|
||||
...serviceOptions,
|
||||
text: { format: zodTextFormat(RankingSchema, "ranking") },
|
||||
instructions: `You are a ${mediaLabel} ranking critic. Assign each ${mediaLabel} to exactly one of four confidence buckets based on how well it matches the user's preferences.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user