Skip to content

Allow async pipe #468

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

dominikpeter
Copy link

fixes #411
fixes #359

@gdbb
Copy link

gdbb commented Mar 18, 2025

Awesome! I reviewd some pipeline demo for old version openwebui, and there are async pipe and many parameters like event_emitter. I'm curious why all of these are removed.

@dominikpeter
Copy link
Author

Aren't these Pipe functions?

Like this example I found:
Example

But yes, having event_emitter in the pipelines would also be great. We use it for RAG and being able to give feedback to the user would be great. We might have to create another issue for that.

The async pipe here should not break the existing code, as it just adds the option to use async, which should work as before for sync. But the repos has no tests that I can really test it. It may have some side effects I am not aware of. However, we have run this on our fork already and had no problems so far.

We can now use langchain in this way without having to rewrite our existing code:

async for chunk in model.astream("hello. tell me something about yourself"):
    yield chunk

@tjbck
Copy link
Collaborator

tjbck commented Mar 18, 2025

You use should the same approach Open WebUI uses and keep the changes to our core codebase minimal, changes wanted here.

@maximegmd
Copy link

Is there a reason why this was not merged?

@dominikpeter
Copy link
Author

I can resolve the conflicts or refactor it if nothing is fundamentally wrong and has a chance of being merged. Just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

async pipeline Async support for pipe
5 participants