Skip to content

Collection of Python scripts that integrate large language models (LLMs) into Discord bots using Ollama

License

Notifications You must be signed in to change notification settings

pet6r/DiscordWhispers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiscordWhispers

This repository contains three distinct Discord bots, each utilizing large language models (LLMs) for different purposes: Syntax, Satoshi, and Lain. Each bot provides unique functionalities, from coding assistance to image analysis and conversational interactions.

Whisper Overview:

  • Syntax: A bot designed to assist with code generation, code improvement, debugging, and explanations using a coding-focused LLM model.
  • Satoshi: A bot designed for image analysis, allowing users to upload images for detailed LLM-powered insights.
  • Lain: A conversational bot designed for reflective interactions, leveraging an LLM model to respond intelligently to user prompts.

Requirements:

  • Python 3.8+
  • Discord bot tokens for each respective bot
  • Ollama

Installation:

  1. Clone the Repository:

    git clone https://github.com/pet6r/DiscordWhispers.git
    cd DiscordWhispers
  2. Install Dependencies: Install all dependencies required for running any of the three bots:

    pip install -r requirements.txt
  3. Set Up Environment Variables: Each bot requires its own Discord bot token to run. You will need to create a .env file and add your tokens. Use the following template:

    # For running Syntax:
    SYNTAX_TOKEN=your-syntax-bot-token
    
    # For running Satoshi:
    SATOSHI_TOKEN=your-satoshi-bot-token
    
    # For running Lain:
    LAIN_TOKEN=your-lain-bot-token
  4. Running the Bots:

    • Syntax: A bot for assisting with code-related tasks:
      python syntax.py
    • Satoshi: A bot that analyzes images uploaded to Discord:
      python satoshi.py
    • Lain: A conversational bot designed for reflective interactions:
      python lain.py

Customization:

  • Changing the LLM Model: Each bot uses a different LLM model by default (e.g., deepseek-coder-v2 for Syntax, dolphin-llama3:8b for Lain). You can update the models by editing the chat_with_* function inside each bot's script. Use Ollama to download various models.

Usage Examples:

  1. Syntax: Mention @Syntax in a message for coding-related questions:

    @syntax can you help me write a Python function?
    
  2. Satoshi: Upload an image and mention @Satoshi to receive insights:

    @Satoshi what do you see in this image?
    
  3. Lain: Mention @Lain for a reflective, concise conversation:

    @Lain what is the meaning of life?
    

About

Collection of Python scripts that integrate large language models (LLMs) into Discord bots using Ollama

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages