-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Adding support for non-Azure openai instances #507
Adding support for non-Azure openai instances #507
Conversation
Is there an extra config step is being missed out from the readme? openai API responds with an error "that the model is not specified", when the embeddings are done. |
@bgadrian thanks for the heads up! Yes I did miss the configuration of the openai embedding model name. I added it into the bicep file. |
@carlotta94c I've merged main, made some style changes, verified that Azure OpenAI still works, and added unit tests (which resulted in snapshot updates due to the paramaterization). Please verify that non-Azure OpenAi deployment still works for you. |
@pamelafox I've add some fixes and tested again deploy and run with non-Azure openai endpoint. It's working well now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, there's still a non-optimal user experience for non-Azure OpenAI users where they get prompted for the location, but everything seems to work. Thanks for all the work on this Carlotta.
* Adding openai non-azure endpoint support * Editing infra files * Adding missing args for the prepdocs script * Rolling back indentation changes * rolling back indentiation edits * removing unnecessary parenthesis * Adding OPENAI_EMB_MODEL parameter to bicep config * Adding conditional args to reduce if statements * Rm notebooks again * OpenAI api type * Tests pass * Fix bicep issue * Prepdocs fix * Add main.bicep changes * Add main.bicep changes * Add missing api_type * Parameterize tests * Rm comma * Making chatGptModelName param conditional * Conditional system identity * Make Azure_openai_service conditional * fix inconsistencies across emb model param naming * Fix formatting after merge from main * Script fix --------- Co-authored-by: Pamela Fox <pamela.fox@gmail.com> Co-authored-by: Pamela Fox <pamelafox@microsoft.com>
Purpose
This PR adds OpenAI API support for users who don't have access to Azure OpenAI. Additions:
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Configure an existing non-Azure OpenAI instance and deploy the app:
azd env set OPENAI_API_TYPE openai
azd env set OPENAI_ORGANIZATION {Your OpenAI organization}
azd env set OPENAI_API_KEY {Your OpenAI API key}
azd up
What to Check
Verify that the following are valid
Other Information