fix: update schema handling and config for multi-provider support

Co-Authored-By: Han Xiao <han.xiao@jina.ai>
This commit is contained in:
Devin AI
2025-02-05 12:37:21 +00:00
parent 31fa48d7f3
commit 42075322c5
2 changed files with 3 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ export const aiConfig: AIConfig = {
providers: {
gemini: {
type: 'gemini',
model: 'gemini-pro',
model: 'gemini-1.5-pro',
temperature: 0
},
openai: {

View File

@@ -110,14 +110,8 @@ export function getProviderSchema(provider: ProviderType, schema: z.ZodSchema):
case 'gemini':
return convertToGeminiSchema(schema);
case 'openai':
case 'ollama': {
const functionSchema = convertToOpenAIFunctionSchema(schema);
return {
type: 'object',
properties: functionSchema.properties,
required: functionSchema.required
};
}
case 'ollama':
return convertToOpenAIFunctionSchema(schema);
default:
throw new Error(`Unsupported provider: ${provider}`);
}