From 7ca3e8516bd753fe427e0cd650ec10d56c85897b Mon Sep 17 00:00:00 2001 From: d61h6k4 Date: Tue, 20 Jun 2023 10:31:54 +0200 Subject: [PATCH 1/4] Add instruction to set openai configuration information --- docs/docs/llms/llm-setup.mdx | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/docs/llms/llm-setup.mdx b/docs/docs/llms/llm-setup.mdx index 787a7954ba54..13e020c8ae74 100644 --- a/docs/docs/llms/llm-setup.mdx +++ b/docs/docs/llms/llm-setup.mdx @@ -47,8 +47,17 @@ interaction between the two. To configure the API token, follow these steps: -1. [Instructions to get your API token] -2. [Instructions to set the token in your LLM configuration] +1. If you haven't already, sign up for an account on the OpenAI platform. + Navigate to the OpenAI Key Management page at https://platform.openai.com/account/api-keys. + Once there, click on the "Create New Secret Key" button to initiate the process of + obtaining your API key. + +2. Setting the API key as an environment variable, you can use the following command in a + terminal or command prompt: + ```shell Copy code + export OPENAI_API_KEY= + ``` + Replace `` with the actual API key you obtained from the OpenAI platform. ### Model Configuration @@ -70,14 +79,19 @@ to be configured: OpenAI Service. - `openai.api_base`: This should be the URL for your Azure OpenAI instance. An example might look like this: "https://docs-test-001.openai.azure.com/". -- `openai.api_version`: This should be the version of Azure OpenAI you are - using, such as "2023-05-15". + To configure these parameters, follow these steps: -1. [Instructions to set `openai.api_type`] -2. [Instructions to set `openai.api_base`] -3. [Instructions to set `openai.api_version`] +1. To configure the `openai.api_type` as an environment variable: + ```shell + export OPENAI_API_TYPE="azure" + ``` +2. To configure the `openai.api_base` as an environment variable: + ```shell + export OPENAI_API_BASE= + ``` + ## Other LLM providers From 235129c4a94edcf50637e8163b8a27eab1a61f1e Mon Sep 17 00:00:00 2001 From: d61h6k4 Date: Tue, 20 Jun 2023 11:51:47 +0200 Subject: [PATCH 2/4] Fix review comment --- docs/docs/llms/llm-setup.mdx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/docs/llms/llm-setup.mdx b/docs/docs/llms/llm-setup.mdx index 13e020c8ae74..b24aa667bfc8 100644 --- a/docs/docs/llms/llm-setup.mdx +++ b/docs/docs/llms/llm-setup.mdx @@ -48,16 +48,17 @@ interaction between the two. To configure the API token, follow these steps: 1. If you haven't already, sign up for an account on the OpenAI platform. - Navigate to the OpenAI Key Management page at https://platform.openai.com/account/api-keys. - Once there, click on the "Create New Secret Key" button to initiate the process of + +2. Navigate to the [OpenAI Key Management page](https://platform.openai.com/account/api-keys), + and click on the "Create New Secret Key" button to initiate the process of obtaining your API key. -2. Setting the API key as an environment variable, you can use the following command in a +3. To set the API key as an environment variable, you can use the following command in a terminal or command prompt: - ```shell Copy code - export OPENAI_API_KEY= + ```shell + export OPENAI_API_KEY= ``` - Replace `` with the actual API key you obtained from the OpenAI platform. + Replace `` with the actual API key you obtained from the OpenAI platform. ### Model Configuration From 051fa06e68db3c426f802005c6cd46acb07e87c5 Mon Sep 17 00:00:00 2001 From: d61h6k4 Date: Tue, 20 Jun 2023 13:39:54 +0200 Subject: [PATCH 3/4] Add examples of setting Azure parameters for windows --- docs/docs/llms/llm-setup.mdx | 45 +++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/docs/docs/llms/llm-setup.mdx b/docs/docs/llms/llm-setup.mdx index b24aa667bfc8..d47269644088 100644 --- a/docs/docs/llms/llm-setup.mdx +++ b/docs/docs/llms/llm-setup.mdx @@ -85,13 +85,46 @@ to be configured: To configure these parameters, follow these steps: 1. To configure the `openai.api_type` as an environment variable: - ```shell - export OPENAI_API_TYPE="azure" - ``` + + + + + ```shell + export OPENAI_API_TYPE="azure" + ``` + + + + + ```shell + setx OPENAI_API_TYPE "azure" + ``` + + This will apply to future cmd prompt window, so you will need to open a new one to use that variable + + + + 2. To configure the `openai.api_base` as an environment variable: - ```shell - export OPENAI_API_BASE= - ``` + + + + + ```shell + export OPENAI_API_BASE= + ``` + + + + + ```shell + setx OPENAI_API_BASE + ``` + + This will apply to future cmd prompt window, so you will need to open a new one to use that variable + + + ## Other LLM providers From 326b772709ab4e526082b61e4e394e9489d0608a Mon Sep 17 00:00:00 2001 From: d61h6k4 Date: Tue, 20 Jun 2023 16:48:03 +0200 Subject: [PATCH 4/4] Add API key tab for consistency --- docs/docs/llms/llm-setup.mdx | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/docs/llms/llm-setup.mdx b/docs/docs/llms/llm-setup.mdx index d47269644088..fb399b2d2048 100644 --- a/docs/docs/llms/llm-setup.mdx +++ b/docs/docs/llms/llm-setup.mdx @@ -55,9 +55,26 @@ To configure the API token, follow these steps: 3. To set the API key as an environment variable, you can use the following command in a terminal or command prompt: - ```shell - export OPENAI_API_KEY= - ``` + + + + + ```shell + export OPENAI_API_KEY= + ``` + + + + + ```shell + setx OPENAI_API_KEY + ``` + + This will apply to future cmd prompt window, so you will need to open a new one to use that variable + + + + Replace `` with the actual API key you obtained from the OpenAI platform. ### Model Configuration