jaison-core

jaison-core

General AI companion Discord bot

Stars: 216

Visit
 screenshot

J.A.I.son is a Python project designed for generating responses using various components and applications. It requires specific plugins like STT, T2T, TTSG, and TTSC to function properly. Users can customize responses, voice, and configurations. The project provides a Discord bot, Twitch events and chat integration, and VTube Studio Animation Hotkeyer. It also offers features for managing conversation history, training AI models, and monitoring conversations.

README:

J.A.I.son

Setup | Linking Twitch | Customizing responses | Customizing voice | Configuration | Running bot

Setup

This was made with Python v3.12.18. It was ran in WSL2 Ubuntu and Windows, running an Intel CPU with an RTX 4070 with the latest drivers installed. This is unlikely to be runnable for non-Nvidia systems without stripping code in its current state.

Step 1: Before starting

TO AVOID DEPENDENCY ISSUES, IT IS HIGHLY ADVISED TO USE CONDA FOR YOUR VIRTUAL ENVIRONMENT

  1. Install CUDA
  2. Install conda for managing virtual environment (Miniconda is recommended)

Step 2: Setting up plugins

You can find plugins for components (things that generate responses) and applications (things that use Project J.A.I.son) in the Discord or on my GitHub. These are community projects, so anyone can make and upload their own plugins. Each one has their own setup guide, so follow that.

To link this project to components, list the available components in your plugins config (./configs/plugins/example.yaml by default). Endpoint is for if you deploy the plugin prior to running this project (saves development time, deploy on another machine, and doesn't shut down when this project terminates), or you can specify the path to the directory (this project will automatically boot it up for you, but it takes some time and can only be deployed on the same machine).

You will need STT, T2T, TTSG, and TTSC components for this project to work currently. Here are some that I've made:

To link this project to applications, simply run those applications separately after jaison-core is running. jaison-core does not manage those applications as of writing. Here are some that I've made:

Step 3:Configuration

You can find jaison-core config files under ./configs/jaison. Below is a description of the values:

  • prompt_default_file: (str) A prompt filename within ./prompts/production. Must be in this file and is just the file name.
  • prompt_params: (dict) Map of variables in a prompt to their actual value (look at a prompt file to see what variables exist)
  • prompt_name_translation_file: (str) A name translation filename within ./configs/translations. Must be in this file and is just the file name.
  • prompt_convo_retention_length: (int) Length of main conversation history to keep for generating T2T responses
  • plugins_config_file: (str) File name under ./configs/plugins. Must be in this file and is just the file name.
  • active_plugins: (List[str]) List of component plugins to use. Can only have 1 of each type as of writing. Should be the id as found in that component's metadata.yaml.
  • web_port: (int) Port to serve as application API and websocket server

You can also add name aliases (replacing usernames with an actual name) by adding to the config in ./configs/translations

Step 4: Setting up environment

It is recommended to work from within a conda virtual environment. Assuming you are using conda:

Create and activate environement. Install dependencies in this order. You will need your machine-specific command to install pytorch from here.

conda create -n jaison-core python=3.12 ffmpeg cudatoolkit -c pytorch -y
conda activate jaison-core
pip install -r requirements.txt

Running bot

Step 1: Ensure dependency apps are running

  1. Ensure any plugins specified as endpoints are up and running

Step 2: Ensure your using the right environment

Ensure you are using the right environment:

conda activate jaison-core

Step 3: Start running

To run, simply use the following from the project root:

python ./src/main.py --config=config.json

To get a full list of options, run:

python ./src/main.py --help

Logging

Logs are stored in ./logs by default. Changing the log directory (an option when starting the project) requires the new directory to subfolders sys, dialog, and response.

sys contains system logs for each of the main application, VTube studio plugins, and the Discord bot. Only certain logs are sent to the console as well, but all logs are sent to files (except for those generated by dependencies such as Discord.py).

dialog contains the entire conversation history in the same format used for generating T2T responses. This is useful for creating new datasets and monitoring conversations.

response contains entries immediately usable to train T2T AI models. These contain the time, system prompt, user prompt, and generated response for every response made by the T2T model in use. This is useful for cherrypicking favorable responses to retrain the model on.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for jaison-core

Similar Open Source Tools

For similar tasks

For similar jobs