ai-shell icon indicating copy to clipboard operation
ai-shell copied to clipboard

Azure OpenAI service support

Open lzhgus opened this issue 1 year ago • 3 comments

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

lzhgus avatar Apr 11 '23 18:04 lzhgus

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

steve8708 avatar Apr 12 '23 15:04 steve8708

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

steve8708 avatar Apr 12 '23 16:04 steve8708

Bien

Guilloperez avatar Apr 12 '23 21:04 Guilloperez

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

crystoneme avatar Apr 25 '23 10:04 crystoneme

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!

lzhgus avatar Apr 27 '23 16:04 lzhgus