Closed kingzez closed 1 year ago
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?
@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)