talemate
talemate copied to clipboard
Roleplay with AI with a focus on strong narration, consistent world and game state tracking.
Talemate
Roleplay with AI with a focus on strong narration and consistent world and game state tracking.
![]() |
![]() |
---|---|
![]() |
![]() |
![]() |
![]() |
:warning: It does not run any large language models itself but relies on existing APIs. Currently supports OpenAI, Anthropic, mistral.ai, self-hosted text-generation-webui and LMStudio. 0.18.0 also adds support for generic OpenAI api implementations, but generation quality on that will vary.
Supported APIs:
Supported self-hosted APIs:
- oobabooga/text-generation-webui (local or with runpod support)
- LMStudio
Generic OpenAI api implementations (tested and confirmed working):
- DeepInfra
-
llamacpp with the
api_like_OAI.py
wrapper - let me know if you have tested any other implementations and they failed / worked or landed somewhere in between
Core Features
- Multiple AI agents for dialogue, narration, summarization, direction, editing, world state management, character/scenario creation, text-to-speech, and visual generation
- Support for multiple AI clients and APIs
- Long-term memory using ChromaDB and passage of time tracking
- Narrative world state management to reinforce character and world truths
- Creative tools for managing NPCs, AI-assisted character, and scenario creation with template support
- Context management for character details, world information, past events, and pinned information
- Integration with Runpod
- Customizable templates for all prompts using Jinja2
- Modern, responsive UI
Instructions
Please read the documents in the docs
folder for more advanced configuration and usage.
-
Quickstart
-
Installation
- Windows
- Linux
-
Connecting to an LLM
- OpenAI / mistral.ai / Anthropic
-
Text-generation-webui / LMStudio
- Specifying the correct prompt template
- Recommended Models
- DeepInfra via OpenAI Compatible client
- Ready to go
- Load the introductory scenario "Infinity Quest"
- Loading character cards
-
Installation
- Text-to-Speech (TTS)
- Visual Generation
- ChromaDB (long term memory) configuration
- Runpod Integration
- Prompt template overrides
Quickstart
Installation
Post here if you run into problems during installation.
There is also a troubleshooting guide that might help.
Windows
- Download and install Python 3.10 or Python 3.11 from the official Python website. :warning: python3.12 is currently not supported.
- Download and install Node.js v20 from the official Node.js website. This will also install npm. :warning: v21 is currently not supported.
- Download the Talemate project to your local machine. Download from the Releases page.
- Unpack the download and run
install.bat
by double clicking it. This will set up the project on your local machine. - Once the installation is complete, you can start the backend and frontend servers by running
start.bat
. - Navigate your browser to http://localhost:8080
Linux
python 3.10
or python 3.11
is required. :warning: python 3.12
not supported yet.
nodejs v19 or v20
:warning: v21
not supported yet.
-
git clone [email protected]:vegu-ai/talemate
-
cd talemate
-
source install.sh
- Start the backend:
python src/talemate/server/run.py runserver --host 0.0.0.0 --port 5050
. - Open a new terminal, navigate to the
talemate_frontend
directory, and start the frontend server by runningnpm run serve
.
Connecting to an LLM
On the right hand side click the "Add Client" button. If there is no button, you may need to toggle the client options by clicking this button:
OpenAI / mistral.ai / Anthropic
The setup is the same for all three, the example below is for OpenAI.
If you want to add an OpenAI client, just change the client type and select the apropriate model.
If you are setting this up for the first time, you should now see the client, but it will have a red dot next to it, stating that it requires an API key.
Click the SET API KEY
button. This will open a modal where you can enter your API key.
Click Save
and after a moment the client should have a green dot next to it, indicating that it is ready to go.
Text-generation-webui / LMStudio
:warning: As of version 0.13.0 the legacy text-generator-webui API
--extension api
is no longer supported, please use their new--extension openai
api implementation instead.
In the modal if you're planning to connect to text-generation-webui, you can likely leave everything as is and just click Save.
Specifying the correct prompt template
For good results it is vital that the correct prompt template is specified for whichever model you have loaded.
Talemate does come with a set of pre-defined templates for some popular models, but going forward, due to the sheet number of models released every day, understanding and specifying the correct prompt template is something you should familiarize yourself with.
If the text-gen-webui client shows a yellow triangle next to it, it means that the prompt template is not set, and it is currently using the default VICUNA
style prompt template.
Click the two cogwheels to the right of the triangle to open the client settings.
You can first try by clicking the DETERMINE VIA HUGGINGFACE
button, depending on the model's README file, it may be able to determine the correct prompt template for you. (basically the readme needs to contain an example of the template)
If that doesn't work, you can manually select the prompt template from the dropdown.
In the case for bartowski_Nous-Hermes-2-Mistral-7B-DPO-exl2_8_0
that is ChatML
- select it from the dropdown and click Save
.
Recommended Models
As of 2024.03.07 my personal regular drivers (the ones i test with) are:
- Kunoichi-7B
- sparsetral-16x7B
- Nous-Hermes-2-Mistral-7B-DPO
- brucethemoose_Yi-34B-200K-RPMerge
- dolphin-2.7-mixtral-8x7b
- rAIfle_Verdict-8x7B
- Mixtral-8x7B-instruct
That said, any of the top models in any of the size classes here should work well (i wouldn't recommend going lower than 7B):
https://www.reddit.com/r/LocalLLaMA/comments/18yp9u4/llm_comparisontest_api_edition_gpt4_vs_gemini_vs/
DeepInfra via OpenAI Compatible client
You can use the OpenAI compatible client to connect to DeepInfra.
API URL: https://api.deepinfra.com/v1/openai
Models on DeepInfra that work well with Talemate:
- mistralai/Mixtral-8x7B-Instruct-v0.1 (max context 32k, 8k recommended)
- cognitivecomputations/dolphin-2.6-mixtral-8x7b (max context 32k, 8k recommended)
- lizpreciatior/lzlv_70b_fp16_hf (max context 4k)
Ready to go
You will know you are good to go when the client and all the agents have a green dot next to them.
Load the introductory scenario "Infinity Quest"
Generated using talemate creative tools, mostly used for testing / demoing.
You can load it (and any other talemate scenarios or save files) by expanding the "Load" menu in the top left corner and selecting the middle tab. Then simple search for a partial name of the scenario you want to load and click on the result.
Loading character cards
Supports both v1 and v2 chara specs.
Expand the "Load" menu in the top left corner and either click on "Upload a character card" or simply drag and drop a character card file into the same area.
Once a character is uploaded, talemate may actually take a moment because it needs to convert it to a talemate format and will also run additional LLM prompts to generate character attributes and world state.
Make sure you save the scene after the character is loaded as it can then be loaded as normal talemate scenario in the future.