You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using LLMs as tools for a generic task agent that delegates tasks to tools. In order for each LLM tool to have access to the context of the agent execution chain, it would be great if each tool has access to the messages array so far. So let's say I set maxSteps to 5, then the initial call to my streamText method would contain the original messages array send by useChat. It would then determine which tool to use (toolChoice is set to true) and execute that tool - which in my case is another LLM call with it's own prompt:
exportconstmyTool=tool({description: '',execute: async({ description, title })=>{constresult=awaitgenerateText({
description,'',
messages ,// <== this is currently missingmodel: vertex,system: '',});return{text: result.text};},parameters: z.object({ ... })});
But the context of the message history between tools gets lost since the tools don't have access to the messages array, including the results of previous tool executions.
Use Case
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Feature Description
I'm using LLMs as tools for a generic task agent that delegates tasks to tools. In order for each LLM tool to have access to the context of the agent execution chain, it would be great if each tool has access to the messages array so far. So let's say I set
maxSteps
to 5, then the initial call to mystreamText
method would contain the original messages array send byuseChat
. It would then determine which tool to use (toolChoice
is set totrue
) and execute that tool - which in my case is another LLM call with it's own prompt:But the context of the message history between tools gets lost since the tools don't have access to the messages array, including the results of previous tool executions.
Use Case
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: