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

Support for AzureOpenAI format #35

Open
hustshawn opened this issue Aug 5, 2024 · 0 comments
Open

Support for AzureOpenAI format #35

hustshawn opened this issue Aug 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hustshawn
Copy link

hustshawn commented Aug 5, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Feature request.

Describe the feature you'd like
A clear and concise description of what you want to happen.

Right now the API format is as OpenAI format. But there are cases customer from Azure may be using AzureOpenAI client, instead of OpenAI client. Shall we support AzureOpenAI as well? let's say it can be enabled via an configuration at the deployment stage.

Once the feature is supported, it will help customer easily migrate from Azure to Amazon Bedrock.

Additional context
Add any other context or screenshots about the feature request here.

Reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/switching-endpoints

# OpenAI example
curl $OPENAI_BASE_URL/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "anthropic.claude-3-sonnet-20240229-v1:0",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'
# Azure OpenAI
curl $AZURE_OPENAI_ENDPOINT/openai/deployments/gpt-35-turbo/chat/completions?api-version=2024-02-01 \
  -H "Content-Type: application/json" \
  -H "api-key: $AZURE_OPENAI_API_KEY" \
  -d '{"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},{"role": "user", "content": "Do other Azure AI services support this too?"}]}'
@hustshawn hustshawn added the enhancement New feature or request label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant