Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure OpenAI support #282

Merged

Conversation

vladiliescu
Copy link
Contributor

Adds Azure OpenAI support as per #276.

There are some small differences from my initial proposal, the main one being renaming model_id to model.

Imo using model_id doesn't make sense for Azure OpenAI, the openai package uses model as well, and in Azure this field refers to a model deployment.

I can rename this to model_id for consistency purposes with the other Model implementations if needed, but I think it would be confusing for Azure users.

Other than that, I've also fixed some small issues with the original OpenAIServerModel docs, hope it's ok.

@aymeric-roucher
Copy link
Collaborator

@vladiliescu I thought about this name issue between model_id and model: the issue here is that in smolagents, the model object will generally be the instantiated Model, here an AzureOpenAIServerModel, so because of this + the general consistency reason you suggested, I'd prefer to still use model_id, we'll see if there are too many complaints!

@aymeric-roucher
Copy link
Collaborator

@vladiliescu see here another example of integrating Azure using LiteLLM: I think your new class still makes sense because it will spare people the digging in the docs, but maybe you can include their LiteLLM example from the docs in your ddocs: #182

@vladiliescu
Copy link
Contributor Author

Makes sense @aymeric-roucher, I agree -- I've gone back to using model_id for AzureOpenAIServerModel, and added docs on configuring LiteLLMModel to connect to Azure OpenAI. Let me know what you think.

@aymeric-roucher aymeric-roucher merged commit a721837 into huggingface:main Jan 22, 2025
4 checks passed
@aymeric-roucher
Copy link
Collaborator

Thanks a lot @vladiliescu, it's a great addition! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants