You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, GPTResearcher uses a custom WebSocket handler for logging research progress. While this works for simple use cases, it would be more flexible to support standard callback mechanisms similar to other LangChain tools. This would allow better integration with existing logging systems and more granular control over the research process.
Happy to see the PR
I agree with the 4 points you made under "Implementation Notes".
Some thoughts:
a) Some nice documentation around the types of logs can also be a nice bonus for users
b) Some examples of using GPTR as a Langchain Tool could also be interesting.
We have something on the docs about Langgraph, but we could probably create a new section for Langchain, since GPTR leverages Langchain in a lot of interesting ways
Re: Questions:
Should we deprecate the websocket approach in favor of callbacks?
We can consider that in another PR - there's a good amount of docs around the websocket method
What specific callback events should we standardize?
Description
Currently, GPTResearcher uses a custom WebSocket handler for logging research progress. While this works for simple use cases, it would be more flexible to support standard callback mechanisms similar to other LangChain tools. This would allow better integration with existing logging systems and more granular control over the research process.
Current Implementation
Proposed Enhancement
Add support for LangChain-style callbacks in the GPTResearcher class:
Example usage with custom callback:
Benefits
Implementation Notes
callbacks
parameter to GPTResearcher constructorQuestions
The text was updated successfully, but these errors were encountered: