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

feat: Add support for Azure OpenAI #234

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

jimmydottech
Copy link
Contributor

Description

This PR adds support for Azure OpenAI to the AI system, enabling seamless integration with Azure's LLM services alongside existing providers.

While Azure OpenAI is similar to OpenAI, it requires unique configurations such as API version, custom endpoints, and deployment IDs as model names. For example:

POST https://{endpoint}/openai/deployments/{deployment-id}/embeddings?api-version=2024-10-21

URI Parameters:

Name In Required Type Description
endpoint path Yes stringurl Supported Azure OpenAI endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace "aoairesource" with your Azure OpenAI resource name). https://{your-resource-name}.openai.azure.com
deployment-id path Yes string Deployment ID of the model which was deployed.
api-version query Yes string API version

Request Header:

Name Required Type Description
api-key True string Provide Azure OpenAI API key here

Latest API version:

Latest GA API Latest Preview API
2024-10-21 2024-10-01-preview

Reference:
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
https://learn.microsoft.com/en-us/azure/ai-services/openai/supported-languages
https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/switching-endpoints

Copy link
Contributor

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just need to fix the one change request and we'll be good to go.

rig-core/src/providers/azure.rs Outdated Show resolved Hide resolved
@cvauclair cvauclair added this to the 2025-02-10 milestone Feb 3, 2025
Copy link
Contributor

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@joshua-mo-143 joshua-mo-143 merged commit 170306c into 0xPlaygrounds:main Feb 4, 2025
5 checks passed
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.

3 participants