-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds structured tool chat agent and DynamicStructuredTool class #1103
Conversation
…on preventing StructuredTools being passed into existing agents
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
… signatures for initialize
langchain/src/agents/chat/index.ts
Outdated
` This agent requires descriptions for all tools.`; | ||
throw new Error(msg); | ||
} | ||
// eslint-disable-next-line no-instanceof/no-instanceof | ||
const complexTool = tools.find((tool) => !(tool instanceof Tool)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instanceof checks can fail in some setups, is this actually needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the types now, so might not be needed anymore
} | ||
|
||
getFormatInstructions(): string { | ||
return AGENT_ACTION_FORMAT_INSTRUCTIONS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect, it's returning an unformatted template string, without replacing the template vars. Either remove template vars, or format the template
} | ||
|
||
getFormatInstructions(): string { | ||
return FORMAT_INSTRUCTIONS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing a call to renderTemplate @jacoblee93
…micTool to DynamicStructuredTool
Fixes typing and prompt for #1095