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

fix(langchain): add support for LLMs without support for async callback handlers #166

Merged
merged 3 commits into from
Dec 9, 2023

Conversation

ajndkr
Copy link
Owner

@ajndkr ajndkr commented Dec 9, 2023

Description

Fixes #164.

This PR adds new functionality to langchain adapter's streaming response: run mode.

Setting the run mode to "async" or "sync" defines how the langchain object is executed (via .acall or __call__ respectively)

Changelog:

  • ✨ added run_mode attribute to StreamingResponse
  • 📝 updated docs to create custom callback handlers

@ajndkr ajndkr self-assigned this Dec 9, 2023
@ajndkr ajndkr added fix Pull requests for bug fixes langchain labels Dec 9, 2023
@ajndkr ajndkr merged commit 0874752 into main Dec 9, 2023
2 checks passed
@ajndkr ajndkr deleted the fix/sync-callbacks branch December 9, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests for bug fixes langchain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: callback handlers for langchain adapter doesn't work for LLMs without async support
1 participant