Tailchat Assistant is your very own AI-powered chat bot, ready to implement into your guild!
Go to file
2024-07-25 00:37:16 -04:00
.husky Upload to public 2024-06-18 21:49:56 +00:00
src Different console log if data is non existent 2024-07-24 16:54:32 -04:00
.env.example Initial implementation of the new message storage 2024-07-23 13:34:34 -04:00
.gitignore Initial implementation of the new message storage 2024-07-23 13:34:34 -04:00
.prettierrc Upload to public 2024-06-18 21:49:56 +00:00
LICENSE Upload to public 2024-06-18 21:49:56 +00:00
package-lock.json Use dotenv 2024-07-14 13:48:25 -04:00
package.json Use dotenv 2024-07-14 13:48:25 -04:00
README.md Add contact info 2024-07-01 22:11:40 -04:00
tsconfig.json Update configs 2024-07-06 01:32:52 +00:00

Tailchat-Assistant

Tailchat Assistant is your very own AI-powered chat bot, ready to implement into your guild!

Problems?

Reach out to me at contact@povario.com if you encounter any issues.


Prerequisites

  • A Tailchat server (duh)
    • Make sure the "Openapi Platform Plugin" and "App Integration" plugins are enabled
  • An OpenAI API Key / OpenAI API compatible service (LocalAI is recommended)
    • If you are using something like LocalAI, be sure to have a decently powerful machine to make response times as fast as possible!

Included

  • A sensible system prompt
  • Persistent storage in a messages.json file
    • Only messages to and from the bot are written to disk.
  • Automatically detect and analyze images
  • Generate images with the prefix "Please generate:"

Not inlcuded

  • Any LLM, API endpoint, API keys or anything similar
  • Filtering or moderation
  • Extensive testing of the system prompt, so no rigorous testing of declining dangerous/illegal requests users may present

Getting started

  1. Clone the project and install dependencies:
git clone https://git.povario.com/powermaker450/Tailchat-Assistant && cd Tailchat-Assistant

npm i
  1. Create the .env file from the example file:
mv .env.example .env
  1. Make sure that the "Openapi Platform Plugin" and "App Integration" plugins are enabled. Then follow the instructions here to create an App.
  2. Open up the .env file with your preffered text editor and populate the file:
HOST=http://localhost:11000
# wherever your Tailchat server is running

ID=
# your bot ID

SECRET=
# Your bot secret

API_ENDPOINT=http://localhost:8080/v1
# The OpenAI-compatible endpoint for the bot to send messsages to. Defaults to "http://localhost:8080/v1"
# e.x. "http://localhost:8080/v1", "https://api.openai.com/v1"

API_KEY=none
# Your API key here for OpenAI/LocalAI. Defaults to the string "none".
# MAKE SURE to fill this in with your OpenAI API Key or a key you may have set for LocalAI.
# If you didn't set the API key for LocalAI, you may leave this blank.

TEXT_MODEL=gpt-4
# The model to query when sending text messages. Defaults to "gpt-4"
# e.x. "gpt-3", "gpt-4"

CREATE_IMAGE_MODEL=stablediffusion-cpp
# The model to use when creating images. Defaults to "stablediffusion-cpp",
# e.x. "dall-e-3", "stablediffusion-cpp"

ANALYZE_IMAGE_MODEL=gpt-4-vision-preview
# The model to use when analyzing images. Defaults to "gpt4-vision-preview".
# e.x. "gpt-4-vision-preview", "llava"

ALLOWED_CHAT=
# The ID of the channel that the bot is allowed to respond in.
# The bot will always respond to Direct Messages.

SAFE_WORD=\
# When this character/string is detected anywhere in a message, the bot won't respond to it.
# Defaults to "\".
  1. After completing these steps and making any desired changes, build and run the project:
npm run build

npm run start