refactor: Update Langchain dependencies (no-changelog) (#9252)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-04-29 16:15:42 +02:00
committed by GitHub
parent c6b4c6dbf2
commit f05d96cea0
10 changed files with 162 additions and 162 deletions

View File

@@ -1,5 +1,5 @@
import { zodToJsonSchema } from 'zod-to-json-schema';
import type { OpenAI as OpenAIClient } from 'openai';
import type { OpenAIClient } from '@langchain/openai';
import type { StructuredTool } from '@langchain/core/tools';
// Copied from langchain(`langchain/src/tools/convert_to_openai.ts`)
@@ -33,9 +33,7 @@ export function formatToOpenAITool(tool: StructuredTool): OpenAIClient.Chat.Chat
};
}
export function formatToOpenAIAssistantTool(
tool: StructuredTool,
): OpenAIClient.Beta.AssistantCreateParams.AssistantToolsFunction {
export function formatToOpenAIAssistantTool(tool: StructuredTool): OpenAIClient.Beta.AssistantTool {
return {
type: 'function',
function: {