Frequently Asked Questions - Starlii10/vivia GitHub Wiki
Frequently Asked Questions
This page should address some questions and common issues related to Vivia.
AI
Chatting with Vivia blocks every other action
Fixed in Vivia 20241127. If you're experiencing this bug, try updating Vivia.
llama-cpp-python's chat response creation is a blocking function; that is, it prevents all other code from running, including Vivia's. I've been trying to find a workaround for this, however because of my inexperience I can't quite get it working right. If you know how to fix it, please tell me (preferably through a pull request).
Vivia talks strangely/gives false information
The system prompt (shortened to "sysprompt") given to Vivia isn't perfect. It's improving over time, however it has the same limitations as any other AI chatbot: she may give inaccurate information or talk in weird ways.
What data does Vivia use to create her responses?
In addition to the user's message and attachments, Vivia uses some information about her environment, such as:
- the name of the server
- the category and name of the channel
- her current status
- the user's name and status
- any previous messages from the user, and her responses to those messages
Message history can be deleted by running v!clearhistory
.
Text extraction doesn't work very well
This is a limitation of Tesseract; it can occasionally make mistakes or straight up just not work. Vivia works best on images with high contrast between the background and text.
Alternatively, you can always describe the image yourself within your prompts.
Administrators/Server Owners
I'm getting a no permissions message when running Vivia commands
Ensure that the people that should be running admin commands have the Vivia Admin role (any role with that name will work, not just the one Vivia makes when she is first added to the server).
Moderation commands from viviabase.moderation-essentials
only require the user to have permissions to perform that action (Ban Members for /ban, Kick Members for /kick, etc.).
How do I prevent people from chatting with Vivia?
Run /setting aiEnabled False
. Note that this disables AI functionality for all users in the server. Per-role AI toggles coming soon™.
Lore
Why do you keep referring to Vivia as "she"?
I like to imagine Vivia is actually sentient - she can make her own decisions, but still decides to be a helper bot. It's also the reason why Vivia has much more personality than other Discord bots.
Self-Hosting
I'm getting the "That's for the bot owner, not random users..." message
Vivia versions before 20240910 stored the bot owner's Discord user ID in the config.ini. This is no longer the case, as Vivia will now check the application data from Discord for the owner instead. If you get this message and are the owner of the bot, updating Vivia will usually fix this. Otherwise add your Discord user ID to config.ini.
Note that this is not the same as the no permissions message (see above).
I added a new command to Vivia but it isn't showing up in the command list!
Run v!sync
to sync the command tree. This takes about an hour to update and show the new command across all servers. Alternatively, you can sync for a single server by passing its ID into the sync command, or use text commands (v!)
If none of these work, ensure the extension the command is a part of is adding the command in the setup()
function (bot.add_command()
) and that it's loaded properly (v!extensions
).
Errors while getting server quotes, configuration, warns, etc.
Server-specific data might not have been created when Vivia was first added to that server. Try running v!fixconfig
to regenerate any missing files.
If problems continue, you may need to manually delete the folder for your server and then run v!fixconfig
to fully reset the configuration. Note that this will wipe everything (including warns, options, and quotes) and you'll have to set them back up.
ViviaBase
What is ViviaBase?
ViviaBase is an extension package made by Starlii. It contains these extensions as of the current Vivia version (20241127):
viviabase.help
- a help command that works with custom extensionsviviabase.ping
- a simple command to get Vivia's pingviviabase.channelmaker
- a tool to quickly make categories and channelsviviabase.quotes
- a fun command set to make and send quoted messagesviviabase.moderation-essentials
- a basic set of moderation commands such as warning and banning usersviviabase.namegenerator
- a way to quickly make random namesviviabase.purge
- a quick purge command
Can I remove the ViviaBase extensions?
ViviaBase can be removed without any issues if you don't want it.
I made a custom extension and would like to include it in ViviaBase
DM me on Discord (@starlii10) with the extension. I'll consider it!
Development
How do I create/add custom commands for Vivia?
The commands folder contains all of Vivia's base commands, as well as any custom ones. It also contains a template for a custom extension, which you can modify to fit your needs.
Place your extension into the commands folder and Vivia will handle the rest. Any additional imports you might need should go in the extras folder (some base functions can be found in ViviaTools, such as personality messages and getting server configuration data).
Note that loading random extensions from the internet is probably not a good idea. Extensions are like any other Python scripts, and can cause damage if misused. Always check the code of an extension before loading it with Vivia.
How do I make custom self-contained extensions (VSEs)?
VSEs are in beta. Please report any bugs found while using them.
VSEs are simply zipped archives containing an extension's Python file, as well as any data it might need (eg. personality messages, help messages, etc.). Simply place an extension and its data inside a folder, with a layout like this:
extension
| extension.py
| extension-help.txt
| personalityMessages
| | messages.json
| | vivia.json
Then zip the folder and change its file extension to .vse. Copy it into Vivia's command folder and she'll handle extracting and loading it.
My custom extension didn't load
Extensions must have a setup()
function with a bot
argument (see discord.py documentation). If this is present, then it's likely that the extension itself contains errors.
I made some useful changes to Vivia's code
Please submit them as a pull request! It really helps, considering I have no idea what I'm doing 75% of the time.