Oobabot

Latest version: v0.2.3

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.1.6

Not secure
New Features

Discord Hygiene Choices

I want the bot to act like an A+ human participant in your Discord server. Different servers have different behavior conventions, though, so I've added some options to change how it acts:

- `--dont-split-responses`

With this, the bot will bundle everything into a single response, rather than splitting responses by sentences.

- `--reply-in-thread`

With this, the bot will create a new thread to respond into. This can be great to keeping multiple conversational tracks organized on busy channels.

A few caveats:

- the user who summoned the bot must have "create public thread" permissions. If they don't, the bot will ignore their summon.
- when creating a thread, the bot will only be able to see the message that summoned it, and then any further replies in its thread. This might be useful in some circumstances. But it also means the bot will not have context about the conversation before the summon.

Slash commands

slash commands~
/lobotomize -- make the bot forget everything in the channel before the command is run
/say "message" -- speak as the bot

| **`/command`** | what it does |
|---------------|------------------|
| **`/lobotomize`** | make the bot forget everything in the channel before the command is run |
| **`/say "message"`** | speak as the bot |

Breaking Changes

- Oobabot doesn't add any restrictions on who can run these commands, but luckily Discord does! You can find this inside Discord by visiting "Server Settings" -> Integrations -> Bots and Apps -> hit the icon which looks like [/] next to your bot

If you're running on a large server, you may want to restrict who can run these commands. I suggest creating a new role, and only allowing that role to run the commands.

- The hard-coded token budget has been decreased from 2048 to 730. This was based on reports from users who were running models which didn't actually support 2048 tokens, myself included. This will be configurable in the future, but for now this a safer default.

- The default number of history lines has decreased from 15 to 7. This was because of the smaller token budget, but also because 15 tokens increased infrence times a lot for those running on CPUs. This is configurable with the `--history-lines` command line argument.

Notable Bugfixes

- if people are using nicknames, use them instead of their discord username
- fix regression in 0.1.5 which caused stable diffusion image generation to fail unless it ran in less than 5 seconds
- fix a regression when running on python <3.10. Python 3.8.1+ should now work.

Help Make Oobabot Better

Looking to help add to the bot? Check out [our new CONTRIBUTING.md](https://github.com/chrisrude/oobabot/blob/main/docs/CONTRIBUTING.md). You can also use the instructions there if you want the bleeding-edge changes from github, rather than waiting for a release.

**Full Changelog**: https://github.com/chrisrude/oobabot/compare/v0.1.5...v0.1.6

0.1.5

Not secure
Lots of work in this release. A few new features, but a lot of under-the-hood changes to support more in the future.

If you've forked and started to make changes, you might have trouble merging. My apologies!

BREAKING CHANGES

The command-line arguments

--stable-diffusion-negative-prompt
--stable-diffusion-negative-prompt-nsfw


have been shortened to

--sd-negative-prompt
--sd-negative-prompt-nsfw


The old ones were just annoyingly long. :)


NEW FEATURES

* More Customization
A number of command-line arguments have been added to customize more aspects of the bot's behavior:

--history-lines HISTORY_LINES
Number of lines of history to supply to the AI. This is the number
of lines of history that the AI will see when generating a response.
The default is 20.
--diffusion-steps DIFFUSION_STEPS
Number of diffusion steps to take when generating an image. The
default is 30.
--image-height IMAGE_HEIGHT
Size of images to generate. This is the height of the image in
pixels. The default is 512.
--image-width IMAGE_WIDTH
Size of images to generate. This is the width of the image in
pixels. The default is 512.
--image-words [IMAGE_WORDS ...]
One or more words that will indicate the user is requeting an image
to be generated.
--stable-diffusion-sampler STABLE_DIFFUSION_SAMPLER, --sd-sampler STABLE_DIFFUSION_SAMPLER
Sampler to use when generating images. If not specified, the one set
on the AUTOMATIC1111 server will be used.

* add FAQ

Major Bugfixes
There was a bug earlier with unsolicited replies, which would cause the bot to respond to every message in a channel for the first 2 minutes after it was pinged. The intended behavior was for it to only have a percentage chance of replies.

This has been fixed, and the bot is a bit less chatty. I've tweaked the response changes a bit as a result to keep some of the chattiness, but now it will chill sometimes, which is nice.

Internal Changes

If you've been looking at contributing, this might be a good time. I've made some changes to make the code a bit more easier to understand and maintain, at least in my opinion.

The purpose of these changes was to:
- make the code easier to contribute to, maintain, and write tests for
- limit discord-specific logic to a small number of files, so that things are easier in the future if we add other messaging integrations
- centralize all settings to afford even more user customization later

Here's a quick tour of the main bits in the new structure:

important but nonexciting parts
* oobabot.py - main, sets up and runs everything
* ooba_client.py - oobabooga client http API <> python
* sd_client.py - stable diffusion client http API <> python
* settings.py - reads user-customizable settings

Bot brains
* discord_bot.py - connects to Discord, monitors for messages, sends replies
* image_generator.py - generates images and posts them, UI to redo images
* decide_to_respond.py - chooses which messages to reply to
* prompt_generator.py - generates the prompt sent to Oobabooga
* repetition_tracker.py - watches for bot loops and tries to stop them

Utilities
* http_client.py - http client, used by both sd_client and ooba_client
* response_stats.py - logs operational stats
* sentence_splitter.py - splits a stream of tokens into sentences
* types.py - defines generic versions messaging objects
* templates.py - creates all UI messages and bot prompts

Hopefully this will make things easier to understand!

Immediate upcoming work which will be supported by this change is:
* allowing users full control over the prompt sent to the bot
* exposing more knobs about the bot's responsiveness, temperature, etc.

**Full Changelog**: https://github.com/chrisrude/oobabot/compare/v0.1.4...v0.1.5

0.1.4

Not secure
** New Features **

*** image generation via Stable Diffusion! ***
oobabot can now connect to a Stable Diffusion server running AUTOMATIC1111's web ui, and generate images based on user requests. See README.md for more.


** Improvements / Bugfixes **
- move from websockets library to using aiohttp for everything. This allows us to pipeline requests, which should fix the problem of OOM errors when multiple requests come in at once.
- AI deadlock detection -- notice when the AI is stuck in a "loop", repeating the same message over and over again, and remove chat context to get it into a "fresh" state
- removed --local-repl feature, which was becoming increasingly difficult to support as more features were added. Improved the startup-time tests, which should be able to report well if things are not configured correctly

**Full Changelog**: https://github.com/chrisrude/oobabot/compare/v0.1.3...v0.1.4

0.1.3

Not secure
add "unsolicited reply" feature. Oobabot now has a chance of continuing an active conversation once it's started without the need for a wake-word in every message.

add tests, improve code formatting

awareness of the token budget of the LLM, will throw an error if the persona prompt is too long

**Full Changelog**: https://github.com/chrisrude/oobabot/compare/v0.1.2...v0.1.3

0.1.2

Not secure
Now with typing indicator!

0.1.0

Not secure
Initial proof of concept.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.