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 #96

Closed
wants to merge 11 commits into from
Closed

Add Azure OpenAI support #96

wants to merge 11 commits into from

Conversation

akira-cn
Copy link

@akira-cn akira-cn commented Sep 7, 2023

Now you can use Microsoft azure openAI as your ai service.

  1. Set OPENAI_API_ENDPOINT to Azure-OpenAI's EndPoints and set AZURE_OPENAI_DEPLOYMENT to your developmentId.

  2. Use your azureApiKey as OPENAI_KEY.

e.g.

ai config set OPENAI_API_ENDPOINT=https://<your-endpoint>.openai.azure.com
ai config set AZURE_OPENAI_DEPLOYMENT=<your-deployment-id>
ai config set OPENAI_KEY=<your token>

Get more details please follow the instruction here.

@akira-cn akira-cn changed the title Add support to Microsoft Azure OpenAI Add Azure OpenAI support Sep 11, 2023
@steve8708
Copy link
Contributor

thanks @akira-cn! can take a. look at this in a bit

@steve8708
Copy link
Contributor

code looks good to me, just need build to pass to merge

@steve8708
Copy link
Contributor

just about to merge this but looks like we've run into a merge conflict

@Racle
Copy link

Racle commented Oct 13, 2023

Quick note, there probably should be check to remove trailing / in ai config set OPENAI_API_ENDPOINT as when you copy your endpoint from azure, it has trailing / in url.

And if that is there, ai-shell will just output:

{
  "error": {
    "code": "404",
    "message": "Resource not found"
  }
}

Don't ask me how I know 😅

@qingpengchen2011
Copy link

Need this feature. Will the conflicts be resolved?

@huseyinulas
Copy link

waiting for the pr

@steve8708
Copy link
Contributor

going to close this out given no activity, feel free to reopen if any updates

@steve8708 steve8708 closed this May 23, 2024
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.

None yet

5 participants