From 42075322c5041cf078361bacb167a60b4412c965 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 12:37:21 +0000 Subject: [PATCH] fix: update schema handling and config for multi-provider support Co-Authored-By: Han Xiao --- src/config.ts | 2 +- src/utils/schema.ts | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/config.ts b/src/config.ts index 8bdbeba..7ad9da0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -43,7 +43,7 @@ export const aiConfig: AIConfig = { providers: { gemini: { type: 'gemini', - model: 'gemini-pro', + model: 'gemini-1.5-pro', temperature: 0 }, openai: { diff --git a/src/utils/schema.ts b/src/utils/schema.ts index 6a50b35..6b79616 100644 --- a/src/utils/schema.ts +++ b/src/utils/schema.ts @@ -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}`); }