aspire-ai-chat-demo  by davidfowl

Full-stack chat sample for a ChatGPT-like experience

created 5 months ago
293 stars

Top 91.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a full-stack chat application demonstrating a ChatGPT-like experience, targeting developers interested in modern .NET, React, and AI integration. It offers a reference implementation for building conversational AI interfaces with local or cloud-based LLMs.

How It Works

The backend utilizes ASP.NET Core with Microsoft.Extensions.AI for LLM interaction, abstracting model communication via IChatClient and streaming responses. Data persistence is handled by Entity Framework Core with PostgreSQL, including migrations for schema management. For AI inference, it defaults to Ollama (via OllamaSharp) for local execution and can switch to OpenAI for production. The frontend is a React application served by Caddy.

Quick Start & Requirements

  • Install: Run the AIChat.AppHost project (requires .NET Aspire).
  • Prerequisites: .NET 9.0, Docker or Podman, Node.js (LTS).
  • Setup: Automatic PostgreSQL creation and migration via Aspire. Configuration for OpenAI API keys is required for cloud-based LLM usage.

Highlighted Details

  • Full-stack .NET Aspire orchestration.
  • Local inference via Ollama and cloud via OpenAI.
  • Streamed JSON array responses for chat.
  • Entity Framework Core with PostgreSQL for data persistence.

Maintenance & Community

The project is authored by davidfowl, a prominent figure in the .NET community. Further community engagement details are not specified in the README.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The application is presented as a demo and may not be production-ready without further hardening. It relies on specific versions of .NET and requires containerization tools.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
55 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.