From 3ad92e6c047412464261716d8e8c1bc8779fbc92 Mon Sep 17 00:00:00 2001
From: Benjamin Ironside Goldstein
<91905639+benironside@users.noreply.github.com>
Date: Mon, 6 May 2024 09:43:23 -0400
Subject: [PATCH] Adds step by step instructions for connecting to Azure OpenAI
(#5158)
* Adds step by step instructions for connecting to Azure OpenAI
* adjust headings
* fixes slug
* adds intro paragraph
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Incorporates Charles' review. Thanks Charles!
* line edit
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com>
* Update docs/assistant/azure-openai-setup.asciidoc
Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com>
---------
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com>
(cherry picked from commit 2b8440ed4236924a42ba69103f94418b54fc89f2)
---
docs/assistant/azure-openai-setup.asciidoc | 131 +++++++++++++++++++++
docs/assistant/security-assistant.asciidoc | 3 +-
2 files changed, 133 insertions(+), 1 deletion(-)
create mode 100644 docs/assistant/azure-openai-setup.asciidoc
diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc
new file mode 100644
index 0000000000..873428a645
--- /dev/null
+++ b/docs/assistant/azure-openai-setup.asciidoc
@@ -0,0 +1,131 @@
+[[assistant-connect-to-azure-openai]]
+= Connect to Azure OpenAI
+
+This page provides step-by-step instructions for setting up an Azure OpenAI connector for the first time. This connector type enables you to leverage large language models (LLMs) within {kib}. You'll first need to configure Azure, then configure the connector in {kib}.
+
+[discrete]
+== Configure Azure
+
+[discrete]
+=== Configure a deployment
+
+First, set up an Azure OpenAI deployment:
+
+. Log in to the Azure console and search for Azure OpenAI.
+. In **Azure AI services**, select **Create**.
+. For the **Project Details**, select your subscription and resource group. If you don't have a resource group, select **Create new** to make one.
+. For **Instance Details**, select the desired region and specify a name, such as `example-deployment-openai`.
+. Select the **Standard** pricing tier, then click **Next**.
+. Configure your network settings, click **Next**, optionally add tags, then click **Next**.
+. Review your deployment settings, then click **Create**. When complete, select **Go to resource**.
+
+The following video demonstrates these steps.
+
+=======
+++++
+
+
+
+++++
+=======
+
+[discrete]
+=== Configure keys
+
+Next, create access keys for the deployment:
+
+. From within your Azure OpenAI deployment, select **Click here to manage keys**.
+. Store your keys in a secure location.
+
+The following video demonstrates these steps.
+
+=======
+++++
+
+
+
+++++
+=======
+
+[discrete]
+=== Configure a model
+
+Now, set up the Azure OpenAI model:
+
+. From within your Azure OpenAI deployment, select **Model deployments**, then click **Manage deployments**.
+. On the **Deployments** page, select **Create new deployment**.
+. Under **Select a model**, choose `gpt-4` or `gpt-4-32k`.
+** If you select `gpt-4`, set the **Model version** to `0125-Preview`.
+** If you select `gpt-4-32k`, set the **Model version** to `default`.
++
+IMPORTANT: The models available to you will depend on https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability[region availability]. For best results, use `GPT 4 Turbo version 0125-preview` or `GPT 4-32k` with the maximum Tokens-Per-Minute (TPM) capacity. In most regions, the GPT 4 Turbo model offers the largest supported context window.
++
+. Under **Deployment type**, select **Standard**.
+. Name your deployment.
+. Slide the **Tokens per Minute Rate Limit** to the maximum. The following example supports 80,000 TPM, but other regions might support higher limits.
+. Click **Create**.
+
+The following video demonstrates these steps.
+
+=======
+++++
+
+
+
+++++
+=======
+
+[discrete]
+== Configure Elastic AI Assistant
+
+Finally, configure the connector in {kib}:
+
+. Log in to {kib}.
+. Go to **Stack Management → Connectors → Create connector → OpenAI**.
+. Give your connector a name to help you keep track of different models, such as `Azure OpenAI (GPT-4 Turbo v. 0125)`.
+. For **Select an OpenAI provider**, choose **Azure OpenAI**.
+. Update the **URL** field. We recommend doing the following:
+.. Navigate to your deployment in Azure AI Studio and select **Open in Playground**. The **Chat playground** screen displays.
+.. Select **View code**, then from the drop-down, change the **Sample code** to `Curl`.
+.. Highlight and copy the URL without the quotes, then paste it into the **URL** field in {kib}.
+.. (Optional) Alternatively, refer to the https://learn.microsoft.com/en-us/azure/ai-services/openai/reference[API documentation] to learn how to create the URL manually.
+. Under **API key**, enter one of your API keys.
+. Click **Save & test**, then click **Run**.
+
+Your LLM connector is now configured. The following video demonstrates these steps.
+
+=======
+++++
+
+
+
+++++
+=======
diff --git a/docs/assistant/security-assistant.asciidoc b/docs/assistant/security-assistant.asciidoc
index 61697eb4a7..3f86ee90d3 100644
--- a/docs/assistant/security-assistant.asciidoc
+++ b/docs/assistant/security-assistant.asciidoc
@@ -223,4 +223,5 @@ In addition to practical advice, AI Assistant can offer conceptual advice, tips,
include::ai-alert-triage.asciidoc[leveloffset=+1]
-include::connect-to-bedrock.asciidoc[leveloffset=+1]
\ No newline at end of file
+include::azure-openai-setup.asciidoc[leveloffset=+1]
+include::connect-to-bedrock.asciidoc[leveloffset=+1]