Git Product home page Git Product logo

bz-cogs's Introduction

bz-cogs

A collection of interesting/niche cogs for Red-Discordbot.

Install

repo add bz-cogs https://github.com/zhaobenny/bz-cogs
cog install bz-cogs <cog>

Cogs

Name Description
aiuser Human-like Discord interactions powered by OpenAI for messages (and images).
aiemote Human-like Discord reacts to messages powered by OpenAI.
aimage A1111 Stable Diffusion image generation in Discord
oneletteronly Set nicknames to be initials for new users.

Support / suggestions?

Head to the bz-cogs server.

Or ping @Define in #support_othercogs on Red - Cog Support server.

Contributors ๐ŸŽ‰

License

MIT

bz-cogs's People

Contributors

alex-sandro92 avatar alsaiduq-lab avatar djtomato avatar hollowstrawberry avatar zhaobenny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bz-cogs's Issues

[Enhancement ] New Configurable Trigger

It would be nice if the bot would only respond when users are having a conversation with it.

How it could work in practice:

  • Bot owner sets reply_percent to something really low, like -aiuser percent 0.01
  • Users trigger a conversation via @X.XX'ing the bot, a random message, or reply_percent as per normal.

Bot may continue to reply to new messages if no more than conversation_reply_time seconds have passed since the last message.

  • conversation_reply_time = 60 (setting to zero disables the feature)
  • conversation_reply_percent = 0.5 (50% chance to trigger a reply within the conversation_reply_time time frame

This feature request is basically asking for 2 configurable variables for a new way to trigger responses.

ModuleNotFoundError in AI_User

Hello, Recent updates are giving me the error now at load time:

Traceback (most recent call last):
  File "/root/redenv/lib/python3.11/site-packages/redbot/core/core_commands.py", line 188, in _load
    await bot.load_extension(spec)
  File "/root/redenv/lib/python3.11/site-packages/redbot/core/bot.py", line 1680, in load_extension
    lib = spec.loader.load_module()
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 605, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1120, in load_module
  File "<frozen importlib._bootstrap_external>", line 945, in load_module
  File "<frozen importlib._bootstrap>", line 290, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/root/.local/share/Red-DiscordBot/data/LittleBot/cogs/CogManager/cogs/ai_user/__init__.py", line 1, in <module>
    from .ai_user import AI_User
  File "/root/.local/share/Red-DiscordBot/data/LittleBot/cogs/CogManager/cogs/ai_user/ai_user.py", line 15, in <module>
    from ai_user.prompts.image_prompt.ai_horde import AIHordeImagePrompt
ModuleNotFoundError: No module named 'ai_user.prompts.image_prompt.ai_horde'; 'ai_user.prompts.image_prompt' is not a package```

Failed to install requirements: openai>=1.3.8 and tiktoken

Currently running into this issue after upgrading Red. Might need some assistance knowing what can be done to resolve this issue.

[2023-12-19 17:18:52] [ERROR] red.downloader: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
red-discordbot 3.5.5 requires charset-normalizer==3.2.0, but you have charset-normalizer 3.3.2 which is incompatible.
red-discordbot 3.5.5 requires idna==3.4, but you have idna 3.6 which is incompatible.
ERROR: Exception:
Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 510, in run
    self._handle_target_dir(
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 565, in _handle_target_dir
    shutil.rmtree(target_item_dir)
  File "/usr/local/lib/python3.11/shutil.py", line 738, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python3.11/shutil.py", line 736, in rmtree
    os.rmdir(path, dir_fd=dir_fd)
OSError: [Errno 39] Directory not empty: '/data/cogs/Downloader/lib/regex'
[2023-12-19 17:18:52] [ERROR] red.downloader: Something went wrong when installing the following requirements: tiktoken
[2023-12-19 17:23:42] [ERROR] red.downloader: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
red-discordbot 3.5.5 requires idna==3.4, but you have idna 3.6 which is incompatible.
red-discordbot 3.5.5 requires typing-extensions==4.7.1, but you have typing-extensions 4.9.0 which is incompatible.
ERROR: Exception:
Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 510, in run
    self._handle_target_dir(
  File "/data/venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 565, in _handle_target_dir
    shutil.rmtree(target_item_dir)
  File "/usr/local/lib/python3.11/shutil.py", line 738, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python3.11/shutil.py", line 736, in rmtree
    os.rmdir(path, dir_fd=dir_fd)
OSError: [Errno 39] Directory not empty: '/data/cogs/Downloader/lib/pydantic_core'```

[Feature Request] Instruct Templating

Would it be possible to supply an option for using an instruction template using Jinja? This would significantly improve the performance of instruct models.

[aimage] Remote setup

Good morning,

I have my bot which is on Docker and my Stable Diffusion which is on a remote computer, how can I make the link between the two? I added the "--api -listen" parameters, however with these it deactivates the API /sdapi/v1/txt2img.

Aimage Seems to timeout often

Thanks for a handy cog, unfortunately it seems to timeout most of the time on lower end hardware.

I keep getting this 9 out of 10 times when running /imagine "Command 'imagine' raised an exception: NotFound: 404 Not Found" in the Docker log.
Doing some googling shows that slash commands timeout after 3 seconds if no response is given, looks like my redbot instance is too slow.
According to stackoverflow, one solution is to use defer(), any chance it can be tweaked?

ollama support (Local LLMs)

Correct me if I'm wrong but it seems the cog doesn't support locally hosted LLM models. Most notable of which would be something like Ollama, or possibly something like h2ogpt.

It'd be really nice to avoid having to pay for the usage of this cog via hosting locally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.