TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.42k stars 742 forks source link

Move api_key from additional kwargs to OpenAI instantiation #500

Open roschly opened 7 months ago

roschly commented 7 months ago

When the api_key is passed in additional kwargs to the litellm completion, it caused an issue with Azure OpenAI. To fix it, it is passed as an arg to the OpenAI instantiation, and removed from additional kwargs in the handler.

I don't know if this might cause issues for other LiteLLM backends though. But if it does, it probably indicates that a refactor is needed in order handle multiple backends