diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-28 17:06:38 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-28 17:06:38 -0700 |
commit | cb0c815ad799050ecc0abdf3d15981e9832b9829 (patch) | |
tree | ffa35d2bb595fbfa59e4ae03886d46bc048dd0a2 /docs | |
parent | 99ece78c8640495fbdabd95d30c26d620045b0ec (diff) | |
download | sncontinue-cb0c815ad799050ecc0abdf3d15981e9832b9829.tar.gz sncontinue-cb0c815ad799050ecc0abdf3d15981e9832b9829.tar.bz2 sncontinue-cb0c815ad799050ecc0abdf3d15981e9832b9829.zip |
feat: :sparkles: allow custom OpenAI base_url
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docs/customization.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/docs/customization.md b/docs/docs/customization.md index f383de48..fa4d110e 100644 --- a/docs/docs/customization.md +++ b/docs/docs/customization.md @@ -11,6 +11,7 @@ Change the `default_model` field to any of "gpt-3.5-turbo", "gpt-3.5-turbo-16k", New users can try out Continue with GPT-4 using a proxy server that securely makes calls to OpenAI using our API key. Continue should just work the first time you install the extension in VS Code. Once you are using Continue regularly though, you will need to add an OpenAI API key that has access to GPT-4 by following these steps: + 1. Copy your API key from https://platform.openai.com/account/api-keys 2. Use the cmd+, (Mac) / ctrl+, (Windows) to open your VS Code settings 3. Type "Continue" in the search bar @@ -35,21 +36,24 @@ If by chance the provider has the exact same API interface as OpenAI, the `GGML` ### Azure OpenAI Service -If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. After applying for access [here](https://azure.microsoft.com/en-us/products/ai-services/openai-service), you will typically hear back within only a few days. Once you have access, set `default_model` to "gpt-4", and then set the `azure_openai_info` property in the `ContinueConfig` like so: +If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. After applying for access [here](https://azure.microsoft.com/en-us/products/ai-services/openai-service), you will typically hear back within only a few days. Once you have access, set `default_model` to "gpt-4", and then set the `openai_server_info` property in the `ContinueConfig` like so: ```python config = ContinueConfig( ... - azure_openai_info=AzureInfo( - endpoint="https://my-azure-openai-instance.openai.azure.com/", + openai_server_info=OpenAIServerInfo( + api_base="https://my-azure-openai-instance.openai.azure.com/", engine="my-azure-openai-deployment", - api_version="2023-03-15-preview" + api_version="2023-03-15-preview", + api_type="azure" ) ) ``` The easiest way to find this information is from the chat playground in the Azure OpenAI portal. Under the "Chat Session" section, click "View Code" to see each of these parameters. Finally, find one of your Azure OpenAI keys and enter it in the VS Code settings under `continue.OPENAI_API_KEY`. +Note that you can also use `OpenAIServerInfo` for uses other than Azure, such as self-hosting a model. + ## Customize System Message You can write your own system message, a set of instructions that will always be top-of-mind for the LLM, by setting the `system_message` property to any string. For example, you might request "Please make all responses as concise as possible and never repeat something you have already explained." |