From b0cac52436607fcda8001822538a099588438e8a Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Sat, 7 Dec 2024 20:32:54 +0100 Subject: [PATCH] up --- packages/framework/src/executor.ts | 1 + packages/framework/src/tool.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/executor.ts b/packages/framework/src/executor.ts index 9fbaef5..4c70025 100644 --- a/packages/framework/src/executor.ts +++ b/packages/framework/src/executor.ts @@ -75,6 +75,7 @@ export async function executeTaskWithAgent( const content = await tool.execute(toolCall.function.parsed_arguments, { provider: agent.provider, + messages, }) return { role: 'tool' as const, diff --git a/packages/framework/src/tool.ts b/packages/framework/src/tool.ts index 0a61aa2..2afd5e7 100644 --- a/packages/framework/src/tool.ts +++ b/packages/framework/src/tool.ts @@ -1,11 +1,15 @@ import z, { ZodTypeAny } from 'zod' import { Provider } from './models/openai.js' +import { Message } from './types.js' export type Tool

= { description: string parameters: P - execute: (parameters: z.infer

, context: { provider: Provider }) => Promise + execute: ( + parameters: z.infer

, + context: { provider: Provider; messages: Message[] } + ) => Promise } /**