ChatApp is a console application that simulates a chat assistant designed to sell an internet plan to a customer. The assistant uses the OpenAI-compatible API to generate responses and is configured to be persistent and persuasive.
It's currently using the free Groq API.
- .NET 9.0 SDK or later
- A Groq API key
-
Clone the repository:
git clone <repository-url> cd llm-chat
-
Add User Secrets: The project uses user secrets to store sensitive information like the API key. To add your secrets, run the following commands:
dotnet user-secrets init dotnet user-secrets set "GroqApiKey" "<your-groq-api-key>" dotnet user-secrets set "ModelName" "<model-name>" dotnet user-secrets set "BaseUrl" "<base-url>"
You can get an API key from Groq dev console.
The available models are listed here. I suggest Llama because it has a larger context window.
The OpenAI-compatible base URL can be found here.
- Restore dependencies:
dotnet restore
-
Build the project:
dotnet build
-
Run the project:
dotnet run
- The application will start and display a welcome message.
- Type your messages and press Enter to interact with the chat assistant.
- Type
exit
to exit the chat.
This project is licensed under the MIT License.