Simple way to run AI chatbots in Twitch chat. Currently works with OpenAI API
- Add gpt support
- Add MongoDB support for context storage
- Add file storage for context
- Create TUI
- Add support for local models (with https://github.com/Atome-FE/llama-node)
- Create GUI
Clone the repo and install dependencies
git clone https://github.com/Bekert/chatimatic-twitch-bot.git && cd chatimatic-twitch-bot && npm install --omit=dev
Create file config.json
from example-config.json
cp example-config.json config.json
In the config, you need to provide Twitch API key, channel, username and OpenAI API key
Run the bot
npm run start
Try to ping the bot by username (e. g. @username hi, who are you?
). It will keep the context of your chat conversation
Currently GPT is the only supported model. Here is how you can configure it
apiKey
- your API keymodel
- model to use (e. g. gpt-4o, gpt-4, gpt-3.5-turbo). You can find the full list and pricing here https://openai.com/api/pricingdefaultInputs
- list of default (system) inputs that will be embedded in each request to GPT. I find that 1 short input usually works the bestmemory
- whether bot should keep the context of the conversatation (requires additional cost for input tokens)inputsLimit
- the number of messages (user's inputs and bot's outputs) that will be used in bot's context. Be aware of input token cost cost
3 types of storage are currently supported
memory
- temporarly RAM storage (it clears out when you stop the bot). Requires no further configfile
- persistent file-based storage. It will the save the data indb.json
. Requires no further configmongo
- MongoDB is used for data storage. You will have to provide the DB url