-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use Output Parsers for agents #802
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,10 +1,10 @@ | |||
import { BaseLanguageModel } from "../base_language/index.js"; |
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.
Is this import reordering something we can add to CI / pre-commit hook?
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.
You can find an implementation of this that we could add as a pre-commit hook here. Do you want me to follow up with that in another PR?
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.
Yea would be nice, but not a massive priority
* create ChatAgentV2 and add example * fix intermediate_steps * remove unnecessary code * unnecessary logs * remove chatv2, refactor other agents * add output parsers to agents * correct imports * add callbackManager to fromLLMAndTools * Update langchain/src/util/type-utils.ts * fix circular dep * requested changes --------- Co-authored-by: Nuno Campos <nuno@boringbits.io>
jsonOutput = jsonOutput.slice(0, -3).trimEnd(); | ||
} | ||
|
||
const response = JSON.parse(jsonOutput); |
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.
Parser error handling (see i.e. langchain/src/agents/chat/outputParser.ts) is missing now.
refactors agents to use output parsers