Code Monkey home page Code Monkey logo

sillytavern's Introduction

SillyTavern

Based on fork of TavernAI 1.2.8

Brought to you by Cohee and RossAscends

What is SillyTavern or TavernAI?

Tavern is a user interface you can install on your computer (and Android phones) that allows you to interact text generation AIs and chat/roleplay with characters you or the community create.

SillyTavern is a fork of TavernAI 1.2.8 which is under more active development, and has added many major features. At this point they can be thought of as completely independent programs.

What do I need other than Tavern?

On its own Tavern is useless, as it's just a user interface. You have to have access to an AI system backend that can act as the roleplay character. There are various supported backends: OpenAPI API (GPT), KoboldAI (either running locally or on Google Colab), and more.

I'm new to all this. I just want to have a good time easily. What is the best AI backend to use?

The most advanced/intelligent AI backend for roleplaying is to pay for OpenAI's GPT API. It's also among the easiest to use. Objectively, GPT is streets ahead of all other backends. However, OpenAI log all your activity, and your account MAY be banned in the future if you violate their policies (e.g. on adult content). However, there are no reports of anyone being banned yet. People who value privacy more tend to run a self-hosted AI backend like KoboldAI. Self-hosted backends do not log, but they are much less capable at roleplaying.

Do I need a powerful PC to run Tavern?

Since Tavern is only a user interface, it has tiny hardware requirements, it will run on anything. It's the AI system backend that needs to be powerful.

I want to try self-hosted easily. Got a Google Colab?

Try on Colab (runs KoboldAI backend and TavernAI Extras server alongside): Open In Colab

https://colab.research.google.com/github/Cohee1207/SillyTavern/blob/main/colab/GPU.ipynb

If that didn't work, try the legacy link:

https://colab.research.google.com/github/Cohee1207/TavernAI-extras/blob/main/colab/GPU.ipynb

Mobile support

This fork can be ran natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:

https://rentry.org/TAI_Termux

.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.

This version includes

  • A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized)
  • Swipes
  • Group chats
  • Chat bookmarks (duplicates the current in its curent state)
  • Advanced KoboldAI generation settings
  • World Info support
  • Oobabooga's TextGen WebUI API connection
  • Soft prompts selector for KoboldAI
  • Prompt generation formatting tweaking
  • Extensibility support via SillyLossy's TAI-extras plugins
    • Character emotional expressions
    • Auto-Summary of the chat history
    • Sending images to chat, and the AI interpreting the content.

UI Extensions πŸš€

Name Description Required Extra Modules Screenshot
Image Captioning Send a cute picture to your bot!

Picture select option will appear beside "Message send" button.
caption
Character Expressions See your character reacting to your messages!

You need to provide your own character images!

1. Create a folder in TavernAI called public/characters/<name>, where <name> is a name of your character.
2. For base emotion classification model, put six PNG files there with the following names: joy.png, anger.png, fear.png, love.png, sadness.png, surprise.png. Other models may provide another options.
3. Images only display in desktop mode.
classify image
Memory Chatbot long-term memory simulation using automatic message context summarization. summarize image
D&D Dice A set of 7 classic D&D dice for all your dice rolling needs.

I used to roll the dice.
Feel the fear in my enemies' eyes
None image
Author's Note Built-in extension that allows you to append notes that will be added to the context and steer the story and character in a specific direction. Because it's sent after the character description, it has a lot of weight. Thanks Aliឡ#2222 for pitching the idea! None image

UI/CSS/Quality of Life tweaks by RossAscends

  • Mobile-friendly page design

  • HotKeys

    • Ctrl+Up = Connect to API
    • Ctrl+Left = view locally stored variables (in the browser console window)
    • Ctrl+Enter = Regenerate last AI response.
  • User Name Changes and Character Deletion no longer force the page to refresh.

  • Toggle option to automatically connect to API on page load.

  • Toggle option to automatically load the most recently viewed character on page load.

  • Better Token Counter - works on unsaved characters, and shows both permanent and temporary tokens.

  • Better Past Chats View

    • New Chat filenames are saved in a readable format of "(character) - (when it was created)"
    • Chat preview increased from 40 character to 300.
  • Now, by default the settings panel will close when you click away from it.

  • Clicking the Lock on the nav panel will hold the panel open, and this setting be remembered across sessions.

  • Nav panel status of open or closed will also be saved across sessions.

  • mobile UI optimized for iOS, and supports saving a shortcut to iOS homescreen and opening in fullscreen mode.

Installation

NOTE: This branch is intended for local install purposes, and has not been tested on a colab or other cloud notebook service.

  1. install NodeJS
  2. download the zip from this github repo
  3. unzip it into a folder of your choice
  4. run start.bat via double clicking or in a command line.
  5. Once the server has prepared everything for you, it will open a tab in your browser.

Remote connections

Most often this is for people who want use TAI on their mobile phones while at home. If you want to enable other devices to connect to your TAI server, open 'config.conf' in a text editor, and change:

const whitelistMode = true;

to

const whitelistMode = false;

Save the file. Restart your TAI server.

You will now be able to connect from other devices.

Disclaimer: Anyone else who knows your IP address and TAI port number will be able to as well

To connect over wifi you'll need your PC's local wifi IP address

  • (For Windows: windows button > type 'cmd.exe' in the search bar> type 'ipconfig' in the console, hit Enter > "IPv4" listing) if you want other people on the internet to connect, and check here for 'IPv4'

Performance issues?

Try enabling the Fast UI mode on User settings panel.

Questions or suggestions?

Contact us on Discord: Cohee#1207 or RossAscends#1779

Screenshots

image

image

License and credits

  • TAI Base by Humi: Unknown license
  • Cohee's TAI mod: Public domain
  • RossAscends' additions: Public domain
  • Portions of CncAnon's TavernAITurbo mod: Unknown license
  • Thanks Pygmalion University for being awesome testers and suggesting cool features!
  • Thanks oobabooga for compiling presets for TextGen
  • poe-api client adapted from https://github.com/ading2210/poe-api (GPL v3)
  • GraphQL files for poe: https://github.com/muharamdani/poe (ISC License)
  • KoboldAI Presets from KAI Lite: https://lite.koboldai.net/

sillytavern's People

Contributors

cohee1207 avatar rossascends avatar tavernai avatar energostalin avatar mindus1 avatar 10sa avatar borov666 avatar paniphons avatar neutrovertido avatar auroranemoia avatar zoltanai avatar davidhahn88 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.