Please make sure the following prerequisites are in place prior to deploying this accelerator:
-
Azure OpenAI: To deploy and run the solution accelerator, you'll need an Azure subscription with access to the Azure OpenAI service. Request access here. Once you have access, follow the instructions in this link to deploy the gpt-35-turbo or gpt-4 models.
-
Setup GitHub or Azure AD for Authentication: The add an identity provider section below shows how to configure authentication providers.
Note You can configure the authentication provider to your identity solution using NextAuth providers
Azure Chat Solution Accelerator powered by Azure Open AI Service solution accelerator is built using the following technologies:
-
Node.js 18: an open-source, cross-platform JavaScript runtime environment.
-
Next.js 13: enables you to create full-stack web applications by extending the latest React features
-
NextAuth.js: configurable authentication framework for Next.js 13
-
ai sdk Open-source library that simplifies building conversational UI on top Next.js and JavaScript
-
Tailwind CSS: is a utility-first CSS framework that provides a series of predefined classes that can be used to style each element by mixing and matching
-
shadcn/ui: re-usable components built using Radix UI and Tailwind CSS.
-
Azure Cosmos DB: fully managed platform-as-a-service (PaaS) NoSQL database to store chat history
-
Azure OpenAI: Azure OpenAI Service provides REST API access to OpenAI's powerful language models including the GPT-4, GPT-35-Turbo, and Embeddings model series.
-
Azure App Service: fully managed platform-as-a-service (PaaS) for hosting web applications, REST APIs, and mobile back ends.
The following Azure services can be deployed to expand the feature set of your solution:
-
Azure Document Intelligence Microsoft Azure Form Recognizer is an automated data processing system that uses AI and OCR to quickly extract text and structure from documents. We use this service for extracting information from documents.
-
Azure Cognitive Search Azure Cognitive Search is an AI-powered platform as a service (PaaS) that helps developers build rich search experiences for applications. We use this service for indexing and retrieving information.
-
Azure OpenAI Embeddings for embed content extracted from files.
-
Azure Speech Service: Speech recognition and generation with multi-lingual support and the ability to select and create custom voices.
The following high-level diagram depicts the architecture of the solution accelerator:
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. However, you can try the Azure pricing calculator - Sample Estimate for the resources below.
- Azure App Service: Premium V3 Tier 1 CPU core, 4 GB RAM, 250 GB Storage. Pricing per hour. Pricing
- Azure Open AI: Standard tier, ChatGPT and Embedding models. Pricing per 1K tokens used, and at least 1K tokens are used per question. Pricing
- Form Recognizer: SO (Standard) tier using pre-built layout. Pricing per document page, sample documents have 261 pages total. Pricing
- Azure Cognitive Search: Standard tier, 1 replica, free level of semantic search. Pricing per hour.Pricing
- Azure Cosmos DB: Standard provisioned throughput with ZRS (Zone-redundant storage). Pricing per storage and read operations. Pricing
- Azure Monitor: Pay-as-you-go tier. Costs based on data ingested. Pricing
To reduce costs, you can switch to free SKUs for Azure App Service, Azure Cognitive Search, and Form Recognizer by changing the parameters file under the ./infra
folder. There are some limits to consider; for example, you can have up to 1 free Cognitive Search resource per subscription, and the free Form Recognizer resource only analyzes the first 2 pages of each document. You can also reduce costs associated with the Form Recognizer by reducing the number of documents you upload.
Warning To avoid unnecessary costs, remember to destroy your provisioned resources by deleting the resource group.