-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Closed
Description
Check Existing Issues
- I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.
Verify Feature Scope
- I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.
Problem Description
I asked for clarification inside the documentation whether tool events are supported in python implemented tools only. Nicely the documentation now clearly says that events are not supported with OpenAPI and MCP based tools.
This is the according feature request. It would be very good if we could have the same nice functionalities inside external tools also.
Desired Solution you'd like
Here are some thoughts about how this could be implemented.
- As there is not the same availability of the two according (python) functions event_emitter and event_call, there must be some other possibility for the tool server to call these. As the communication is done via REST calls, the tool server could call some defined OpenWebUI REST endpoints.
- As the tool server implementation is state-less, the external tool must be able to identify the chat window which is the target of the event. Then, the tool server must send some chat window identifier together with the event call.
- As OpenWebUI always initiates the communication with the tool server, there is the possibility to send some chat window identifier together with the tool call request. A special 'init' or 'send me some metadata' tool endpoint is not necessary.
- For security, the chat window identifier should be thought as some secret token, not as a simple increasing integer value. This prevents that a tool server could emit or call events inside chat windows which it should not have access to.
Thus my suggestion:
- When OpenWebUI calls a tool server, it always sends some chat window identifier together with the request. This could be done nicely, without breaking changes as entry inside the HTTP header (e.g. chat_id). Sending this metadata inside the request body would need changes of the OpenAPI and MCP interfaces.
- The OpenWebUI server offers two REST calls for event_emitter and event_call. These calls offer the exact same functionality as the python functions (they just call them under the hood), but need the chat window identifier as additional parameter.
- The tool server can call these REST endpoints to emit or call events inside the right chat window now.
Alternatives Considered
No response
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels