-
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
feat(community): Introduce callbacks to IBM Watsonx SDK with CallbackHandlers #7317
Conversation
* Fixed missing tool_choice in call options of chat (#30) * Add rerank implementation to existing IBM community implementation (#25) Extend existing implementation - rename variables to camelCase - remove default values for model - Update and remove some tests - update urls in documentation, shrink outputs * Add fixes according to review (#32) * Add fixes according to review * Upload config info * Fix notebooks * Fix notebook * Add to sidebar * Show in docs * Fix doc --------- Co-authored-by: jacoblee93 <[email protected]>
…nx (#31) Provide fixes to bugs that were found during usage of multiple components
* Add callbacks * Update sdk package
…to main-callbacks
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -631,19 +630,25 @@ export class ChatWatsonx< | |||
async *_streamResponseChunks( | |||
messages: BaseMessage[], | |||
options: this["ParsedCallOptions"], | |||
_runManager?: CallbackManagerForLLMRun | |||
_runManager?: WatsonxCallbackManagerForLLMRun |
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.
Don't think you want to type it this way
And in general are you able to just use this instead?
https://js.langchain.com/docs/how_to/callbacks_custom_events
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.
@jacoblee93 How would you recommend to type it? We are extending class in this case. I don't think dispatching custom events help much. We just want to pass the callbacks that we create to our SDK, so nothing but passing the callbacks happens on langchain side. The case is that it would be good to still pass it in callbacks
property
@jacoblee93 We have discussed this case and proceeded with following implementation that will be much simpler. Converted this to draft and created new PR. If you could have a look at it and provide feedback if that is a better case: #7329 |
This PR introduces callbacks that are passed to our Watsonx sdk