This project is an AI chat application that demonstrates how to chat with custom data using an AI language model. I used Microsoft's .NET AI Template in this example.
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.
To use models hosted by GitHub Models, you will need to create a GitHub personal access token with models:read
permissions, but no other scopes or permissions. See Prototyping with AI models and Managing your personal access tokens in the GitHub Docs for more information.
Configure your token for this project using .NET User Secrets:
-
In Visual Studio, right-click on your project in the Solution Explorer and select "Manage User Secrets".
-
This opens a
secrets.json
file where you can store your API keys without them being tracked in source control. Add the following key and value:{ "GitHubModels:Token": "YOUR-TOKEN" }
Learn more about prototyping with AI models using GitHub Models.