Skip to content

andrewlock/ModernDotNetShowChat

Repository files navigation

AI Chat with Custom Data

This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. Please note that this template is currently in an early preview stage. If you have feedback, please take a brief survey.

Note

Before running this project you need to configure the API keys or endpoints for the providers you have chosen. See below for details specific to your choices.

Configure the AI Model Provider

Using GitHub Models

To use models hosted by GitHub Models, you will need to create a GitHub personal access token. The token should not have any scopes or permissions. See Managing your personal access tokens.

From the command line, configure your token for this project using .NET User Secrets by running the following commands:

cd ModernDotNetShowChat.AppHost dotnet user-secrets set ConnectionStrings:openai "Endpoint=https://models.inference.ai.azure.com;Key=YOUR-API-KEY"

Learn more about prototyping with AI models using GitHub Models.

Running the application

Using Visual Studio

  1. Open the .sln file in Visual Studio.
  2. Press Ctrl+F5 or click the "Start" button in the toolbar to run the project.

Using Visual Studio Code

  1. Open the project folder in Visual Studio Code.
  2. Install the C# Dev Kit extension for Visual Studio Code.
  3. Once installed, Open the Program.cs file in the ModernDotNetShowChat.AppHost project.
  4. Run the project by clicking the "Run" button in the Debug view.

Trust the localhost certificate

Several .NET Aspire templates include ASP.NET Core projects that are configured to use HTTPS by default. If this is the first time you're running the project, an exception might occur when loading the Aspire dashboard. This error can be resolved by trusting the self-signed development certificate with the .NET CLI.

See Troubleshoot untrusted localhost certificate in .NET Aspire for more information.

Learn More

To learn more about development with .NET and AI, check out the following links:

About

An AI chat application for interrogating the transcripts of the the Modern .NET Show https://dotnetcore.show/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published