victordibia / autogen-ui

Web UI for AutoGen (A Framework Multi-Agent LLM Applications)
MIT License
651 stars 98 forks source link

Can I use this package with AzureOpenAI? #14

Open mraguth opened 7 months ago

mraguth commented 7 months ago

I can use Autogen with my AzureOpenAI keys. Can I do the same with this package? Please help.

janaka commented 7 months ago

In theory as follows, I've not got around to trying it yet.

Without code changes

AZURE_OPENAI_API_KEY= AZURE_OPENAI_API_BASE=

api_version="2023-07-01-preview" need to be set during your Azure OpenAI deployment. deployment name of your Azure OAI deployment needs to be "gpt-35-turbo". I think this is the default (note no full stop between 3 and 5).

main of this repo is currently using a pre v0.2.* AutoGen

ref to env vars : https://github.com/microsoft/autogen/blob/dd90756bdb05479cea035db718f6473ce3e1859f/autogen/oai/openai_utils.py#L110

If you are working with an existing Azure OAI deployment that doesn't have the above deployment name and API version and don't want to or cannot change / deploy a new one, then you'll have to modify the autogen-ui code to set those two in the llmconfig.

If I test, I'll confirm.