aspire-ai-chat-demo

aspire-ai-chat-demo

None

Stars: 53

Visit
 screenshot

Aspire AI Chat is a full-stack chat sample that combines modern technologies to deliver a ChatGPT-like experience. The backend API is built with ASP.NET Core and interacts with an LLM using Microsoft.Extensions.AI. It uses Entity Framework Core with CosmosDB for flexible, cloud-based NoSQL storage. The AI capabilities include using Ollama for local inference and switching to Azure OpenAI in production. The frontend UI is built with React, offering a modern and interactive chat experience.

README:

Aspire AI Chat

Aspire AI Chat is a full-stack chat sample that combines modern technologies to deliver a ChatGPT-like experience.

High-Level Overview

  • Backend API:
    The backend is built with ASP.NET Core and interacts with an LLM using Microsoft.Extensions.AI. It leverages IChatClient to abstract the interaction between the API and the model. Chat responses are streamed back to the client using stream JSON array responses.

  • Data & Persistence:
    Uses Entity Framework Core with CosmosDB for flexible, cloud-based NoSQL storage. This project utilizes the new preview CosmosDB emulator for efficient local development.

  • AI & Chat Capabilities:

    • Uses Ollama (via OllamaSharp) for local inference, enabling context-aware responses.
    • In production, the application switches to Azure OpenAI for LLM capabilities.
  • Frontend UI:
    Built with React, the user interface offers a modern and interactive chat experience. The React application is built and hosted using Caddy.

Getting Started

Prerequisites

Running the Application

Run the AIChat.AppHost project. This project uses
.NET Aspire
to run the application in a container.

Configuration

  • By default, the application uses Ollama for local inference.
  • To use Azure OpenAI, set the appropriate configuration values (e.g., API keys, endpoints).
  • Ensure CosmosDB Emulator is running locally or configure an external CosmosDB instance.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for aspire-ai-chat-demo

Similar Open Source Tools

For similar tasks

For similar jobs