-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Tool caling UI #373
Comments
hm, maybe that's already possible -- https://github.com/open-webui/open-webui/blob/main/src/lib/components/chat/Chat.svelte#L257-L264 |
This has been discussed before. I would LOVE this feature - for pipelines to be able to use I'm not sure why the suggestion of using a function includes an example in which a |
+1 that this is a cool feature -- perhaps there are two requests? One for final output and context and the other for intermediate results for some long-running processes?
Also looks related to #229 in this repo. |
Coming back here after more experience with the code, it looks like the It may be a little unusual, but what about overloading the streamed responses?
No demos or code in place yet, but thinking of KISS to avoid disrupting what is working well in other places already. |
I am thinking exactly this for my own project - but it feels like a last resort and I'm trying to avoid it. Maybe it will work out though, it just seems hacky. I really like the idea of an agent returning status/steps as well as output. It makes a much improved UI experience. I very much love using my instance of Open WebUI - but for more uses that include "agentic" solutions it's not there yet. It still seems really focused on LLMs which I feel is soon to be "two generations" behind. It's the agents.. and then "flows" that I've been obsessing over lately - a là windsurf.ai type of AI solutions. Not LLMs just using tools. I've been working on some code, but it's not ready yet - that does what's proposed above. async for event in graph.astream_events(input=input_data, version="v2"):
kind = event["event"]
if kind == "on_chat_model_stream":
content = event["data"]["chunk"].content
if content:
# print("Sending:", content)
# Replace newlines with encoded form for SSE
content_encoded = content.replace('\n', '\\n')
yield f"data: {content_encoded}\n\n" Doing it this way very much improves performance and actually gets the tokens to stream - instead of large chunks. But I'm already not a fan of how it interferes with newlines and requires a very special format. This is on my reading list before I add to the above: https://python.langchain.com/v0.1/docs/expression_language/streaming/#event-reference |
I like the detailed reference you found in langchain. Digging into event emitters more, the change required may be a little easier than we think.
What might that look like? It might be emitting an entirely new data payload with To avoid pushing changes to both pipelines and openwebui (e.g. with a custom newline reformatting -- albeit, a clever+simple solution!), perhaps we experiment with some existing response padding to see if it is already handled through the above. Disclaimer: Still learning SSE and streamed responses, don't know full vision of this integration. |
When using Open Web UI's native search feature, we can see this UI that the model is using a tool:
After it's done, we can see the intermediate results:
It would be great if we could construct a similar UI to the user through pipelines.
The text was updated successfully, but these errors were encountered: