anse-app / chatgpt-demo

Minimal web UI for ChatGPT.
https://chatgpt.ddiu.me
MIT License
8.01k stars 3.81k forks source link

Azure OpenAI support #272

Open jebouruama opened 1 year ago

jebouruama commented 1 year ago

Clear and concise description of the problem

It would be nice if Azure openai could be supported.

Suggested solution

Please refer to https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview#comparing-azure-openai-and-openai

Alternative

No response

Additional context

No response

Validations

lostz commented 1 year ago

sam as i

xhzhu0628 commented 1 year ago

sam as i

erbanku commented 1 year ago

You can already achive this now by using this method: haibbo/cf-openai-azure-proxy: A Cloudflare worker script to proxy OpenAI‘s request to Azure OpenAI Service https://github.com/stulzq/azure-openai-proxy/raw/master/assets/images/aoai-proxy.jpg Yes, it could be awesome if the current project natively supports it.

erbanku commented 1 year ago

After deploying, set the openai-azure proxy as the OPENAI_API_BASE_URL environment variable, and change the OPENAI_API_KEY to your Azure key.

Please note that you must deploy a proxy for every Azure model-type deployment.

xhzhu0628 commented 1 year ago

After deploying, set the openai-azure proxy as the OPENAI_API_BASE_URL environment variable, and change the OPENAI_API_KEY to your Azure key.

Please note that you must deploy a proxy for every Azure model-type deployment.

thanks!