Skip to content
Farkhod Sadykov edited this page Apr 1, 2024 · 4 revisions

ShellGPT utilizes LiteLLM in order to communicate with various LLM backends. To install it run:

pip install shell-gpt[litellm]

Make sure to enforce LiteLLM usage in your config file ~/.config/shell_gpt/.sgptrc and set API key:

USE_LITELLM=true
OPENAI_API_KEY=YOUR_AZURE_KEY

After we installed LiteLLM and set it in config file, we need to add few ENV variables:

export AZURE_API_BASE=YOUR_API_BASE
export AZURE_API_VERSION=YOUR_API_VERSION
export AZURE_AD_TOKEN=YOUR_TOKEN # Optional
export AZURE_API_TYPE=YOUR_API_TYPE # Optional

And that's it, now you can run ShellGPT with Azure backend.

sgpt --model azure/<your_deployment_name> --no-functions "Hi Azure"
Clone this wiki locally