Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.57 KB

README.md

File metadata and controls

58 lines (43 loc) · 1.57 KB

ChatApp

Overview

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.

Prerequisites

  • .NET 9.0 SDK or later
  • A Groq API key

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd llm-chat
  2. 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.

  1. Restore dependencies:
    dotnet restore

Running the Application

  1. Build the project:

    dotnet build
  2. Run the project:

    dotnet run

Usage

  • 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.

License

This project is licensed under the MIT License.