RD-Agent icon indicating copy to clipboard operation
RD-Agent copied to clipboard

How to set Azure Deployment at .env file?, there not list Azure Open AI complete settings section.

Open ejgarcian opened this issue 1 year ago • 5 comments

📖 Documentation

https://rdagent.readthedocs.io/en/latest/installation_and_configuration.html

ejgarcian avatar Sep 27 '24 22:09 ejgarcian

Hi,

Thank you for reaching out. Could you please provide more details about your specific requirements?

TPLin22 avatar Sep 29 '24 05:09 TPLin22

Sure, looks when it needed to use Azure Open AI, there are some additional parameter (deployment) at the AzureOpenAI client, and get result modifying the llm_utils.py, full operate with Azure Open AI services.

llm_utils py

ejgarcian avatar Oct 04 '24 23:10 ejgarcian

To use Azure OpenAI, at .env file you should have EMBEDDING_OPENAI_API_KEY=<your_key> or CHAT_OPENAI_API_KEY=<your_key>. The base and version can be modified as in the .env.example file. You can see the priority of API key settings on line 314 of llm_utils.py. Also you need to import the environment variables from the .env file.

TPLin22 avatar Oct 08 '24 05:10 TPLin22

It's doesn't work if the deployment environment is multitenant over Azure Open AI, simply the client can't connect it. The instructions was made only considering OpenAI api, not for real Azure Environment. The client invocations on the internals URi endpoint are different, the only solution that I found was pass the complete arguments on the client, its the correct way to do it.

ejgarcian avatar Oct 20 '24 14:10 ejgarcian

Hi, @ejgarcian We've recently changed the Azure OpenAI settings section of the documentation, if you follow the instructions in the documentation now, will it solve your problem?

SunsetWolf avatar Nov 29 '24 07:11 SunsetWolf