# Lilypad Llama3 Chatbot

The **Lilypad Llama3 Chatbot** is a conversational agent designed to deliver engaging, real-time AI-powered interactions. Leveraging the Llama3 8B model through the Lilypad API, this chatbot provides context-aware and dynamic responses, making it useful for applications such as automated support, interactive Q\&A and virtual assistance.

### **Features**

* **AI-Powered Conversations** – Utilizes Llama3 8B via the Lilypad Network to generate intelligent responses.
* **Lilypad API Connectivity** – Simple integration with Lilypad, allowing flexible use of all available models on the Lilypad API.

This chatbot can be extended with:

* **Memory & Context Awareness** – Store conversation history for more personalized interactions.
* **External APIs** – Integrate with knowledge bases, search engines, or database lookups.
* **Multi-Model AI** – Swap Llama3 with other AI models as needed.

### **How It Works**

1. **User Input** – The chatbot interface captures the user's message.
2. **API Request** – The message is sent to the Lilypad API, which runs the job on the Llama3 model.
3. **Response Generation** – Llama3 processes the input, considers context and generates a natural language response.
4. **Response Display** – The response is rendered in the chatbot interface.

### **Prerequisites**

* [**Node.js**](https://nodejs.org/en) – 18 LTS or newer

### **Installation**

1. Get [Anura API key](https://anura.lilypad.tech/).
2. Clone the repository:

   ```sh
   git clone https://github.com/PBillingsby/lilypad-llama3-chatbot.git
   cd lilypad-llama3-chatbot
   ```
3. Install dependencies: `npm install`
4. Add the Lilypad API key to `.env`: `LILYPAD_API_TOKEN=<ANURA_API_KEY>`
5. Start the development server: `npm run dev`

### **Usage**

Access the chatbot at: `http://localhost:3000` and enter prompt to start a conversation.

<figure><img src="https://58337262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtadiyoOe4nTUoSulEVOV%2Fuploads%2F7yGKJ2kbgdiNx2uVZyfU%2FScreenshot%202025-03-12%20at%2012.14.17%E2%80%AFPM.png?alt=media&#x26;token=4d7563d4-9098-4621-ae47-1ee16c842a2a" alt=""><figcaption><p>Example use</p></figcaption></figure>

### Resources

* [Source code](https://github.com/PBillingsby/lilypad-llama3-chatbot)
