camel
camel copied to clipboard
[Feature Request] Support `Azure` OpenAI models
Required prerequisites
- [X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- [X] Consider asking first in a Discussion.
Motivation
People are interested in setting up Azure OpenAI models. We can add Azure OpenAI models to https://github.com/camel-ai/camel/tree/master/camel/models.
Solution
No response
Alternatives
No response
Additional context
No response
@hammoudhasan can you take this issue? It is related to what we will do.
@lightaime, @hammoudhasan: I think the code needs to be changed in 3 places, but I do not understand the code well enough to implement it in a nice way and create a PR for it. I got it to work by hard-coding values in each location.
In apps/agents/agents.py and camel/models/openai_model.py, openai.api_key = ...
needs to be complemented with openai.api_base = "https://<example-endpoint>.openai.azure.com"
. In camel/configs.py, the ChatGPTConfig class needs to be extended with the variable deployment_id: str = "<name of the deployment>"
.
Adding openai.api_type = ...
and openai.api_version = ...
was not necessary.
Hi, @lightaime , I have integrated Azure OpenAI API into Camel and updated the corresponding files. Would it be okay for me to make a pull request?
finished https://github.com/camel-ai/camel/pull/733