From dc297210f4e75306251e84148e2a721e676f6a64 Mon Sep 17 00:00:00 2001 From: sr-remsha <46220620+sr-remsha@users.noreply.github.com> Date: Thu, 23 Nov 2023 20:10:23 +0100 Subject: [PATCH] Restructure (#19) * Create quick-start-2.md * Rename quick-start.md to quick-start-model.md * Rename quick-start-2.md to quick-start.md * Create 1.md * Rename docs/quick-start-model.md to docs/tutorials/quick-start-model.md * Delete docs/tutorials/1.md * Rename docs/quick-start-with-addon.md to docs/tutorials/quick-start-with-addon.md * Rename docs/quick-start-with-application.md to docs/tutorials/quick-start-with-application.md * Update README.md * Update README.md * Update quick-start-model.md * Update quick-start-with-addon.md * Update quick-start-with-addon.md * Update quick-start-with-addon.md * Update quick-start-with-addon.md * Update quick-start-with-addon.md * Update quick-start-with-addon.md * Update quick-start-with-application.md * Update README.md * Update README.md * Update sidebars.js * Update sidebars.js * Sidebar update * addon image link updated * Fixed markdown * comment broken link * Update quick-start-model.md * Update quick-start-with-addon.md * Update quick-start-with-application.md * Update quick-start-with-application.md --------- Co-authored-by: Dmytro Pashynskyi <61313167+dspashynskyi@users.noreply.github.com> --- README.md | 12 ++--- docs/README.md | 12 ++--- docs/quick-start.md | 45 +++---------------- docs/tutorials/quick-start-model.md | 42 +++++++++++++++++ .../{ => tutorials}/quick-start-with-addon.md | 31 +++++++------ .../quick-start-with-application.md | 16 +++---- sidebars.js | 36 ++++++++------- 7 files changed, 110 insertions(+), 84 deletions(-) create mode 100644 docs/tutorials/quick-start-model.md rename docs/{ => tutorials}/quick-start-with-addon.md (76%) rename docs/{ => tutorials}/quick-start-with-application.md (95%) diff --git a/README.md b/README.md index c19f830e..2e3e8e67 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,17 @@ * [Contribution Guide](/CONTRIBUTING.md) -## Quick Start Guide +## Quick Start -Refer to [AI DIAL Chat Repository](https://github.com/epam/ai-dial-chat#overview) to learn how to launch AI DIAL Chat with default configurations. +* [Quick Start Guide](./docs/quick-start.md) + +> Refer to [AI DIAL Chat Repository](https://github.com/epam/ai-dial-chat#overview) to learn how to launch AI DIAL Chat with default configurations. ## Tutorials -* [Launch AI DIAL Chat with an Azure model](./docs/quick-start.md) -* [Launch AI DIAL Chat with Echo Application](./docs/quick-start-with-application.md) -* [Launch AI DIAL Chat with To-Do List Addon](./docs/quick-start-with-addon.md) +* [Launch AI DIAL Chat with an Azure model](./docs/tutorials/quick-start-model.md) +* [Launch AI DIAL Chat with Echo Application](./docs/tutorials/quick-start-with-application.md) +* [Launch AI DIAL Chat with To-Do List Addon](./docs/tutorials/quick-start-with-addon.md) ## AI DIAL Chat Application User Manual diff --git a/docs/README.md b/docs/README.md index f0cdf3cf..fdf769b7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,15 +4,17 @@ * [Contribution Guide](https://github.com/epam/ai-dial/blob/main/CONTRIBUTING.md) -## Quick Start Guide +## Quick Start -Refer to [AI DIAL Chat Repository](https://github.com/epam/ai-dial-chat#overview) to learn how to launch AI DIAL Chat with default configurations. +* [Quick Start Guide](./quick-start.md) + +> Refer to [AI DIAL Chat Repository](https://github.com/epam/ai-dial-chat#overview) to learn how to launch AI DIAL Chat with default configurations. ## Tutorials -* [Launch AI DIAL Chat with an Azure model](./quick-start.md) -* [Launch AI DIAL Chat with Echo Application](./quick-start-with-application.md) -* [Launch AI DIAL Chat with To-Do List Addon](./quick-start-with-addon.md) +* [Launch AI DIAL Chat with an Azure model](./tutorials/quick-start-model.md) +* [Launch AI DIAL Chat with Echo Application](./tutorials/quick-start-with-application.md) +* [Launch AI DIAL Chat with To-Do List Addon](./tutorials/quick-start-with-addon.md) ## AI DIAL Chat Application User Manual diff --git a/docs/quick-start.md b/docs/quick-start.md index c3635a69..f22cf155 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -1,49 +1,18 @@ -# Launch AI DIAL Chat with Azure Model +# Quick Start -## Introduction - -In this tutorial, you will learn how to quickly launch AI DIAL Chat with a custom model created in Azure OpenAI Studio. - -> Refer to [AI DIAL Chat](https://github.com/epam/ai-dial-chat) documentation to learn more about AI DIAL Chat and how to launch it with the default configuration. - -**Other Tutorials**: - -> * To learn how to launch AI DIAL Chat with Addons, refer to [Launch AI DIAL Chat with To-Do List Addon](./quick-start-with-addon.md) -> * To learn how to launch AI DIAL Chat with Echo application, refer to [Launch AI DIAL Chat with Echo Application](./quick-start-with-application.md) +Follow this tutorial to launch AI DIAL Chat with Echo application. As a result, you will be able to access Chat on http://localhost:3000/ and use Echo application to mirror your prompts. ## Prerequisites -1. Docker engine installed on your machine. - > Refer to [Docker](https://docs.docker.com/desktop/) documentation. - -2. Account in MS Azure OpenAI Studio. - > Refer to [Create and Deploy OpenAI Model in Azure](./Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy a model in your MS Azure. +1. Docker engine installed on your machine. Refer to [Docker](https://docs.docker.com/desktop/) documentation. ## Step 1: Get AI DIAL -[Download](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/model/) AI DIAL. - -## Step 2: Configuration - -In the **dial-docker-compose/model/core** folder, you can find a [config.json](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/model/core/config.json) configuration file. - -In `config.json`, you can add your Azure model credentials to the chat configuration: - -* Supply your **Azure API Keys** for your deployments for the `key` parameter. -* Replace `https://AZURE_DEPLOYMENT_URL` with your GPT **endpoint** for the `endpoint` parameter. **Note**: in the endpoint, replace `gpt-4` with your Azure deployment name, in case it is different. +[Download](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/application/) AI DIAL. - ```json - "upstreams": [ - { - "endpoint": "https://AZURE_DEPLOYMENT_URL/openai/deployments/gpt-4/chat/completions", - "key": "AZURE_MODEL_API_KEY" - } - ] - ``` +## Step 2: Launch Chat - > Refer to [Create and Deploy OpenAI Model in Azure](./Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy a model in MS Azure. +Run `docker compose up` in the console from the folder with the `docker-compose.yml` file. -## Step 3: Lauch AI DIAL Chat +Once AI DIAL Chat is up on http://localhost:3000/, select the Echo Application and start typing in prompts to see how the Echo application mirrors them. -1. Run `docker compose up` from the folder with the `docker compose` file (**dial-docker-compose/dial**). -2. Open http://localhost:3000/ in your browser to launch the AI DIAL Chat application. diff --git a/docs/tutorials/quick-start-model.md b/docs/tutorials/quick-start-model.md new file mode 100644 index 00000000..802bd5e0 --- /dev/null +++ b/docs/tutorials/quick-start-model.md @@ -0,0 +1,42 @@ +# Launch AI DIAL Chat with Azure Model + +## Introduction + +In this tutorial, you will learn how to quickly launch AI DIAL Chat with a custom model created in Azure OpenAI Studio. + +## Prerequisites + +1. Docker engine installed on your machine. + > Refer to [Docker](https://docs.docker.com/desktop/) documentation. + +2. Account in MS Azure OpenAI Studio. + > Refer to [Create and Deploy OpenAI Model in Azure](/Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy a model in your MS Azure. + +## Step 1: Get AI DIAL + +[Download](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/model/) AI DIAL. + +## Step 2: Configuration + +In the **dial-docker-compose/model/core** folder, you can find a [config.json](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/model/core/config.json) configuration file. + +In `config.json`, you can add your Azure model credentials to the chat configuration: + +* Supply your **Azure API Keys** for your deployments for the `key` parameter. +* Replace `https://AZURE_DEPLOYMENT_URL` with your GPT **endpoint** for the `endpoint` parameter. **Note**: in the endpoint, replace `gpt-4` with your Azure deployment name, in case it is different. + + ```json + "upstreams": [ + { + "endpoint": "https://AZURE_DEPLOYMENT_URL/openai/deployments/gpt-4/chat/completions", + "key": "AZURE_MODEL_API_KEY" + } + ] + ``` + + > Refer to [Create and Deploy OpenAI Model in Azure](/Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy a model in MS Azure. + +## Step 3: Lauch AI DIAL Chat + +1. Run `docker compose up` from the folder with the `docker compose` file (**dial-docker-compose/dial**). +2. Open http://localhost:3000/ in your browser to launch the AI DIAL Chat application. diff --git a/docs/quick-start-with-addon.md b/docs/tutorials/quick-start-with-addon.md similarity index 76% rename from docs/quick-start-with-addon.md rename to docs/tutorials/quick-start-with-addon.md index d8b43938..7cf8a972 100644 --- a/docs/quick-start-with-addon.md +++ b/docs/tutorials/quick-start-with-addon.md @@ -1,5 +1,9 @@ # Launch AI DIAL Chat with To-Do List Addon +## Introduction + +In this tutorial, you will learn how to launch AI DIAL Chat with a To-Do List Addon and an OpenAI model. As a result, you will be able to access Chat on http://localhost:3000/ and use a To-Do List Addon to create a to-do list. + ## About AI DIAL Addons Within the AI DIAL framework, an **Addon** is a service - or any component adhering to its own or provided OpenAPI specification - that empowers LLMs to access and utilize any desired data source or technology to produce their responses. @@ -29,7 +33,7 @@ Following this pattern, you can develop your own addons or use a third-party one > Refer to [Docker](https://docs.docker.com/desktop/) documentation. 2. Account in MS Azure OpenAI Studio. - > Refer to [Create and Deploy OpenAI Model in Azure](./Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy an OpenAI model in MS Azure. + > Refer to [Create and Deploy OpenAI Model in Azure](/Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy an OpenAI model in MS Azure. 3. Addon. In this example, it is [To-Do List](https://github.com/openai/plugins-quickstart/) by OpenAI. @@ -37,6 +41,8 @@ Following this pattern, you can develop your own addons or use a third-party one [Download](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/) AI DIAL. +## Step 2: Configuration + In **docker-compose.yaml**, you can find sections for [OpenAI Adapter](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/docker-compose.yml#L18) to work with an Azure model, [AI DIAL Assistant](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/docker-compose.yml#L22), [Addon](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/docker-compose.yml#L27), and [Core (AI DIAL back-end)](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/docker-compose.yml#L29). > * Refer to [AI DIAL Adapter for OpenAI](https://github.com/epam/ai-dial-adapter-openai) to learn more. @@ -44,12 +50,12 @@ In **docker-compose.yaml**, you can find sections for [OpenAI Adapter](https://g In the **/addon** folder, you can find a [Dockerfile](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/addon/Dockerfile) we need to get and launch the To-Do List Addon. -## Step 2: Configuration - -In the **/addon/core** folder, you can find a [config.json](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json) configuration file. In this file, you can configure your model, assistant and addon. +In the **/core** folder, you can find a [config.json](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json) configuration file. In this file, you can configure your model, assistant and addon. ### Configure Model +Add you model credentials in the [config.json](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L24) file in `upstreams`. + * Supply your **Azure API Keys** for your deployments for the `key` parameter. * Replace `https://AZURE_DEPLOYMENT_URL` with your GPT **endpoint** for the `endpoint` parameter. **Note**: in the endpoint, replace `gpt-4` with your Azure deployment name, in case it is different. @@ -62,11 +68,11 @@ In the **/addon/core** folder, you can find a [config.json](https://github.com/e ] ``` - > Refer to [Create and Deploy OpenAI Model in Azure](./Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy an OpenAI model in MS Azure. + > Refer to [Create and Deploy OpenAI Model in Azure](/Deployment/Azure%20Model%20Deployment.md) to learn how to create and deploy an OpenAI model in MS Azure. ### Configure Assistant -Provide the endpoint for AI DIAL Assistant: +Provide the endpoint for AI DIAL Assistant in the [config file](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L18) in the `assistant` section. ```json "assistant": { @@ -74,12 +80,13 @@ Provide the endpoint for AI DIAL Assistant: } ``` -> * Refer to the [config file](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L18). -> * Refer to [AI DIAL Assistant](https://github.com/epam/ai-dial-assistant) repository for more information. +> * Refer to [AI DIAL Assistant](https://github.com/epam/ai-dial-assistant) repository for more information about AI DIAL Assistant. ### Configure Addon -Provide configuration for your addon in the [addons](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L11) section: +> In this example, we get information about the name, description etc. from the [addon repository](https://github.com/openai/plugins-quickstart/blob/main/.well-known/ai-plugin.json). + +Provide configuration for your addon in the [config file](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L11) in the `addons` section: ```json "addons": { @@ -91,7 +98,7 @@ Provide configuration for your addon in the [addons](https://github.com/epam/ai- } ``` -Provide configuration for your addon in the [roles](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L49) section: +Configure roles for your addon in the [config file](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/addon/core/config.json#L49) in the `roles` section: ```json "roles": { @@ -103,8 +110,6 @@ Provide configuration for your addon in the [roles](https://github.com/epam/ai-d } ``` -> * In this example, we get information about the name, description etc. from the [addon repository](https://github.com/openai/plugins-quickstart/blob/main/.well-known/ai-plugin.json). - ## Step 3: Lauch AI DIAL Chat 1. Run the `docker compose up` command from the folder with the `docker-compose` file (**dial-docker-compose/addon**). @@ -112,6 +117,6 @@ Provide configuration for your addon in the [roles](https://github.com/epam/ai-d The AI DIAL Chat is launched with the Azure model we have configured, and the Addon is enabled with the display name you configured for the `addons.displayName` parameter in `config.json`. -![](./img/addon.png) + Select the Addon and start a new conversation. For example, send "Add homework to the to do list" and then "Get the to do list". diff --git a/docs/quick-start-with-application.md b/docs/tutorials/quick-start-with-application.md similarity index 95% rename from docs/quick-start-with-application.md rename to docs/tutorials/quick-start-with-application.md index 114a588b..8b539275 100644 --- a/docs/quick-start-with-application.md +++ b/docs/tutorials/quick-start-with-application.md @@ -1,5 +1,11 @@ # Launch AI DIAL Chat with Echo Application +## Introduction + +From this tutorial, you will learn how to create and deploy a simple Echo application for AI DIAL Chat. Echo application mirrors all user prompts. + +> Take note that this document covers the most basic aspects of developing and testing AI DIAL applications. Deploying and distributing these applications for production purposes will require additional configurations that guarantee secure access to the application endpoints through the implementation of firewalls and other network security settings to prevent unauthorized intrusion to the deployed applications. + ## About AI DIAL Extension Framework AI DIAL presents a robust Extension Framework and plug-in infrastructure, enabling seamless integration of your data and business workflows with Language Models (LLM) to enrich your enterprise applications. Harness the full potential of our solutions to drive innovation and efficiency within your organization. @@ -14,12 +20,6 @@ Applications enable the customization of LLM behavior by integrating Addons with Examples of Applications: guided conversations, hierarchical search. -## Introduction - -From this tutorial, you will learn how to create and deploy a simple Echo application for AI DIAL Chat. Echo application mirrors all user prompts. - -> Take note that this document covers the most basic aspects of developing and testing AI DIAL applications. Deploying and distributing these applications for production purposes will require additional configurations that guarantee secure access to the application endpoints through the implementation of firewalls and other network security settings to prevent unauthorized intrusion to the deployed applications. - ## Prerequisites 1. Docker engine installed on your machine. Refer to [Docker](https://docs.docker.com/desktop/) documentation. @@ -36,7 +36,7 @@ From this tutorial, you will learn how to create and deploy a simple Echo applic Create a python file in your project folder and name it `app.py`. -> Refer to the [application file](./dial-docker-compose/application/echo/app.py). +> Refer to the [application file](https://github.com/epam/ai-dial/blob/restructure/docs/dial-docker-compose/application/echo/app.py). We use a [dockerfile](https://github.com/epam/ai-dial/tree/main/docs/dial-docker-compose/application/echo) to launch the Echo application. @@ -63,7 +63,7 @@ We use a [dockerfile](https://github.com/epam/ai-dial/tree/main/docs/dial-docker } ``` -## Step 4: Launch AI DIAL Chat with Echo Application +## Step 4: Launch AI DIAL Chat Run `docker compose up` in the console from the folder with the `docker-compose.yml` file. diff --git a/sidebars.js b/sidebars.js index 9afa902f..a7cc80a3 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,16 +1,3 @@ -/** - * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ - -// @ts-check - /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { CustomSideBar: [ @@ -20,9 +7,28 @@ const sidebars = { label: 'Home', // sidebar label }, 'quick-start', + { + type: 'category', + label: 'Tutorials', + items: [ + { + type: 'doc', + id: 'tutorials/quick-start-with-application', + label: 'Chat with Application', + }, + { + type: 'doc', + id: 'tutorials/quick-start-model', + label: 'Chat with OpenAI Model', + }, + { + type: 'doc', + id: 'tutorials/quick-start-with-addon', + label: 'Chat with Addon', + }, + ], + }, 'user-guide', - 'quick-start-with-addon', - 'quick-start-with-application', { type: 'category', label: 'Deployment',