Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Azure-Samples/chat-csharp-cosmos-db-nosql-openai
Sample chat application using Azure Cosmos DB for NoSQL, Azure OpenAI, Azure Container Apps, and Azure Container Registry
https://github.com/Azure-Samples/chat-csharp-cosmos-db-nosql-openai
asp-net azd-templates azure azure-container-apps azure-cosmos-db blazor chat csharp docker nosql training
Last synced: 2 months ago
JSON representation
Sample chat application using Azure Cosmos DB for NoSQL, Azure OpenAI, Azure Container Apps, and Azure Container Registry
- Host: GitHub
- URL: https://github.com/Azure-Samples/chat-csharp-cosmos-db-nosql-openai
- Owner: Azure-Samples
- License: mit
- Created: 2023-12-05T16:20:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-22T16:40:21.000Z (8 months ago)
- Last Synced: 2024-07-29T17:04:29.274Z (5 months ago)
- Topics: asp-net, azd-templates, azure, azure-container-apps, azure-cosmos-db, blazor, chat, csharp, docker, nosql, training
- Language: HTML
- Homepage: https://learn.microsoft.com/training/modules/build-chat-bot-azure-cosmos-db-openai-blazor/
- Size: 240 KB
- Stars: 4
- Watchers: 22
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT
Awesome Lists containing this project
README
# Chat application with Azure Cosmos DB for NoSQL and Azure OpenAI
This sample chat application answers questions from the user and tracks chat history across conversations.
![Screenshot of the application with multiple conversation streams and an active conversation on the seating capacity for a sports stadium.](assets/screenshot.png)
## Quickstart
Use the [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli) to get started with this project quickly.
### Prerequisites
> This template will create infrastructure and deploy code to Azure. If you don't have an Azure Subscription, you can sign up for a [free account here](https://azure.microsoft.com/free/). Make sure you have the contributor role in the Azure subscription.
- [Azure Developer CLI](https://aka.ms/azd-install)
- [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)### Instructions
1. Log in to AZD.
```bash
azd auth login
```> [!NOTE]
> This is only required once per install.1. Initialize the project in the current directory.
```bash
azd init --template chat-csharp-cosmos-db-nosql-openai
```1. Deploy the services to Azure, build your container, and deploy the application.
```bash
azd up
```### Making changes
If you make changes to the application code, you can run `azd deploy` to deploy the latest version of your application code.
## Development container
A development container is available with [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0), [Azure CLI](https://learn.microsoft.com/cli/azure/), and [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli) already pre-installed.
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Azure-Samples/chat-csharp-cosmos-db-nosql-openai?quickstart=1)
## Technology stack
This application uses [ASP.NET Core Blazor](https://learn.microsoft.com/aspnet/core/blazor) and the [C#](https://learn.microsoft.com/dotnet/csharp/) programming language.
### Azure services
These services are deployed to Azure
| | Description |
| --- | --- |
| **[Azure Cosmos DB for NoSQL](https://learn.microsoft.com/azure/cosmos-db/nosql/)** | History and data storage |
| **[Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai)** | Chat completion |
| **[Azure Container Registry](https://learn.microsoft.com/azure/container-registry)** | Docker container registry |
| **[Azure Container Apps](https://learn.microsoft.com/azure/container-apps)** | Web application host |