Files
talemate/README.md

242 lines
11 KiB
Markdown
Raw Normal View History

2023-05-05 00:50:02 +03:00
# Talemate
2024-02-06 01:01:00 +02:00
Roleplay with AI with a focus on strong narration and consistent world and game state tracking.
2023-05-05 00:50:02 +03:00
2024-02-06 09:15:11 +02:00
|![Screenshot 3](docs/img/0.17.0/ss-1.png)|![Screenshot 3](docs/img/0.17.0/ss-2.png)|
2024-02-06 09:15:55 +02:00
|------------------------------------------|------------------------------------------|
2024-02-06 09:15:11 +02:00
|![Screenshot 4](docs/img/0.17.0/ss-4.png)|![Screenshot 1](docs/img/0.19.0/Screenshot_15.png)|
|![Screenshot 2](docs/img/0.19.0/Screenshot_16.png)|![Screenshot 3](docs/img/0.19.0/Screenshot_17.png)|
Prep 0.19.0 (#67) * linting * improve prompt devtools: test changes, show more information * some more polish for the new promp devtools * up default conversation gen length to 128 * openai client tweaks, talemate sets max_tokens on gpt-3.5 generations * support new openai embeddings (and default to text-embedding-3-small) * ux polish for character sheet and character state ux * actor instructions * experiment using # for context / instructions * fix bug where regenerating history would mess up time stamps * remove trailing ] * prevent client ctx from being unset * fix issue where sometimes you'd need to delete a client twice for it to disappear * upgrade dependencies * set 0.19.0 * fix performance degradation caused by circular loading animation * remove coqui studio support * fix issue when switching from unsaved creative mode to loading a scene * third party client / agent support * edit dialogue examples through character / actor editor * remove "edit dialogue" action from editor - replaced by character actor instructions * different icon for delete * prompt adjustment for acting instructions * adhoc context generation for character attributes and details * add adhoc generation for character description * contextual generation tweaks * contextual generation for dialogue examples fix some formatting issues * contextual generation for world entries * prepopulate initial recen scenarios with demo scenes add experimental holodeck scenario * scene info scene experimental * assortment of fixes for holodeck improvements * more holodeck fixes * refactor holodeck instructions * rename holodeck to simulation suite * better scene status messages * add new gpt-3.5-turbo model, better json response coercion for older models * allow exclusion of characters when persisting based on world state * better error handling of world state response * better error handling of world state response * more simulation suite fixes * progress color * world state character name mapping support * if neither quote nor asterisk is in message default to quotes * fix rerun of new paraphrase op * sim suite ping that ensure's characters are not aware of sim * fixes for better character name assessment simulation suite can now give the player character a proper name * fix bug with new status notifications * sim suite adjustments and fixes and tuning * sim suite tweaks * impl scene restore from file * prompting tweaks for reinforcement messages and acting instructions * more tweaks * dialogue prompt tweaks for rerun + rewrite * fix bug with character entry / exit with narration * linting * simsuite screenshots * screenshots
2024-02-06 00:40:55 +02:00
> :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.**
2023-11-14 11:06:52 +02:00
2024-03-11 00:42:42 +02:00
Supported APIs:
- [OpenAI](https://platform.openai.com/overview)
- [Anthropic](https://www.anthropic.com/)
- [mistral.ai](https://mistral.ai/)
2024-03-11 00:42:42 +02:00
Supported self-hosted APIs:
- [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) (local or with runpod support)
- [LMStudio](https://lmstudio.ai/)
Generic OpenAI api implementations (tested and confirmed working):
2024-03-10 18:05:33 +02:00
- [DeepInfra](https://deepinfra.com/)
- [llamacpp](https://github.com/ggerganov/llama.cpp) 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
2023-05-05 00:50:02 +03:00
## Current features
2024-02-12 18:31:49 +02:00
- responsive modern ui
2023-05-05 00:50:02 +03:00
- agents
2023-11-19 14:05:09 +02:00
- conversation: handles character dialogue
- narration: handles narrative exposition
2024-02-12 18:31:49 +02:00
- summarization: handles summarization to compress context while maintaining history
2023-11-19 14:05:09 +02:00
- director: can be used to direct the story / characters
- editor: improves AI responses (very hit and miss at the moment)
- world state: generates world snapshot and handles passage of time (objects and characters)
- creator: character / scenario creator
Prep 0.20.0 (#77) * fix issue where recent save cover images would sometimes not load * paraphrase prompt tweaks * action_to_narration regenerate compatibility fixes * sim suite add asnwer question instruction * more sim suite tweaks * refactor agent details display in agent bar * visual agent progres (a1111 support) * visual gen prompt tweaks * openai compat client pass max_tokens * world state sequential reinforcement max tokens tightened * improve item names * Improve item names * attempt to remove "changed from.." notes when altering an existing character sheet * prompt improvements for single character portraits * visual agent progress * fix issue where character.update wouldn't update long-term memory * remove experimental flag for now * add better instructions for updating existing character sheet * background processing for agents, visual and tts * fix selected voice not saving between restarts for elevenlabs * lessen timeout * clean up agent status logic * conditional agent configs * comfyui support * visualization queue * refactor visual styles, comfyui progress * regen images auto cover image assign websocket handler plugin abstraction agent websocket handler * automatic1111 fixes agent status and ready checks * tweaks to character portrait prompt * system prompt for visualize * textgenwebui use temp smoothing on yi models * comment out api key for now * fixes issues with openai compat client for retaining api key and auto fixing urls * update_reinforcment tweaks * agent status emit from one place * emit agent status as asyncio task * remove debug output * tts add openai support * openai img gen support * fix issue with confyui checkbox list not loading * tts model selection for openai * narrate_query include character sheet if character is referenced in query improve visual character portrit generation prompt * client implementation extra field support and runpod vllm client example * relock * fix issue where changing context length would cause next generation to error * visual agent tweaks and auto gen character cover image in sim suite * fix issue with readyness lock when there werent any clients defined * load scene readiness fixes * linting * docs * notes for the runpod vllm example
2024-02-16 13:57:45 +02:00
- tts: text to speech via elevenlabs, OpenAI or local tts
- visual: stable-diffusion client for in place visual generation via AUTOMATIC1111, ComfyUI or OpenAI
- multi-client support (agents can be connected to separate APIs)
2023-11-19 14:05:09 +02:00
- long term memory
2023-10-02 01:55:41 +03:00
- chromadb integration
- passage of time
2023-05-05 00:50:02 +03:00
- narrative world state
Prep 0.17.0 (#48) * improve windows install script to check for compatible python versions, also work with multi version python installs * bunch of llm prompt templates * first gamestate directing impl * lower similarity threshold when checking for repetition in llm responses * tweaks to narrate after dialog prompt tweaks to extract character sheet prompt * set_context cmd * Xwin MoE * thematic generator for randomized content stimuli * add a memory query to extract character sheet * direct-scene prompt tweaks * conversation prompt tweaks * inline character creation from gameplay instruction template expose thematic generator to prompt templates * Mixtral Synthia-MoE * display prompt and response side by side * improve ensure_dialogue_format * prompt tweaks * prevent double passive narration in one round improvements to persist character logic * SlimOrca OpenBuddy * prompt tweaks * runpod status check wrapped in asyncio * generate_json_list creator agent action * limit conversation retries to 2 fix issue where REPETITION signal trigger would get sent with the prompt * smaller agent tweaks * thematic generator personality list thematic generator generate from sets of lists * adjust tests * mistral prompt adjustment * director: update content context * prompt adjustments * nous-hermes-2-yi dolphin-2.2-yo dolphin-2.6-mixtral * status messages * determine character goals generate json lists * fix error when chromadb add was called before db was ready (wait until the db is fully initiazed) * only strip extra spaces off of prompt textgenwebui: half temperature on -yi- models * prompt tweaks * more thematic generators * direct scene without character should just run the scene instructions if they exist * as_question_answer for query_scene * context_history revamp * Aurora-Nights MixtgralOrochi dolphin-2.7-mixtral nous-hermas-2-solar * remove old context_history calls * mv world_state.py to subdir FlatDolphinMaid Goliath Norobara Nous-Capybara * world state manager first progress * context db manager * fix issue with some clients not remembering context length settings after talemate restart * Sensualize-Solar * improve RAG prompt * conversation agent use [ as a stopping string since the new reinforcement messages use that * new method for RAG during conversation * mixtral_11bx2_moe * option to reset context db from manager ui * fix context db cleanup if scene is closed without saving * didnt mean to commit that * hide internal meta tags * keep track of manual context entries in scene save file so it can be rebuilt. * auto save auto progress quick settings hotbar options * manual mode actor dialogue tools refactor toolbar * narrate directed progress reorganiza narration tools into one cmd module * 0.17.0 * Mixtral_34Bx2 Sensualize-Mixtral openchat * fix save-as action * fix issue where too little context was joined in via RAG * context pins implementation * show active pins in world state component * pin condition eval and world state agent action config * Open_Gpt4 * summarization prompt improvements system prompt for summarization * guidance prompt for time passage narration * fix rerun for generic / unhandled messages * prompt fixes * summarization methods * prompt adjustments * world tools to hot bar ux tweaks * bagel-dpo * context state reinforcements support different insertion methods now (sequential, all context or conversation specific context) * first progress on world state reinforcement templating * Kunoichi * tweaks to update reinforcements prompt * world state templates progress * world state templates integration into main ux * fix issue where openai client wouldn't accept context length override * dont reconfigure client if no arguments are provided * pin condition prompt fixes world state apply template comman label set * world information / lore entries and reinforcement * show world entry states reinforcers in ux * gitignore * dynamic scenario generation progress * dynamic scenario experiment * gitignore * need to emit world state even if we dont run it during scene init * summarize and pin action * poetry relock * template question / attribute cannot be empty * fix issue with summarize and pin not respecting selected line * keep reinforcement messages in history, but keep the same one from stacking up * narrate query prompt more natural sounding response * manage pins from world entry editor * pin_only tag * ts aware summarize and pin pin text rendered to context with time label context reuse session id (this fixes issue of editing context entry and not saving the scene causing removal of context entry next time scene is loaded) * UX to add character state from template within the worldstate manager UX * move divider * handle agent emit error fix issue with state reinforcer validation * layout fixes in world state character panel physical health template added to example config * fix pin_only undefined error in world entry editor * laser-dolphin Noromaid-v0.4-Mixtral-Instruct * show state templates for world and players in favorite list fix applying world state template * refresh world entry list on state creation * changing a state from non-sequential to sequential should queue it as due * quicksettings to bar * fix error during memory db delete * status messages during scene load * removing a sequential state reinforcement should remove the reinforcement messages * Nous-Hermes-2-Mixtral * fix sync issue when editing character details through contextdb * immutable save property * enable director * update example config * enable director when loading a scene file that has instructions * fix more openai client funkyness with context size and losing model * iq dyn scenario prompt fixes * delay client save so that dragging the ctx slider doesnt send off a million requests default openai ctx to 8k * input disabled while clients active * declare event * narrate query prompt tweaks * fixes to dialogue cleanup that would cause messages after : to be cut off. * init git repo if not exist * pull current branch * add 12 hours as option * world-state persist deactivated * install npm packages * fix typo * prompt tweaks * new screenshots and features updated * update screenshot
2024-01-19 11:47:38 +02:00
- Automatically keep track and reinforce selected character and world truths / states.
2023-05-05 00:50:02 +03:00
- narrative tools
2023-09-18 11:07:19 +03:00
- creative tools
2024-01-26 13:29:21 +02:00
- manage multiple NPCs
2023-05-05 00:50:02 +03:00
- AI backed character creation with template support (jinja2)
- AI backed scenario creation
Prep 0.17.0 (#48) * improve windows install script to check for compatible python versions, also work with multi version python installs * bunch of llm prompt templates * first gamestate directing impl * lower similarity threshold when checking for repetition in llm responses * tweaks to narrate after dialog prompt tweaks to extract character sheet prompt * set_context cmd * Xwin MoE * thematic generator for randomized content stimuli * add a memory query to extract character sheet * direct-scene prompt tweaks * conversation prompt tweaks * inline character creation from gameplay instruction template expose thematic generator to prompt templates * Mixtral Synthia-MoE * display prompt and response side by side * improve ensure_dialogue_format * prompt tweaks * prevent double passive narration in one round improvements to persist character logic * SlimOrca OpenBuddy * prompt tweaks * runpod status check wrapped in asyncio * generate_json_list creator agent action * limit conversation retries to 2 fix issue where REPETITION signal trigger would get sent with the prompt * smaller agent tweaks * thematic generator personality list thematic generator generate from sets of lists * adjust tests * mistral prompt adjustment * director: update content context * prompt adjustments * nous-hermes-2-yi dolphin-2.2-yo dolphin-2.6-mixtral * status messages * determine character goals generate json lists * fix error when chromadb add was called before db was ready (wait until the db is fully initiazed) * only strip extra spaces off of prompt textgenwebui: half temperature on -yi- models * prompt tweaks * more thematic generators * direct scene without character should just run the scene instructions if they exist * as_question_answer for query_scene * context_history revamp * Aurora-Nights MixtgralOrochi dolphin-2.7-mixtral nous-hermas-2-solar * remove old context_history calls * mv world_state.py to subdir FlatDolphinMaid Goliath Norobara Nous-Capybara * world state manager first progress * context db manager * fix issue with some clients not remembering context length settings after talemate restart * Sensualize-Solar * improve RAG prompt * conversation agent use [ as a stopping string since the new reinforcement messages use that * new method for RAG during conversation * mixtral_11bx2_moe * option to reset context db from manager ui * fix context db cleanup if scene is closed without saving * didnt mean to commit that * hide internal meta tags * keep track of manual context entries in scene save file so it can be rebuilt. * auto save auto progress quick settings hotbar options * manual mode actor dialogue tools refactor toolbar * narrate directed progress reorganiza narration tools into one cmd module * 0.17.0 * Mixtral_34Bx2 Sensualize-Mixtral openchat * fix save-as action * fix issue where too little context was joined in via RAG * context pins implementation * show active pins in world state component * pin condition eval and world state agent action config * Open_Gpt4 * summarization prompt improvements system prompt for summarization * guidance prompt for time passage narration * fix rerun for generic / unhandled messages * prompt fixes * summarization methods * prompt adjustments * world tools to hot bar ux tweaks * bagel-dpo * context state reinforcements support different insertion methods now (sequential, all context or conversation specific context) * first progress on world state reinforcement templating * Kunoichi * tweaks to update reinforcements prompt * world state templates progress * world state templates integration into main ux * fix issue where openai client wouldn't accept context length override * dont reconfigure client if no arguments are provided * pin condition prompt fixes world state apply template comman label set * world information / lore entries and reinforcement * show world entry states reinforcers in ux * gitignore * dynamic scenario generation progress * dynamic scenario experiment * gitignore * need to emit world state even if we dont run it during scene init * summarize and pin action * poetry relock * template question / attribute cannot be empty * fix issue with summarize and pin not respecting selected line * keep reinforcement messages in history, but keep the same one from stacking up * narrate query prompt more natural sounding response * manage pins from world entry editor * pin_only tag * ts aware summarize and pin pin text rendered to context with time label context reuse session id (this fixes issue of editing context entry and not saving the scene causing removal of context entry next time scene is loaded) * UX to add character state from template within the worldstate manager UX * move divider * handle agent emit error fix issue with state reinforcer validation * layout fixes in world state character panel physical health template added to example config * fix pin_only undefined error in world entry editor * laser-dolphin Noromaid-v0.4-Mixtral-Instruct * show state templates for world and players in favorite list fix applying world state template * refresh world entry list on state creation * changing a state from non-sequential to sequential should queue it as due * quicksettings to bar * fix error during memory db delete * status messages during scene load * removing a sequential state reinforcement should remove the reinforcement messages * Nous-Hermes-2-Mixtral * fix sync issue when editing character details through contextdb * immutable save property * enable director * update example config * enable director when loading a scene file that has instructions * fix more openai client funkyness with context size and losing model * iq dyn scenario prompt fixes * delay client save so that dragging the ctx slider doesnt send off a million requests default openai ctx to 8k * input disabled while clients active * declare event * narrate query prompt tweaks * fixes to dialogue cleanup that would cause messages after : to be cut off. * init git repo if not exist * pull current branch * add 12 hours as option * world-state persist deactivated * install npm packages * fix typo * prompt tweaks * new screenshots and features updated * update screenshot
2024-01-19 11:47:38 +02:00
- context managegement
- Manage character details and attributes
- Manage world information / past events
- Pin important information to the context (Manually or conditionally through AI)
2023-05-05 00:50:02 +03:00
- runpod integration
2023-10-02 01:59:47 +03:00
- overridable templates for all prompts. (jinja2)
2023-05-05 00:50:02 +03:00
## Planned features
Kinda making it up as i go along, but i want to lean more into gameplay through AI, keeping track of gamestates, moving away from simply roleplaying towards a more game-ified experience.
In no particular order:
2023-10-02 01:55:41 +03:00
- Extension support
- modular agents and clients
2023-05-05 00:50:02 +03:00
- Improved world state
- Dynamic player choice generation
- Better creative tools
- node based scenario / character creation
Prep 0.17.0 (#48) * improve windows install script to check for compatible python versions, also work with multi version python installs * bunch of llm prompt templates * first gamestate directing impl * lower similarity threshold when checking for repetition in llm responses * tweaks to narrate after dialog prompt tweaks to extract character sheet prompt * set_context cmd * Xwin MoE * thematic generator for randomized content stimuli * add a memory query to extract character sheet * direct-scene prompt tweaks * conversation prompt tweaks * inline character creation from gameplay instruction template expose thematic generator to prompt templates * Mixtral Synthia-MoE * display prompt and response side by side * improve ensure_dialogue_format * prompt tweaks * prevent double passive narration in one round improvements to persist character logic * SlimOrca OpenBuddy * prompt tweaks * runpod status check wrapped in asyncio * generate_json_list creator agent action * limit conversation retries to 2 fix issue where REPETITION signal trigger would get sent with the prompt * smaller agent tweaks * thematic generator personality list thematic generator generate from sets of lists * adjust tests * mistral prompt adjustment * director: update content context * prompt adjustments * nous-hermes-2-yi dolphin-2.2-yo dolphin-2.6-mixtral * status messages * determine character goals generate json lists * fix error when chromadb add was called before db was ready (wait until the db is fully initiazed) * only strip extra spaces off of prompt textgenwebui: half temperature on -yi- models * prompt tweaks * more thematic generators * direct scene without character should just run the scene instructions if they exist * as_question_answer for query_scene * context_history revamp * Aurora-Nights MixtgralOrochi dolphin-2.7-mixtral nous-hermas-2-solar * remove old context_history calls * mv world_state.py to subdir FlatDolphinMaid Goliath Norobara Nous-Capybara * world state manager first progress * context db manager * fix issue with some clients not remembering context length settings after talemate restart * Sensualize-Solar * improve RAG prompt * conversation agent use [ as a stopping string since the new reinforcement messages use that * new method for RAG during conversation * mixtral_11bx2_moe * option to reset context db from manager ui * fix context db cleanup if scene is closed without saving * didnt mean to commit that * hide internal meta tags * keep track of manual context entries in scene save file so it can be rebuilt. * auto save auto progress quick settings hotbar options * manual mode actor dialogue tools refactor toolbar * narrate directed progress reorganiza narration tools into one cmd module * 0.17.0 * Mixtral_34Bx2 Sensualize-Mixtral openchat * fix save-as action * fix issue where too little context was joined in via RAG * context pins implementation * show active pins in world state component * pin condition eval and world state agent action config * Open_Gpt4 * summarization prompt improvements system prompt for summarization * guidance prompt for time passage narration * fix rerun for generic / unhandled messages * prompt fixes * summarization methods * prompt adjustments * world tools to hot bar ux tweaks * bagel-dpo * context state reinforcements support different insertion methods now (sequential, all context or conversation specific context) * first progress on world state reinforcement templating * Kunoichi * tweaks to update reinforcements prompt * world state templates progress * world state templates integration into main ux * fix issue where openai client wouldn't accept context length override * dont reconfigure client if no arguments are provided * pin condition prompt fixes world state apply template comman label set * world information / lore entries and reinforcement * show world entry states reinforcers in ux * gitignore * dynamic scenario generation progress * dynamic scenario experiment * gitignore * need to emit world state even if we dont run it during scene init * summarize and pin action * poetry relock * template question / attribute cannot be empty * fix issue with summarize and pin not respecting selected line * keep reinforcement messages in history, but keep the same one from stacking up * narrate query prompt more natural sounding response * manage pins from world entry editor * pin_only tag * ts aware summarize and pin pin text rendered to context with time label context reuse session id (this fixes issue of editing context entry and not saving the scene causing removal of context entry next time scene is loaded) * UX to add character state from template within the worldstate manager UX * move divider * handle agent emit error fix issue with state reinforcer validation * layout fixes in world state character panel physical health template added to example config * fix pin_only undefined error in world entry editor * laser-dolphin Noromaid-v0.4-Mixtral-Instruct * show state templates for world and players in favorite list fix applying world state template * refresh world entry list on state creation * changing a state from non-sequential to sequential should queue it as due * quicksettings to bar * fix error during memory db delete * status messages during scene load * removing a sequential state reinforcement should remove the reinforcement messages * Nous-Hermes-2-Mixtral * fix sync issue when editing character details through contextdb * immutable save property * enable director * update example config * enable director when loading a scene file that has instructions * fix more openai client funkyness with context size and losing model * iq dyn scenario prompt fixes * delay client save so that dragging the ctx slider doesnt send off a million requests default openai ctx to 8k * input disabled while clients active * declare event * narrate query prompt tweaks * fixes to dialogue cleanup that would cause messages after : to be cut off. * init git repo if not exist * pull current branch * add 12 hours as option * world-state persist deactivated * install npm packages * fix typo * prompt tweaks * new screenshots and features updated * update screenshot
2024-01-19 11:47:38 +02:00
- Improved and consistent long term memory and accurate current state of the world
2023-05-05 00:50:02 +03:00
- Improved director agent
- Right now this doesn't really work well on anything but GPT-4 (and even there it's debatable). It tends to steer the story in a way that introduces pacing issues. It needs a model that is creative but also reasons really well i think.
2023-10-02 01:55:41 +03:00
- Gameplay loop governed by AI
- objectives
- quests
- win / lose conditions
Prep 0.20.0 (#77) * fix issue where recent save cover images would sometimes not load * paraphrase prompt tweaks * action_to_narration regenerate compatibility fixes * sim suite add asnwer question instruction * more sim suite tweaks * refactor agent details display in agent bar * visual agent progres (a1111 support) * visual gen prompt tweaks * openai compat client pass max_tokens * world state sequential reinforcement max tokens tightened * improve item names * Improve item names * attempt to remove "changed from.." notes when altering an existing character sheet * prompt improvements for single character portraits * visual agent progress * fix issue where character.update wouldn't update long-term memory * remove experimental flag for now * add better instructions for updating existing character sheet * background processing for agents, visual and tts * fix selected voice not saving between restarts for elevenlabs * lessen timeout * clean up agent status logic * conditional agent configs * comfyui support * visualization queue * refactor visual styles, comfyui progress * regen images auto cover image assign websocket handler plugin abstraction agent websocket handler * automatic1111 fixes agent status and ready checks * tweaks to character portrait prompt * system prompt for visualize * textgenwebui use temp smoothing on yi models * comment out api key for now * fixes issues with openai compat client for retaining api key and auto fixing urls * update_reinforcment tweaks * agent status emit from one place * emit agent status as asyncio task * remove debug output * tts add openai support * openai img gen support * fix issue with confyui checkbox list not loading * tts model selection for openai * narrate_query include character sheet if character is referenced in query improve visual character portrit generation prompt * client implementation extra field support and runpod vllm client example * relock * fix issue where changing context length would cause next generation to error * visual agent tweaks and auto gen character cover image in sim suite * fix issue with readyness lock when there werent any clients defined * load scene readiness fixes * linting * docs * notes for the runpod vllm example
2024-02-16 13:57:45 +02:00
# Instructions
Please read the documents in the `docs` folder for more advanced configuration and usage.
- [Quickstart](#quickstart)
- [Installation](#installation)
- [Connecting to an LLM](#connecting-to-an-llm)
- [Text-generation-webui](#text-generation-webui)
- [Recommended Models](#recommended-models)
2024-03-17 01:09:59 +02:00
- [OpenAI / mistral.ai / Anthropic](#openai--mistralai--anthropic)
- [DeepInfra via OpenAI Compatible client](#deepinfra-via-openai-compatible-client)
Prep 0.20.0 (#77) * fix issue where recent save cover images would sometimes not load * paraphrase prompt tweaks * action_to_narration regenerate compatibility fixes * sim suite add asnwer question instruction * more sim suite tweaks * refactor agent details display in agent bar * visual agent progres (a1111 support) * visual gen prompt tweaks * openai compat client pass max_tokens * world state sequential reinforcement max tokens tightened * improve item names * Improve item names * attempt to remove "changed from.." notes when altering an existing character sheet * prompt improvements for single character portraits * visual agent progress * fix issue where character.update wouldn't update long-term memory * remove experimental flag for now * add better instructions for updating existing character sheet * background processing for agents, visual and tts * fix selected voice not saving between restarts for elevenlabs * lessen timeout * clean up agent status logic * conditional agent configs * comfyui support * visualization queue * refactor visual styles, comfyui progress * regen images auto cover image assign websocket handler plugin abstraction agent websocket handler * automatic1111 fixes agent status and ready checks * tweaks to character portrait prompt * system prompt for visualize * textgenwebui use temp smoothing on yi models * comment out api key for now * fixes issues with openai compat client for retaining api key and auto fixing urls * update_reinforcment tweaks * agent status emit from one place * emit agent status as asyncio task * remove debug output * tts add openai support * openai img gen support * fix issue with confyui checkbox list not loading * tts model selection for openai * narrate_query include character sheet if character is referenced in query improve visual character portrit generation prompt * client implementation extra field support and runpod vllm client example * relock * fix issue where changing context length would cause next generation to error * visual agent tweaks and auto gen character cover image in sim suite * fix issue with readyness lock when there werent any clients defined * load scene readiness fixes * linting * docs * notes for the runpod vllm example
2024-02-16 13:57:45 +02:00
- [Ready to go](#ready-to-go)
- [Load the introductory scenario "Infinity Quest"](#load-the-introductory-scenario-infinity-quest)
- [Loading character cards](#loading-character-cards)
- [Text-to-Speech (TTS)](docs/tts.md)
- [Visual Generation](docs/visual.md)
- [ChromaDB (long term memory) configuration](docs/chromadb.md)
- [Runpod Integration](docs/runpod.md)
- [Prompt template overrides](docs/templates.md)
2023-05-05 00:50:02 +03:00
# Quickstart
## Installation
Post [here](https://github.com/vegu-ai/talemate/issues/17) if you run into problems during installation.
2023-10-13 16:14:42 +03:00
2023-12-11 21:12:34 +02:00
There is also a [troubleshooting guide](docs/troubleshoot.md) that might help.
2023-05-05 00:50:02 +03:00
### Windows
2023-12-11 15:55:40 +02:00
1. Download and install Python 3.10 or Python 3.11 from the [official Python website](https://www.python.org/downloads/windows/). :warning: python3.12 is currently not supported.
2024-01-31 01:00:59 +02:00
1. Download and install Node.js v20 from the [official Node.js website](https://nodejs.org/en/download/). This will also install npm. :warning: v21 is currently not supported.
1. Download the Talemate project to your local machine. Download from [the Releases page](https://github.com/vegu-ai/talemate/releases).
2023-05-05 00:50:02 +03:00
1. Unpack the download and run `install.bat` by double clicking it. This will set up the project on your local machine.
1. Once the installation is complete, you can start the backend and frontend servers by running `start.bat`.
1. Navigate your browser to http://localhost:8080
### Linux
2023-12-11 16:03:46 +02:00
`python 3.10` or `python 3.11` is required. :warning: `python 3.12` not supported yet.
2024-01-31 01:47:52 +02:00
2024-01-31 01:47:29 +02:00
`nodejs v19 or v20` :warning: `v21` not supported yet.
2023-05-05 00:50:02 +03:00
1. `git clone git@github.com:vegu-ai/talemate`
2023-05-05 00:50:02 +03:00
1. `cd talemate`
1. `source install.sh`
2023-10-15 12:44:30 +03:00
1. Start the backend: `python src/talemate/server/run.py runserver --host 0.0.0.0 --port 5050`.
2023-05-05 00:50:02 +03:00
1. Open a new terminal, navigate to the `talemate_frontend` directory, and start the frontend server by running `npm run serve`.
# Connecting to an LLM
2023-09-17 17:11:58 +03:00
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:
![Client options](docs/img/client-options-toggle.png)
![No clients](docs/img/0.21.0/no-clients.png)
## Text-generation-webui
2023-09-17 17:37:07 +03:00
> :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.
2023-09-17 17:11:58 +03:00
In the modal if you're planning to connect to text-generation-webui, you can likely leave everything as is and just click Save.
![Add client modal](docs/img/0.21.0/text-gen-webui-setup.png)
### 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.
![Default prompt template](docs/img/0.21.0/prompt-template-default.png)
Click the two cogwheels to the right of the triangle to open the client settings.
![Client settings](docs/img/0.21.0/select-prompt-template.png)
2023-09-17 17:11:58 +03:00
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)
2024-01-26 14:41:59 +02:00
If that doesn't work, you can manually select the prompt template from the dropdown.
2024-01-26 14:41:59 +02:00
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`.
![Client settings](docs/img/0.21.0/selected-prompt-template.png)
### Recommended Models
As of 2024.03.07 my personal regular drivers (the ones i test with) are:
2024-01-26 14:41:59 +02:00
2024-02-07 03:12:56 +02:00
- Kunoichi-7B
- sparsetral-16x7B
- Nous-Hermes-2-Mistral-7B-DPO
2024-02-10 23:07:30 +02:00
- brucethemoose_Yi-34B-200K-RPMerge
2024-02-07 03:12:56 +02:00
- dolphin-2.7-mixtral-8x7b
- rAIfle_Verdict-8x7B
2024-02-07 03:12:56 +02:00
- 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):
2024-01-26 14:41:59 +02:00
2024-02-07 03:12:56 +02:00
https://www.reddit.com/r/LocalLLaMA/comments/18yp9u4/llm_comparisontest_api_edition_gpt4_vs_gemini_vs/
2024-01-26 14:41:59 +02:00
## OpenAI / mistral.ai / Anthropic
The setup is the same for all three, the example below is for OpenAI.
2023-09-17 17:11:58 +03:00
If you want to add an OpenAI client, just change the client type and select the apropriate model.
![Add client modal](docs/img/0.21.0/openai-setup.png)
2023-09-17 17:11:58 +03:00
2024-01-26 13:29:21 +02:00
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.
![OpenAI API Key missing](docs/img/0.18.0/openai-api-key-1.png)
Click the `SET API KEY` button. This will open a modal where you can enter your API key.
![OpenAI API Key missing](docs/img/0.21.0/openai-add-api-key.png)
2024-01-26 13:29:21 +02:00
Click `Save` and after a moment the client should have a green dot next to it, indicating that it is ready to go.
![OpenAI API Key set](docs/img/0.18.0/openai-api-key-3.png)
## DeepInfra via OpenAI Compatible client
You can use the OpenAI compatible client to connect to [DeepInfra](https://deepinfra.com/).
![DeepInfra](docs/img/0.21.0/deepinfra-setup.png)
```
API URL: https://api.deepinfra.com/v1/openai
```
Models on DeepInfra that work well with Talemate:
- [mistralai/Mixtral-8x7B-Instruct-v0.1](https://deepinfra.com/mistralai/Mixtral-8x7B-Instruct-v0.1) (max context 32k, 8k recommended)
- [cognitivecomputations/dolphin-2.6-mixtral-8x7b](https://deepinfra.com/cognitivecomputations/dolphin-2.6-mixtral-8x7b) (max context 32k, 8k recommended)
- [lizpreciatior/lzlv_70b_fp16_hf](https://deepinfra.com/lizpreciatior/lzlv_70b_fp16_hf) (max context 4k)
2024-01-26 13:29:21 +02:00
## Ready to go
2023-09-17 17:11:58 +03:00
You will know you are good to go when the client and all the agents have a green dot next to them.
![Ready to go](docs/img/0.21.0/ready-to-go.png)
2023-09-17 17:11:58 +03:00
2023-05-05 00:50:02 +03:00
## 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.
![Load scenario location](docs/img/load-scene-location.png)
## 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.
![Load character card location](docs/img/load-card-location.png)
2023-09-17 17:14:32 +03:00
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.
2024-03-11 00:42:42 +02:00
Make sure you save the scene after the character is loaded as it can then be loaded as normal talemate scenario in the future.