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

Update BaseChatModel.astream to respect generation_info #9430

Merged
merged 3 commits into from
Aug 22, 2023
Merged

Update BaseChatModel.astream to respect generation_info #9430

merged 3 commits into from
Aug 22, 2023

Conversation

caffeinism
Copy link
Contributor

Currently, generation_info is not respected by only reflecting messages in chunks. Change it to add generations so that generation chunks are merged properly.

@vercel
Copy link

vercel bot commented Aug 18, 2023

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2023 7:23am

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:improvement Medium size change to existing code to handle new use-cases labels Aug 18, 2023
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this seems reasonable to me - do we want to do the same for normal stream?

i will switch that and then add a test

@caffeinism
Copy link
Contributor Author

I missed that part. lgtm.

@baskaryan baskaryan merged commit ca8232a into langchain-ai:master Aug 22, 2023
22 checks passed
rlancemartin pushed a commit that referenced this pull request Aug 22, 2023
Currently, generation_info is not respected by only reflecting messages
in chunks. Change it to add generations so that generation chunks are
merged properly.

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
@caffeinism caffeinism deleted the caffeinism-patch-1 branch August 23, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases Ɑ: models Related to LLMs or chat model modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants