# 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="/files/3O0sH2yWMKavfHQ9iNYx" alt=""><figcaption><p>Example use</p></figcaption></figure>

### Resources

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lilypad.tech/lilypad/tooling-plugins-and-integrations/ai-tooling/lilypad-llama3-chatbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
