Files
talemate/README.md

268 lines
13 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
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/)
- [Cohere](https://www.cohere.com/)
- [Groq](https://www.groq.com/)
0.25.0 (#100) * flip title and name in recent scenes * fix issue where a message could not be regenerated after applying continuity error fixes * prompt tweaks * allow json parameters for commands * autocomplete improvements * dialogue cleanup fixes * fix issue with narrate after dialogue and llama3 (and other models that don't have a line break after the user prompt in their prompt template. * expose ability to auto generate dialogue instructions to wsm character ux * use b64_json response type * move tag checks up so they match first * fix typo * prompt tweak * api key support * prompt tweaks * editable parameters in prompt debugger / tester * allow reseting of prompt params * codemirror for prompt editor * prompt tweaks * more prompt debug tool tweaks * some extra control for `context_history` * new analytical preset (testing) * add `join` and `llm_can_be_coerced` to jinja env * support factual list summaries * prompt tweaks to continuity check and fix * new summarization method `facts` exposed to ux * clamp mistral ai temperature according to their new requirements * prompt tweaks * better parsing of fixed dialogue response * prompt tweaks * fix intermittent empty meta issue * history regen status progression and small ux tweaks * summary entries should always be condensed * google gemini support * relock to install google-cloud-aiplatform for vertex ai inference * fix instruction link * better error handling of google safety validation and allow disabling of safety validation * docs * clarify credentials path requirements * tweak error line identification * handle quota limit error * autocomplete ux wired to assistant plugin instead of command * autocomplete narrative editing and fixes to autocomplete during dialog edit * main input autocomplete tweaks * allow new lines in main input * 0.25.0 and relock * fix issue with autocomplete elsewhere locking out main input * better way to determine remote service * prompt tweak * fix rubberbanding issue when editing character attributes * add open mistral 8x22 * fix continuity error check summary inclusion of target entry * docs * default context length to 8192 * linting
2024-05-05 22:16:03 +03:00
- [Google Gemini](https://console.cloud.google.com/)
2024-03-11 00:42:42 +02:00
Supported self-hosted APIs:
- [KoboldCpp](https://koboldai.org/cpp) ([Local](https://koboldai.org/cpp), [Runpod](https://koboldai.org/runpodcpp), [VastAI](https://koboldai.org/vastcpp), also includes image gen support)
- [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) (local or with runpod support)
- [LMStudio](https://lmstudio.ai/)
2024-05-31 13:23:40 +03:00
- [TabbyAPI](https://github.com/theroyallab/tabbyAPI/)
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
0.22.0 (#89) * linux dev instance shortcuts * add voice samples to gitignore * direction mode: inner monologue * actor direction fixes * py script support for scene logic * fix end_simulation call * port sim suite logic to python * remove dupe log * fix typing * section off the text * fix end simulation command * simulation goal, prompt tweaks * prompt tweaks * dialogue format improvements * director action logged with message * call director action log and other fixes * generate character dialogue instructions, prompt fixes, director action ux * fix question / answer call * generate dialogue instructions when loading from character cards * more dialogue format improvements * set scene content context more reliably. * fix innermonologue perspective * conversation prompt should honor the client's decensor setting * fix comfyui checkpoint list not loading * more dialogue format fixes * prompt tweaks * fix sim suite group characters, prompt fixes * npm relock * handle inanimate objects, handle player name change issues * don't rename details if the original name was "You" * As the conversation goes on, dialogue instructions should be moved backwards further to have a weaker effect on immediate generations. * add more context to character creation prompt * fix select next talking actor when natural language flow is turned on and the LLM returns multiple character names * prompt fixes for dialogue generation * summarization fixes * default to script format * seperate dialogue prompt by formatting style, tweak conversation system prompt * remove cruft * add gen format to agent details * relock * relock * prep 0.22.0 * add claude-3-haiku-20240307 * readme
2024-03-29 21:37:28 +02:00
## 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
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
2024-05-31 13:23:40 +03:00
:warning: This software is in early stages of development. Certain aspects may be unpolished and highly experimental.
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
- [Quickstart](#quickstart)
- [Installation](#installation)
0.22.0 (#89) * linux dev instance shortcuts * add voice samples to gitignore * direction mode: inner monologue * actor direction fixes * py script support for scene logic * fix end_simulation call * port sim suite logic to python * remove dupe log * fix typing * section off the text * fix end simulation command * simulation goal, prompt tweaks * prompt tweaks * dialogue format improvements * director action logged with message * call director action log and other fixes * generate character dialogue instructions, prompt fixes, director action ux * fix question / answer call * generate dialogue instructions when loading from character cards * more dialogue format improvements * set scene content context more reliably. * fix innermonologue perspective * conversation prompt should honor the client's decensor setting * fix comfyui checkpoint list not loading * more dialogue format fixes * prompt tweaks * fix sim suite group characters, prompt fixes * npm relock * handle inanimate objects, handle player name change issues * don't rename details if the original name was "You" * As the conversation goes on, dialogue instructions should be moved backwards further to have a weaker effect on immediate generations. * add more context to character creation prompt * fix select next talking actor when natural language flow is turned on and the LLM returns multiple character names * prompt fixes for dialogue generation * summarization fixes * default to script format * seperate dialogue prompt by formatting style, tweak conversation system prompt * remove cruft * add gen format to agent details * relock * relock * prep 0.22.0 * add claude-3-haiku-20240307 * readme
2024-03-29 21:37:28 +02:00
- [Windows](#windows)
- [Linux](#linux)
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
- [Docker](#docker)
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
- [Connecting to an LLM](#connecting-to-an-llm)
2024-03-17 01:09:59 +02:00
- [OpenAI / mistral.ai / Anthropic](#openai--mistralai--anthropic)
0.22.0 (#89) * linux dev instance shortcuts * add voice samples to gitignore * direction mode: inner monologue * actor direction fixes * py script support for scene logic * fix end_simulation call * port sim suite logic to python * remove dupe log * fix typing * section off the text * fix end simulation command * simulation goal, prompt tweaks * prompt tweaks * dialogue format improvements * director action logged with message * call director action log and other fixes * generate character dialogue instructions, prompt fixes, director action ux * fix question / answer call * generate dialogue instructions when loading from character cards * more dialogue format improvements * set scene content context more reliably. * fix innermonologue perspective * conversation prompt should honor the client's decensor setting * fix comfyui checkpoint list not loading * more dialogue format fixes * prompt tweaks * fix sim suite group characters, prompt fixes * npm relock * handle inanimate objects, handle player name change issues * don't rename details if the original name was "You" * As the conversation goes on, dialogue instructions should be moved backwards further to have a weaker effect on immediate generations. * add more context to character creation prompt * fix select next talking actor when natural language flow is turned on and the LLM returns multiple character names * prompt fixes for dialogue generation * summarization fixes * default to script format * seperate dialogue prompt by formatting style, tweak conversation system prompt * remove cruft * add gen format to agent details * relock * relock * prep 0.22.0 * add claude-3-haiku-20240307 * readme
2024-03-29 21:37:28 +02:00
- [Text-generation-webui / LMStudio](#text-generation-webui--lmstudio)
- [Specifying the correct prompt template](#specifying-the-correct-prompt-template)
- [Recommended Models](#recommended-models)
- [DeepInfra via OpenAI Compatible client](#deepinfra-via-openai-compatible-client)
0.25.0 (#100) * flip title and name in recent scenes * fix issue where a message could not be regenerated after applying continuity error fixes * prompt tweaks * allow json parameters for commands * autocomplete improvements * dialogue cleanup fixes * fix issue with narrate after dialogue and llama3 (and other models that don't have a line break after the user prompt in their prompt template. * expose ability to auto generate dialogue instructions to wsm character ux * use b64_json response type * move tag checks up so they match first * fix typo * prompt tweak * api key support * prompt tweaks * editable parameters in prompt debugger / tester * allow reseting of prompt params * codemirror for prompt editor * prompt tweaks * more prompt debug tool tweaks * some extra control for `context_history` * new analytical preset (testing) * add `join` and `llm_can_be_coerced` to jinja env * support factual list summaries * prompt tweaks to continuity check and fix * new summarization method `facts` exposed to ux * clamp mistral ai temperature according to their new requirements * prompt tweaks * better parsing of fixed dialogue response * prompt tweaks * fix intermittent empty meta issue * history regen status progression and small ux tweaks * summary entries should always be condensed * google gemini support * relock to install google-cloud-aiplatform for vertex ai inference * fix instruction link * better error handling of google safety validation and allow disabling of safety validation * docs * clarify credentials path requirements * tweak error line identification * handle quota limit error * autocomplete ux wired to assistant plugin instead of command * autocomplete narrative editing and fixes to autocomplete during dialog edit * main input autocomplete tweaks * allow new lines in main input * 0.25.0 and relock * fix issue with autocomplete elsewhere locking out main input * better way to determine remote service * prompt tweak * fix rubberbanding issue when editing character attributes * add open mistral 8x22 * fix continuity error check summary inclusion of target entry * docs * default context length to 8192 * linting
2024-05-05 22:16:03 +03:00
- [Google Gemini](#google-gemini)
- [Google Cloud Setup](#google-cloud-setup)
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)
- [Configure for hosting](#configure-for-hosting)
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
- [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
2024-05-31 13:23:40 +03:00
Please read the documents in the `docs` folder for more advanced configuration and usage.
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
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
1. `git clone https://github.com/vegu-ai/talemate.git`
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`.
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
### Docker
2024-05-18 12:31:32 +03:00
:warning: Some users currently experience issues with missing dependencies inside the docker container, issue tracked at [#114](https://github.com/vegu-ai/talemate/issues/114)
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
1. `git clone https://github.com/vegu-ai/talemate.git`
1. `cd talemate`
2024-05-14 15:36:33 +03:00
1. `cp config.example.yaml config.yaml`
2024-05-14 15:29:02 +03:00
1. `docker compose up`
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
1. Navigate your browser to http://localhost:8080
:warning: When connecting local APIs running on the hostmachine (e.g. text-generation-webui), you need to use `host.docker.internal` as the hostname.
#### To shut down the Docker container
2024-05-14 15:29:37 +03:00
Just closing the terminal window will not stop the Docker container. You need to run `docker compose down` to stop the container.
0.23.0 (#91) * dockerfiles and docker-compose * containerization fixes * docker instructions * readme * readme * dont mount src by default, readme * hf template determine fixes * auto determine prompt template * script to start talemate listening only to 127.0.0.1 * prompt tweaks * auto narrate round every 3 rounds * tweaks * Add return to startscreen button * Only show return to start screen button if scene is active * improvements to character creation * dedicated property for scene title separate fromn the save directory name * filter out negations into negative keywords * increase auto narrate delay * add character portrait keyword * summarization should ignore most recent message, as it is often regenerated. * cohere client * specify python3 * improve viable runpod text gen detection * fix formatting in template preview * cohere command-r plus template that i am not sure if correct or not * mistral client set to decensor * fix issue with parsing json responses * command-r prompts updated * use official mistralai python client * send max_tokens * new input autocomplete functionality * prompt tweeaks * llama 3 templates * add <|eot_id|> to stopping strings * prompt tweak * tooltip * llama-3 identifier * command-r and command-r plus prompt identifiers * text-gen-webui client tweaks to make llama3 eos tokens work correctly * better llama-3 detection * better llama-3 finalizing of parameters * streamline client prompt finalizers reduce YY model smoothing factor from 0.3 to 0.1 for text-generation-webui client * relock * linting * set 0.23.0 * add new gpt-4 models * set 0.23.0 * add note about conecting to text-gen-webui from docker * fix openai image generation no longer working * default to concept_art
2024-04-20 01:01:06 +03:00
#### How to install Docker
1. Download and install Docker Desktop from the [official Docker website](https://www.docker.com/products/docker-desktop).
# 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)
0.22.0 (#89) * linux dev instance shortcuts * add voice samples to gitignore * direction mode: inner monologue * actor direction fixes * py script support for scene logic * fix end_simulation call * port sim suite logic to python * remove dupe log * fix typing * section off the text * fix end simulation command * simulation goal, prompt tweaks * prompt tweaks * dialogue format improvements * director action logged with message * call director action log and other fixes * generate character dialogue instructions, prompt fixes, director action ux * fix question / answer call * generate dialogue instructions when loading from character cards * more dialogue format improvements * set scene content context more reliably. * fix innermonologue perspective * conversation prompt should honor the client's decensor setting * fix comfyui checkpoint list not loading * more dialogue format fixes * prompt tweaks * fix sim suite group characters, prompt fixes * npm relock * handle inanimate objects, handle player name change issues * don't rename details if the original name was "You" * As the conversation goes on, dialogue instructions should be moved backwards further to have a weaker effect on immediate generations. * add more context to character creation prompt * fix select next talking actor when natural language flow is turned on and the LLM returns multiple character names * prompt fixes for dialogue generation * summarization fixes * default to script format * seperate dialogue prompt by formatting style, tweak conversation system prompt * remove cruft * add gen format to agent details * relock * relock * prep 0.22.0 * add claude-3-haiku-20240307 * readme
2024-03-29 21:37:28 +02:00
## 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 appropriate model.
0.22.0 (#89) * linux dev instance shortcuts * add voice samples to gitignore * direction mode: inner monologue * actor direction fixes * py script support for scene logic * fix end_simulation call * port sim suite logic to python * remove dupe log * fix typing * section off the text * fix end simulation command * simulation goal, prompt tweaks * prompt tweaks * dialogue format improvements * director action logged with message * call director action log and other fixes * generate character dialogue instructions, prompt fixes, director action ux * fix question / answer call * generate dialogue instructions when loading from character cards * more dialogue format improvements * set scene content context more reliably. * fix innermonologue perspective * conversation prompt should honor the client's decensor setting * fix comfyui checkpoint list not loading * more dialogue format fixes * prompt tweaks * fix sim suite group characters, prompt fixes * npm relock * handle inanimate objects, handle player name change issues * don't rename details if the original name was "You" * As the conversation goes on, dialogue instructions should be moved backwards further to have a weaker effect on immediate generations. * add more context to character creation prompt * fix select next talking actor when natural language flow is turned on and the LLM returns multiple character names * prompt fixes for dialogue generation * summarization fixes * default to script format * seperate dialogue prompt by formatting style, tweak conversation system prompt * remove cruft * add gen format to agent details * relock * relock * prep 0.22.0 * add claude-3-haiku-20240307 * readme
2024-03-29 21:37:28 +02:00
![Add client modal](docs/img/0.21.0/openai-setup.png)
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)
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)
## Text-generation-webui / LMStudio
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
2024-05-18 12:31:32 +03:00
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-05-05 22:30:24 +03:00
[https://oobabooga.github.io/benchmark.html](https://oobabooga.github.io/benchmark.html)
2024-01-26 14:41:59 +02:00
## 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)
0.25.0 (#100) * flip title and name in recent scenes * fix issue where a message could not be regenerated after applying continuity error fixes * prompt tweaks * allow json parameters for commands * autocomplete improvements * dialogue cleanup fixes * fix issue with narrate after dialogue and llama3 (and other models that don't have a line break after the user prompt in their prompt template. * expose ability to auto generate dialogue instructions to wsm character ux * use b64_json response type * move tag checks up so they match first * fix typo * prompt tweak * api key support * prompt tweaks * editable parameters in prompt debugger / tester * allow reseting of prompt params * codemirror for prompt editor * prompt tweaks * more prompt debug tool tweaks * some extra control for `context_history` * new analytical preset (testing) * add `join` and `llm_can_be_coerced` to jinja env * support factual list summaries * prompt tweaks to continuity check and fix * new summarization method `facts` exposed to ux * clamp mistral ai temperature according to their new requirements * prompt tweaks * better parsing of fixed dialogue response * prompt tweaks * fix intermittent empty meta issue * history regen status progression and small ux tweaks * summary entries should always be condensed * google gemini support * relock to install google-cloud-aiplatform for vertex ai inference * fix instruction link * better error handling of google safety validation and allow disabling of safety validation * docs * clarify credentials path requirements * tweak error line identification * handle quota limit error * autocomplete ux wired to assistant plugin instead of command * autocomplete narrative editing and fixes to autocomplete during dialog edit * main input autocomplete tweaks * allow new lines in main input * 0.25.0 and relock * fix issue with autocomplete elsewhere locking out main input * better way to determine remote service * prompt tweak * fix rubberbanding issue when editing character attributes * add open mistral 8x22 * fix continuity error check summary inclusion of target entry * docs * default context length to 8192 * linting
2024-05-05 22:16:03 +03:00
## Google Gemini
### Google Cloud Setup
Unlike the other clients the setup for Google Gemini is a bit more involved as you will need to set up a google cloud project and credentials for it.
Please follow their [instructions for setup](https://cloud.google.com/vertex-ai/docs/start/client-libraries) - which includes setting up a project, enabling the Vertex AI API, creating a service account, and downloading the credentials.
Once you have downloaded the credentials, copy the JSON file into the talemate directory. You can rename it to something that's easier to remember, like `my-credentials.json`.
### Add the client
![Google Gemini](docs/img/0.25.0/google-add-client.png)
The `Disable Safety Settings` option will turn off the google reponse validation for what they consider harmful content. Use at your own risk.
### Conmplete the google cloud setup in talemate
![Google Gemini](docs/img/0.25.0/google-setup-incomplete.png)
Click the `SETUP GOOGLE API CREDENTIALS` button that will appear on the client.
The google cloud setup modal will appear, fill in the path to the credentials file and select a location that is close to you.
![Google Gemini](docs/img/0.25.0/google-cloud-setup.png)
Click save and after a moment the client should have a green dot next to it, indicating that it is ready to go.
![Google Gemini](docs/img/0.25.0/google-ready.png)
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.
## Configure for hosting
By default talemate is configured to run locally. If you want to host it behind a reverse proxy or on a server, you will need create some environment variables in the `talemate_frontend/.env.development.local` file
Start by copying `talemate_frontend/example.env.development.local` to `talemate_frontend/.env.development.local`.
Then open the file and edit the `ALLOWED_HOSTS` and `VUE_APP_TALEMATE_BACKEND_WEBSOCKET_URL` variables.
```sh
ALLOWED_HOSTS=example.com
# wss if behind ssl, ws if not
VUE_APP_TALEMATE_BACKEND_WEBSOCKET_URL=wss://example.com:5050
2024-05-18 12:31:32 +03:00
```