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, MediaType } from '../types/agents.js';
|
||||
import { z } from 'zod';
|
||||
import { zodTextFormat } from 'openai/helpers/zod';
|
||||
@@ -28,9 +28,9 @@ export async function runInterpreter(input: InterpreterInput): Promise<Interpret
|
||||
: '';
|
||||
|
||||
const response = await openai.responses.parse({
|
||||
model: 'gpt-5.4',
|
||||
model: defaultModel,
|
||||
temperature: 0.2,
|
||||
service_tier: 'flex',
|
||||
...serviceOptions,
|
||||
text: { format: zodTextFormat(InterpreterSchema, "preferences") },
|
||||
instructions: `You are a ${mediaLabel} preference interpreter. Transform raw user input into structured, normalized preferences.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user