BuilderIO / ai-shell

A CLI that converts natural language to shell commands.
MIT License
4.21k stars 278 forks source link

Azure OpenAI service support #37

Closed lzhgus closed 1 year ago

lzhgus commented 1 year ago

Would be nice to offer an option to use Azure OpenAI service

steve8708 commented 1 year ago

You can now provide custom endpoints in 0.1.12 via https://github.com/BuilderIO/ai-shell/pull/40

steve8708 commented 1 year ago

reopenning as it seems we need different logic for key validation if we detect an azure url. context: https://github.com/BuilderIO/ai-shell/pull/40#issuecomment-1505581328

Guilloperez commented 1 year ago

Bien

crystoneme commented 1 year ago

but, still says '✖ Invalid config property OPENAI_KEY: Must start with "sk-"' if config with Azure API Key

lzhgus commented 1 year ago

Hi @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!