Is your feature request related to a problem? Please describe.
When users use the Open WebUI chat interface to interact with Ollama-provided and OpenAI-provided models, Functions are triggered as part of their requests. If a user uses their API key from Open WebUI and proxies a request to the models, those Functions are not called. This is an issue if you are using a Function to perform basic accounting of how models are used, and how many tokens are consumed. Here is an example when Functions are bypassed:
Describe the solution you'd like
When Open WebUI is used to proxy requests to the models via API, they should call the same functions that would be called using the Chat UI.
Originally created by @dartcrossett on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5768
**Is your feature request related to a problem? Please describe.**
When users use the Open WebUI chat interface to interact with Ollama-provided and OpenAI-provided models, Functions are triggered as part of their requests. If a user uses their API key from Open WebUI and proxies a request to the models, those Functions are not called. This is an issue if you are using a Function to perform basic accounting of how models are used, and how many tokens are consumed. Here is an example when Functions are bypassed:
```shell
curl https://example.org/openai/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-REMOVED" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
```
**Describe the solution you'd like**
When Open WebUI is used to proxy requests to the models via API, they should call the same functions that would be called using the Chat UI.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @dartcrossett on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5768
Is your feature request related to a problem? Please describe.
When users use the Open WebUI chat interface to interact with Ollama-provided and OpenAI-provided models, Functions are triggered as part of their requests. If a user uses their API key from Open WebUI and proxies a request to the models, those Functions are not called. This is an issue if you are using a Function to perform basic accounting of how models are used, and how many tokens are consumed. Here is an example when Functions are bypassed:
Describe the solution you'd like
When Open WebUI is used to proxy requests to the models via API, they should call the same functions that would be called using the Chat UI.