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

core[patch]: Prevent ConsoleCallbackHandler from throwing TypeError when logging #6612

Conversation

benjamincburns
Copy link
Contributor

Prior to this change, when onToolEnd is called, it assumed the value of run.outputs.output is always of type string. In cases when it wasn't a string, this would cause a TypeError to be thrown.

Note that it appeared that the same issue could occur in onToolStart, so I corrected that case as well.

Prior to this change, when `onToolEnd` is called, it assumed the value
of `run.outputs.output` is always of type `string`. In cases when it
wasn't a string, this would cause a `TypeError` to be thrown.

Note that it appeared that the same issue could occur in `onToolStart`,
so I corrected that case as well.
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 23, 2024
Copy link

vercel bot commented Aug 23, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Aug 26, 2024 10:58pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Aug 26, 2024 10:58pm

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Aug 23, 2024
@jacoblee93
Copy link
Collaborator

Ah thank you!

@jacoblee93 jacoblee93 changed the title Prevent ConsoleCallbackHandler from throwing TypeError when logging core[patch]: Prevent ConsoleCallbackHandler from throwing TypeError when logging Aug 26, 2024
@jacoblee93 jacoblee93 merged commit d859378 into langchain-ai:main Aug 26, 2024
38 checks passed
@benjamincburns benjamincburns deleted the fix-typeerror-in-consolecallbackhandler branch August 27, 2024 00:03
CarterMorris pushed a commit to CarterMorris/langchainjs that referenced this pull request Nov 10, 2024
…hen logging (langchain-ai#6612)

Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants