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

Deprecate panel.langchain.PanelCallbackHandler proposal #7470

Open
ahuang11 opened this issue Nov 7, 2024 · 1 comment
Open

Deprecate panel.langchain.PanelCallbackHandler proposal #7470

ahuang11 opened this issue Nov 7, 2024 · 1 comment
Labels
deprecation A proposal to deprecate a feature

Comments

@ahuang11
Copy link
Contributor

ahuang11 commented Nov 7, 2024

https://panel.holoviz.org/reference/chat/PanelCallbackHandler.html

Feature Overview
The panel.langchain.PanelCallbackHandler was introduced to address challenges in streaming LangChain outputs and showing tool usage--for reference, see the original discussion in HoloViz Discourse.

Deprecation Proposal
I propose deprecating this feature in Panel and migrating it to the langchain-community repository. This aligns with how similar callback handlers, such as the StreamlitCallbackHandler, are managed. By moving this to the LangChain ecosystem, the feature becomes more discoverable to LangChain users and fosters community-driven development.

Impact Assessment
The feature does not appear to have widespread adoption, but there were notably a:
Feature request
Bug report

The suggested alternative is to use LangChain’s LCEL with a custom callback in ChatFeed or Interface.

Effort Involved
Most of the necessary work has already been done, notably in the LangChain PR #27039, which simplifies the migration process.

The primary remaining tasks include:

  • Having the PR reviewed and approved in the LangChain community side (please give it an upvote)
  • Updating the Panel documentation to reflect the deprecation and point to langchain-community
  • Adding a deprecation warning in the Panel code.
@philippjfr
Copy link
Member

Based on a GitHub search it's currently used by three projects:

That doesn't seem like a big impact even if we remove it entirely because LangChain won't accept it. We could then simply inline it in a chat example and other users can vendor the code themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A proposal to deprecate a feature
Projects
Status: Todo
Development

No branches or pull requests

2 participants