From ae58c427a53b1cfd2178cc2a87b9fb57b9bc0692 Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 23 Jun 2025 18:16:17 +0700 Subject: [PATCH] fix: tool call params --- web-app/src/lib/completion.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web-app/src/lib/completion.ts b/web-app/src/lib/completion.ts index df6f11897..79cfeaec1 100644 --- a/web-app/src/lib/completion.ts +++ b/web-app/src/lib/completion.ts @@ -8,6 +8,7 @@ import { chatCompletionRequestMessage, chatCompletion, chatCompletionChunk, + Tool, } from '@janhq/core' import { invoke } from '@tauri-apps/api/core' import { fetch as fetchTauri } from '@tauri-apps/plugin-http' @@ -241,7 +242,7 @@ export const stopModel = async ( */ export const normalizeTools = ( tools: MCPTool[] -): ChatCompletionTool[] | undefined => { +): ChatCompletionTool[] | Tool[] | undefined => { if (tools.length === 0) return undefined return tools.map((tool) => ({ type: 'function',