Azure-Samples / cosmosdb-chatgpt

Sample application that combines Azure Cosmos DB with Azure OpenAI ChatGPT service
MIT License
257 stars 310 forks source link

page_type: sample languages:

Build a Copilot app using Azure Cosmos DB & Azure OpenAI Service

This sample application shows how to build a Generative-AI application using Azure Cosmos DB using its new vector search capabilities and Azure OpenAI Service and Semantic Kernel. The sample provides practical guidance on many concepts you will need to design and build these types of applications.

Cosmos DB + ChatGPT user interface

Concepts Covered

This application demonstrates the following concepts and how to implement them:

Getting Started

Prerequisites

This lab utilizes a preview feature, Vector search for Azure Cosmos DB for NoSQL which requires preview feature registration. Follow the below steps to register. You must be enrolled before you can deploy this solution:

  1. Navigate to your Azure Cosmos DB for NoSQL resource page.
  2. Select the "Features" pane under the "Settings" menu item.
  3. Select for “Vector Search in Azure Cosmos DB for NoSQL”.
  4. Read the description to confirm you want to enroll in the preview.
  5. Select "Enable" to enroll in the preview.

Instructions

  1. Log in to AZD.

    azd auth login

    [!NOTE]
    This is only required once per install.

  2. Initialize the project in the current directory.

    azd init --template cosmosdb-chatgpt
  3. Deploy the services to Azure, build your container, and deploy the application.

    azd up

Quickstart

This solution has a number of quickstarts than you can run through to learn about the features in this sample and how to implement them yourself.

Please see Quickstarts

Clean up

To remove all the resources used by this sample, delete the resource group for your deployment.

Resources

To learn more about the services and features demonstrated in this sample, see the following: