Skip to content

TheLoneStar033/AI-DSBot-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Discord Bot Template (Ollama)

A clean, specialized Discord bot template designed to interact with a local Ollama AI instance.

Features

  • Integrated with Ollama: Chat with models like Llama 2, Gemma, Mistral, etc.
  • Concurrency Limit: Ensures only one request is processed at a time to save resources.
  • System Prompt: Configurable persona for your AI.
  • Modern Stack: Built with discord.js v14 and commandkit.

Prerequisites

  1. Node.js (v18 or higher)
  2. Ollama: Installed and running locally. Download Ollama
  3. Discord Bot Token: From the Discord Developer Portal.

Setup

  1. Clone the repository (or just use this folder).
  2. Install dependencies:
    npm install
  3. Configure Environment:
    • Rename .env.example to .env.
    • Fill in your TOKEN and CLIENT_ID.
    • Set your OLLAMA_MODEL (e.g., gemma:2b, llama2).
  4. Run the Bot:
    node src/index.js

Usage

  • Use /ask to chat with the AI.
  • Example: /ask prompt: "Tell me a joke"

Customization

  • Change Model: Update OLLAMA_MODEL in .env.
  • Change Persona: Update OLLAMA_SYSTEM_PROMPT in .env.

About

Use this Template to Create Your Own AI-DiscordBot Powered Locally Through Ollama!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors