Extra Configurations for Deploying Self-Hosted Sweep
This guide assumes you have already completed http://docs.sweep.dev/deployment/ (opens in a new tab) and have a working Sweep instance.
This can be found at https://oai.azure.com/portal (opens in a new tab) -> Chat(left tab) -> View Code(middle of the page)
You'll see something like the below:
Edit your .env
vim .env and fill in the following fields:
AZURE_API_KEY=<YOUR_KEY> # this can be found under "key" in the screenshot above OPENAI_API_TYPE=azure OPENAI_API_BASE=https://<YOUR_BASE_URL>.openai.azure.com/ # replace <YOUR_BASE_URL> with the url you see in the screenshot above OPENAI_API_VERSION="2023-07-01-preview" # replace this with the latest if it's not 2023-07-01-preview OPENAI_API_ENGINE_GPT35=YOUR_ENGINE_NAME # replace this for the models/engines you have access to OPENAI_API_ENGINE_GPT4=YOUR_ENGINE_NAME # replace this for the models/engines you have access to OPENAI_API_ENGINE_GPT4_32K=YOUR_ENGINE_NAME # replace this for the models/engines you have access to
If you only have access to GPT3.5 on Azure(or on OpenAI) fill in the following field:
If you happen to have access to GPT4-32K, fill in the following field:
Huggingface, Palm, Ollama, TogetherAI, AI21, Cohere etc.Full List (opens in a new tab)
Example to use a local CodeLLama model from Ollama.ai with Sweep:
Let's spin up a proxy server to route any OpenAI call from Sweep to Ollama/CodeLlama
pip install litellm
$ litellm --model ollama/codellama #INFO: Ollama running on http://0.0.0.0:8000
Update your .env
os.environ["OPENAI_API_BASE"] = "http://0.0.0.0:8000" os.environ["OPENAI_API_KEY"] = "my-fake-key"
Note: All of Sweep's testing has been done on GPT-4. We've tested and on most of our prompts, even GPT-3.5 and Claude v2 breaks most of the time.