-
Notifications
You must be signed in to change notification settings - Fork 274
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 custom openai api endpoint #40
feat: add custom openai api endpoint #40
Conversation
This is great! Can you add it to the new config UI as well? https://github.com/BuilderIO/ai-shell/blob/main/src/helpers/config.ts#L105-L134 |
looks great! we've just got a merge conflict now, then ready to merge |
done ~ |
thanks for this great contribution @kingzez! will release shortyly |
Hi @steve8708, With Azure OpenAI endpoint, I got this error '✖ Invalid config property OPENAI_KEY: Must start with "sk-"', probably you need to change the logic here . Can you please take a look at it? Thanks! |
oh, they handle different keys too, I'll go back and reopen your issue, as it sounds like the scope of this is larger than first thought I would had to remove the validation of openai keys, I gues an alternative is if you use azure (e.g. detecting an azure url configured) we add different logic for validating keys (or remove the validation) interested in sending a PR @lzhgus? |
…ENAI_KEY to start with 'sk-.' If the proxy endpoint is Azure, the openai_key should not start with 'sk'.
@steve8708 , I raised the PR to remove the restriction that require OPENAI_KEY to start with 'SK'. This is because we cannot determine whether the proxy endpoint is for Azure or OpenAI without introducing another configuration setting such as "USEAZURE: boolean". Therefore, I believe it would be better to remove the validation of openai keys. Please review. Thanks! |
If you can't access the OpenAI API directly (due to firewall or other issues), you can use it.
And you can custom OpenAI API endpoint to set OPENAI_API_ENDPOINT (default: https://api.openai.com/v1)