Skip to content

Alcheri/Asyncio

Repository files navigation

Puss logo

Asyncio ChatGPT Plugin for Limnoria

Asynchronous AI Chat for Limnoria IRC

Latest Release Tests Lint CodeQL Python Code style: black Limnoria License

Download Latest Release


Asyncio is a production-ready AI chat plugin for Limnoria IRC bots.
It provides safe multi-user behaviour with per-channel memory isolation,
moderation, cooldowns, and a math mode that answers in ≤ 6 lines.


Overview

Asyncio brings modern asynchronous AI chat to Limnoria. It supports natural conversation, math queries, multi-user concurrency, and safe behaviour across channels. The plugin is designed for reliability, clarity, and minimal configuration.

Prerequisites

Before installing, ensure you have:

  • A valid OpenAI account — OpenAI Platform
  • A newly generated API key
  • Awareness of OpenAI pricing and usage terms
  • A .env file in your bot’s root directory (~/runbot) containing:
OPENAI_API_KEY="your_api_key_here"

Python requirements:

  • Python 3.9+
  • asyncio
  • openai
  • python-dotenv

Installation

Navigate to your Limnoria plugin directory (usually ~/runbot/plugins) and clone the repository:

git clone https://github.com/Alcheri/Asyncio.git

Install the plugin’s dependencies:

pip install --upgrade -r requirements.txt

Load the plugin into your bot:

/msg yourbot load Asyncio

Configuration

The plugin exposes several settings through Limnoria’s configuration system:

  • supybot.plugins.Asyncio.botnick — the bot’s speaking name
    Default: "Assistant"

  • supybot.plugins.Asyncio.language — response dialect
    Options: American, Australian, British, Canadian
    Default: British

Usage Examples

@chat good morning
Puss Good morning, SomeNick! How can I help you today?

@chat Tell me a joke
Puss Processing your message...
Puss Sure thing! Why did the kangaroo cross the road?
Puss Because it was the chicken’s day off! 🦘😄

@chat What is 3 ** 3?
Puss Processing your message...
Puss 3 ** 3 means 3 raised to the power of 3.
Puss 3 * 3 * 3 = 27
Puss Final answer: 27

Solving word problems

@chat A farm has chickens and cows. There are 50 heads and 130 legs. How many of each?

Puss Processing your message...
Puss Let the number of chickens be C and cows be W.
Puss C + W = 50
Puss 2C + 4W = 130
Puss Solving gives C = 35 and W = 15.
Puss Final answer: 35 chickens and 15 cows.

The plugin handles arithmetic, algebra, and natural-language math queries, always returning concise, readable answers.

Notes

  • asyncio provides the asynchronous event loop used for concurrent chat handling.
  • openai is the official Python client for the OpenAI API.
  • python-dotenv securely loads environment variables from .env.



Copyright © MMXXVI, Barry Suridge

About

An asynchronous OpenAI plugin for Limnoria.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages