Skip to content
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

Merged
merged 19 commits into from
May 19, 2023

Conversation

jacoblee93
Copy link
Collaborator

Fixes typing and prompt for #1095

@vercel
Copy link

vercel bot commented May 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 18, 2023 5:45pm

` 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));
Copy link
Collaborator

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?

Copy link
Collaborator

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;
Copy link
Collaborator

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator

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

@jacoblee93 jacoblee93 marked this pull request as ready for review May 13, 2023 00:45
@jacoblee93 jacoblee93 changed the title Structured tool input agent fixes for #1095 Adds structured tool chat agent May 13, 2023
@jacoblee93 jacoblee93 changed the title Adds structured tool chat agent Adds structured tool chat agent and StructuredDynamicTool class May 13, 2023
@jacoblee93 jacoblee93 changed the title Adds structured tool chat agent and StructuredDynamicTool class Adds structured tool chat agent and DynamicStructuredTool class May 18, 2023
@nfcampos nfcampos merged commit c8d4e6b into langchain-ai:main May 19, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants