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

Add async call for LlamaCpp #9177

Closed
wants to merge 11 commits into from
Closed

Conversation

ninely
Copy link
Contributor

@ninely ninely commented Aug 13, 2023

Add async call and async stream for LlamaCpp.
This allows it to use async callback handler to return a stream response.
@hwchase17, @rlancemartin

@vercel
Copy link

vercel bot commented Aug 13, 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 Oct 20, 2023 10:21am

@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 13, 2023
@faridelya
Copy link

Thanks alot @ninely.

libs/langchain/langchain/llms/llamacpp.py Outdated Show resolved Hide resolved
libs/langchain/langchain/llms/llamacpp.py Outdated Show resolved Hide resolved
@ninely
Copy link
Contributor Author

ninely commented Sep 22, 2023

@nfcampos Thank you for your feedback. It's greatly appreciated. I've made some adjustments based on your suggestions.

@wdoppenberg
Copy link

Is there a reason this hasn't been merged yet? Any help needed?

@hamaadtahiir
Copy link

why is it not merged yet?

@prometx11
Copy link

I am also looking forward for a merge, need this feature!
Are there any outstanding changes?

@akionux
Copy link
Contributor

akionux commented Dec 13, 2023

@ninely Thanks for your work. To work with langserve (#12441), I additionally added chunk=chunk, but llamacpp.py has been moved to langchain_community, so I applied your changes to new llamacpp.py in my branch.

@hwchase17 hwchase17 closed this Jan 30, 2024
@baskaryan baskaryan reopened this Jan 30, 2024
@baskaryan
Copy link
Collaborator

Apologies for the slow review! Pr has some merge conflicts, happy to re-review if you'd like to resolve

@nfcampos
Copy link
Collaborator

Thanks, this delegation to the sync stream method is now done by the base class BaseChatModel so this functionality already exists, closing.

@nfcampos nfcampos closed this Jun 18, 2024
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.

None yet

9 participants