mirror of
https://github.com/open-webui/pipelines.git
synced 2026-07-19 22:53:36 -04:00
feat: azure openai endpoint support #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gregrobison on GitHub (Jan 9, 2024).
Is your feature request related to a problem? Please describe.
I am unable to get my Azure OpenAI API endpoint to be recognized - are there any additional settings needed?
Describe the solution you'd like
Azure OpenAI endpoint cannot connect.
Describe alternatives you've considered
API works in other environments.
Additional context
@justinh-rahb commented on GitHub (Jan 9, 2024):
If I had to guess, it's likely that ollama-webui needs to be able to send the
deployment_idandapi_versionin the requests for Azure endpoints, which it currently does not have settings variables for.@justinh-rahb commented on GitHub (Jan 9, 2024):
One workaround you could do for the time being is using LiteLLM proxy to connect to your Azure endpoint, and then connect ollama-webui to litellm. Here's their documentation on setting up Azure endpoints: https://litellm.vercel.app/docs/providers/azure
And here's an example
docker-compose.yamlI use to deploy both ollama-webui and litellm together in a stack:@anuraagdjain commented on GitHub (Jan 28, 2024):
@tjbck - Is the idea to provide support for other LLM endpoints via LiteLLM in the webUI or have an explicit option for providing Azure OpenAI endpoint + key ?
@isaacblum commented on GitHub (Feb 6, 2024):
I created this Ansible Playbook to address this exact need. Please take a look: https://github.com/SpaceTerran/ollama-webui_and_liteLLM-proxy
@mateuszdrab commented on GitHub (Mar 20, 2024):
I think a quick solution (temporary) could also be hardcoding the API version which gets added if the url contains the Azure domain.
This would skip the need to update the UI and probably can be done with a few lines of code.
@justinh-rahb commented on GitHub (Mar 20, 2024):
Personally I wouldn't be against doing this in my own code but I think we can strive for higher here. If it's to be modified, is it much more additional work to do it right? Because I can see the issue reports now from that one guy that uses a different API version 😆
@Zulban commented on GitHub (Apr 16, 2024):
I thought I'd write here in case others find it useful.
I was able to get Open WebUI (v0.1.118) to use Azure OpenAI, gpt4. I did this through litellm (1.35.5), my docker compose file is just a combination of the four services: openwebui, postgresql, ollama, litellm. However one important gotcha is your litellm deployment cannot have a "LITELLM_MASTER_KEY" defined. Took me awhile to figure out. I'm still not sure how to get Open WebUI to use litellm with a LITELLM_MASTER_KEY. I'm still trying to determine if this problem is:
@Michelklingler commented on GitHub (Apr 19, 2024):
Same for me, I use OpenAI on azure for a while now. No issue at all with the liteLLM integration.
@imbible commented on GitHub (May 5, 2024):
@Zulban @Michelklingler How do you make Azure Dall-E 3 work via LiteLLM in WebUI? The Image setting does not provide an input field to specify the model.
@jakoberpf commented on GitHub (May 6, 2024):
@Michelklingler I am currently trying to integrate some Azure OpenAI models with the liteLLM integration but somehow does not get it to work. Does my litellm config looks like this, but I am probably missing something. How did you get it to work?
@Michelklingler commented on GitHub (May 6, 2024):
Hey @jakoberpf !
Below is my config, works like a charm with Mistral-large and GPT4-Turbo
I slightly change the link of the endpoint and removed the API key, but should work following this template!
Let me know if you get it work!
M.
@Michelklingler commented on GitHub (May 6, 2024):
Mmm this is actually a good, point, not sure that at this point LiteLLM as it is configured can manage pulling an image from an endpoint, this is above my understanding of the code. But I would be interested to know as well.
@jakoberpf commented on GitHub (May 7, 2024):
@Michelklingler This worked great thank you. Do you know what the
model_infois actually referencing?@gelbzucht commented on GitHub (May 16, 2024):
thx @Michelklingler, that works really well. 👍🏻
@gelbzucht commented on GitHub (May 16, 2024):
thx @Michelklingler, that works really well. 👍🏻
@dino1729 commented on GitHub (May 24, 2024):
@Michelklingler Can you let us know where to get the model_id param?
@Michelklingler commented on GitHub (May 25, 2024):
Hi!
I'm not actually completely sure what the model info is coming from. I think it is a value that auto populate when I use the WebUI interface to add new model.
For some reason I think it is a value that is automatically generated by liteLLM. I think as long as this value is different for every liteLLM model it's fine it's only for LiteLLM to identify each model internally.
It's my assumption. Let me know if it works!
@0xCodeGuruX commented on GitHub (May 26, 2024):
I successfully used the project at https://github.com/haibbo/cf-openai-azure-proxy to convert Azure OpenAI to OpenAI, and it has been functioning perfectly.
@tjbck commented on GitHub (Jun 2, 2024):
Implemented as Pipeline: https://github.com/open-webui/pipelines/blob/main/examples/providers/azure_openai_pipeline.py
@kentsuiGitHub commented on GitHub (Jun 4, 2024):
tried the pipeline and find hit error 500. Further checked the request body JSON is not match with Azure OpenAI ChatCompletion API schema.
@TDaubignyElsan commented on GitHub (Jun 6, 2024):
Same here, is there a way to fix it ?
@tjbck commented on GitHub (Jun 6, 2024):
@TDaubignyElsan @kentsuiGitHub I don't use Azure myself (I don't have the keys to test it) so PR welcome!
@TDaubignyElsan commented on GitHub (Jun 6, 2024):
Related documentation is located just here : https://learn.microsoft.com/en-us/azure/ai-services/openai/reference if it can help ?
@justinh-rahb commented on GitHub (Jun 6, 2024):
The issue isn't with finding documentation, it's the inability for the team to test it since we do not have access. We could be open to someone offering us a limited scope key via Discord PM to move this forward.
@Gyarbij commented on GitHub (Jun 14, 2024):
I can help with that, if someone wants to shoot me dm. on discord you can also find me under Gyarbij.
@justinh-rahb commented on GitHub (Aug 2, 2024):
Closing as we've had a pipeline for this for a while now.