Skip to content

Commit

Permalink
Merge pull request #112 from ceruleandeep/feature/sysprompt
Browse files Browse the repository at this point in the history
Expanded section on main/system prompt
  • Loading branch information
Cohee1207 authored Nov 1, 2024
2 parents 72dcaa2 + 7ec789c commit dbce8c0
Show file tree
Hide file tree
Showing 40 changed files with 607 additions and 224 deletions.
2 changes: 1 addition & 1 deletion Administration/sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To do this, enable `autheliaAuth` in *config.yaml*.
autheliaAuth: true
```
This augments or replaces the built-in [password management](/Usage/Core_Concepts/user-settings.md#account-management) component of a [multi-user mode](/Administration/multi-user.md) setup.
This augments or replaces the built-in [password management](/Usage/User_Settings/User_Settings.md#account-management) component of a [multi-user mode](/Administration/multi-user.md) setup.
## Replacing HTTP BA
Expand Down
2 changes: 1 addition & 1 deletion For_Contributors/st-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ This will insert a user message at the beginning of the conversation history:

## World Info commands

World Info (also known as Lorebook) is a highly utilitarian tool for dynamically inserting data into the prompt. See the dedicated page for more detailed explanation: [World Info](/Usage/Core_Concepts/worldinfo.md).
World Info (also known as Lorebook) is a highly utilitarian tool for dynamically inserting data into the prompt. See the dedicated page for more detailed explanation: [World Info](/Usage/worldinfo.md).

1. `/getchatbook` – gets a name of the chat-bound World Info file or create a new one if was unbound, and pass it down the pipe.
2. `/findentry file=bookName field=fieldName [text]` – finds a UID of the record from the specified file (or a variable pointing to a file name) using fuzzy matching of a field value with the provided text (default field: `key`) and passes the UID down the pipe, e.g. `/findentry file=chatLore field=key Shadowfang`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
icon: paperclip
route: /usage/core-concepts/connection-profiles
order: 100
---

# Connection Profiles
Expand All @@ -21,10 +23,10 @@ Connection Profiles store the following selections.

### Text Completion APIs

* [System Prompt and its state](/Usage/Core_Concepts/advancedformatting.md#system-prompt)
* [System Prompt and its state](/Usage/Prompts/advancedformatting.md#system-prompt)
* [Instruct Mode state and template](//Usage/Core_Concepts/instructmode.md)
* [Context Template](/Usage/Core_Concepts/advancedformatting.md#context-template)
* [Tokenizer](/Usage/Core_Concepts/advancedformatting.md#tokenizer)
* [Context Template](/Usage/Prompts/advancedformatting.md#context-template)
* [Tokenizer](/Usage/Prompts/advancedformatting.md#tokenizer)

### Chat Completion APIs

Expand Down
2 changes: 1 addition & 1 deletion Usage/API_Connections/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: -30
order: 150
icon: repo-forked
expanded: false
route: /usage/api-connections
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: -40
order: 90
icon: desktop-download
route: /usage/how-to-use-a-self-hosted-model/
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: character-40
route: /usage/core-concepts/authors-note
---

# Author's Note
Expand Down
1 change: 1 addition & 0 deletions Usage/Core_Concepts/Tags.md → Usage/Characters/Tags.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: character-30
route: /usage/core-concepts/tags
---

# Tags
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
order: character-10
icon: person-fill
route: /usage/core-concepts/characterdesign
---

# Character Design
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: character-15
route: /usage/core-concepts/chatfilemanagement
---

# Chat File Management
Expand All @@ -14,7 +15,7 @@ Some of these options are available in the "Manage chat files" dialog that opens

The simplest way to use a character card is a Solo chat; just click on their card and start chatting.

Once you have a few character cards, you can also use the "Create New Chat Group" button to create a [group chat](/Usage/Core_Concepts/groupchats.md) including multiple characters which will then interact with each other and you.
Once you have a few character cards, you can also use the "Create New Chat Group" button to create a [group chat](/Usage/Characters/groupchats.md) including multiple characters which will then interact with each other and you.

## Chat import

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: character-50
route: /usage/core-concepts/data-bank
tags:
[
vector storage,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: character-20
route: /usage/core-concepts/groupchats
---

# Group Chats
Expand Down
121 changes: 121 additions & 0 deletions Usage/Characters/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
order: 100
icon: person-fill
---

# Characters

Characters are the AI identities that you can create and manage to shape the AI's role in the conversation. Each
character has a name, personality, and conversation history. You can create as many characters as you like, and
switch between them at any time.

Characters can be used in solo chats, or add multiple characters to a group chat to
let them interact with each other.

## Character Management Panel

Open the <i class="fa-solid fa-address-card"></i> **Characters** panel from the navbar to access the character
list. Click on a character or group to chat with them or edit them, or
choose <i class="fa-solid fa-user-plus"></i> **Create New Character** to add a new character.

### Panel Controls

* <i class="fa-solid fa-lock"></i> **Pin Panel**: Keep panel open while interacting
* <i class="fa-solid fa-list-ul"></i> **Character List**: Return to character list view
* **HotSwap Bar**: Quick access to favorite characters

### Character List

* <i class="fa-solid fa-user-plus"></i> **Create New Character**: Add a new character
* <i class="fa-solid fa-file-import"></i> **Import Character**: Load character from file
* <i class="fa-solid fa-cloud-arrow-down"></i> **External Import**: Import from URL
* <i class="fa-solid fa-users-gear"></i> **Create Group**: Start a new group chat

#### Search and sort

* **Search Bar**: Filter characters by name or attributes
* **Sort Dropdown**: Multiple sorting options:
- Alphabetical (A-Z, Z-A)
- Chronological (Newest, Oldest)
- Usage-based (Recent, Most/Least chats)
- Size-based (Most/Least tokens)
- Special (Favorites, Random)

#### Filter characters by type or tag

* <i class="fa-solid fa-star"></i> **Favorites Filter**: Show favorite characters
* <i class="fa-solid fa-users"></i> **Groups Filter**: Show only group chats
* <i class="fa-solid fa-folder-plus"></i> **Tags as Folders**: Organize by tag hierarchy
* <i class="fa-solid fa-gear"></i> **Manage Tags**: [Tag configuration](/Usage/Characters/Tags.md)
* <i class="fa-solid fa-tags"></i> **Tag List**: View all available tags
* <i class="fa-solid fa-filter-circle-xmark"></i> **Clear Filters**: Reset all filters

### Character Creation/Edit Panel

* **Avatar Image**: Upload and preview character profile picture
* **Token Count**: [Token usage](characterdesign.md#character-tokens) for the character
* <i class="fa-solid fa-ranking-star"></i> **Stats**: Chat history and usage statistics
* [Tag management](/Usage/Characters/Tags.md)

#### Quick Actions

- <i class="fa-solid fa-star"></i> Favorite toggle
- <i class="fa-solid fa-book"></i> Advanced definitions
- <i class="fa-solid fa-globe"></i> Character lore
- <i class="fa-solid fa-passport"></i> Chat lore: link the chat to a [World Info](/Usage/worldinfo.md)
- <i class="fa-solid fa-file-export"></i> Export character
- <i class="fa-solid fa-clone"></i> Duplicate
- <i class="fa-solid fa-skull"></i> Delete

#### Extended Options

* World Info linking
* Card lore import
* Scenario override
* Persona conversion
* Character rename
* Source linking
* Replace/Update
* Tag import
* Gallery view

#### Content Fields

* **[Character Description](characterdesign.md#character-description)**: Brief character summary
* **[First Message](characterdesign.md#first-message)**: Initial greeting or prompt when starting a new chat
* **Alternative greetings**: Define multiple first messages that you can swipe between when starting a chat

### Advanced Definitions Panel

Click on the <i class="fa-solid fa-book"></i> **Advanced Definitions** button to access the extended character settings.

#### Prompt Overrides (Chat Completion/Instruct Mode)

* **Main Prompt**: Replaces default [main/system prompt](/Usage/Prompts/prompts.md#main-prompt-system-prompt), can use
\{\{original\}\} placeholder to include the original prompt
* **Post-History Instructions**: Overrides
default [post-history instructions](/Usage/Prompts/prompts.md#post-history-instructions)

#### Creator's Metadata

Non-prompt information about the character:

- Creator name/contact
- Character version
- Creator's notes
- Embedded tags list

#### Character Personality

* **[Personality Summary](characterdesign.md#personality-summary)**: Brief overview of character's traits
* **[Scenario](characterdesign.md#scenario)**: Context and circumstances of the dialog
* **Character's Note**: Custom message with selectable depth and message role (also
see [Author's Note](/Usage/Characters/Author's-Note.md))
* **Talkativeness** (Group Chats): Slider for Shy → Normal → Chatty
* **Example Messages**: Examples of character's writing style

### Group Chat Management

If this is a group chat, you can manage the group members and settings from this panel.

See [Group Chats](/Usage/Characters/groupchats.md) for more details.
1 change: 1 addition & 0 deletions Usage/hotkeys.md → Usage/Chatting/hotkeys.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
order: -60
icon: key-asterisk
route: /usage/hotkeys
---

# HotKeys
Expand Down
116 changes: 116 additions & 0 deletions Usage/Chatting/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
icon: report
order: 170
expanded: false
---

# Chatting

When you are [connected to an API](/Usage/API_Connections/index.md), send messages to the AI by typing in the chat bar at the bottom of the screen. Then click <i class="fa-solid fa-paper-plane"></i> **Send** or press Enter.
![Chat bar](/static/chatbox.png)

The AI will respond with a message that continues the conversation.

![Chat message](/static/chatmessage.png)

You can now:

* **Send another message**
* **Swipe the response**: Click the <i class="fa-solid fa-chevron-right"></i> **Swipe** button on the message to generate a different response.
* **Edit the message**: Click the <i class="fa-solid fa-pencil"></i> **Edit** button on any message to [edit the message content](#edit-message-content).
* **Message actions**: Click the <i class="fa-solid fa-ellipsis"></i> **Message actions** button on a message for more [message options](#message-actions-panel) like translation, image generation, and story branching.
* **Chat options**: Click the <i class="fa-solid fa-bars"></i> **Options** button next to the chat bar for more [chat options](#chat-options-panel) like author's notes and chat file management.

!!! Edit and swipe
If you wish you'd said something different, you can edit your message and then swipe the AI's response to get a new one.
!!!

!!! Keyboard shortcuts
You can also use the **Right** arrow key to swipe, and the **Up** arrow key to edit the last message in the chat. For more hotkeys, use the `/help hotkeys` [slash command](/Usage/Chatting/slashcommands.md) in the chat or check the [HotKeys](/Usage/Chatting/hotkeys.md) page.
!!!

## Message actions panel

Manage individual chat messages via the ellipsis (•••) button on the message.

To display these options for all messages in your chats, enable the [Expand Message Actions](/Usage/User_Settings/uicustomization.md#theme-toggles) setting in your user settings.

### Core Functions

* <i class="fa-solid fa-language"></i> **Translate**: Convert message to different language
* <i class="fa-solid fa-paintbrush"></i> **Generate Image**: [Create an image](/extensions/Stable-Diffusion.md) from message content
* <i class="fa-solid fa-bullhorn"></i> **Narrate**: [Text-to-speech](/extensions/TTS.md) conversion
* <i class="fa-solid fa-square-poll-horizontal"></i> **Prompt**: View the generation prompt and token usage

### Message Visibility

* <i class="fa-solid fa-eye"></i> **Included**: AI sees this message; click to exclude it
* <i class="fa-solid fa-eye-slash"></i> **Excluded**: AI does not see this message; click to include it

### Content Management

* <i class="fa-solid fa-paperclip"></i> **Embed**: [Attach files or images](/Usage/Characters/data-bank.md#about-documents)
* <i class="fa-solid fa-flag-checkered"></i> **Checkpoint**: Create story checkpoint
* <i class="fa-solid fa-flag"></i> **Checkpoint Navigation**: Click to open checkpoint chat, Shift+Click to update
existing checkpoint
* <i class="fa-solid fa-code-branch"></i> **Branch**: Start alternate story path
* <i class="fa-solid fa-copy"></i> **Copy**: Copy message text
* <i class="fa-solid fa-pencil"></i> **Edit**: Edit message content

## Edit message content

A compact panel of message manipulation tools that appears when you <i class="fa-solid fa-pencil"></i> **Edit** a chat
message.

### Core Actions

* <i class="fa-solid fa-check"></i> **Confirm**: Save message changes
* <i class="fa-solid fa-xmark"></i> **Cancel**: Discard message changes

### Message Operations

* <i class="fa-solid fa-copy"></i> **Copy**: Duplicate message content
* <i class="fa-solid fa-trash-can"></i> **Delete**: Remove message

### Message Position

* <i class="fa-solid fa-chevron-up"></i> **Move Up**: Shift message higher in chat
* <i class="fa-solid fa-chevron-down"></i> **Move Down**: Shift message lower in chat

Note: Movement controls may be disabled based on message position in chat history.

## Chat options panel

Manage chat settings and operations via the <i class="fa-solid fa-bars"></i> **Options** button at the bottom left of
the chat interface.

### Display Controls

* <i class="fa-lg fa-solid fa-times"></i> **Close chat**: Exit current chat session
* <i class="fa-lg fa-solid fa-cog"></i> **Toggle Panels**: Show/hide [interface panels](/Usage/index.md#control-panels)

### Generation Settings

* <i class="fa-lg fa-solid fa-note-sticky"></i> **[Author's Note](/Usage/Characters/Author's-Note.md)**: Custom context instructions
* <i class="fa-lg fa-solid fa-scale-balanced"></i> **[CFG Scale](/Usage/Prompts/CFG.md)**: Adjust response creativity
* <i class="fa-lg fa-solid fa-pie-chart"></i> **Token Probabilities**: View token generation stats

### Chat Navigation

* <i class="fa-lg fa-solid fa-left-long"></i> **Back to parent chat**: Return to main conversation
* <i class="fa-lg fa-solid fa-flag"></i> **Save checkpoint**: Create story checkpoint
* <i class="fa-lg fa-solid fa-people-arrows"></i> **Convert to group**: Transform into [group chat](/Usage/Characters/groupchats.md)

### Chat Management

* <i class="fa-lg fa-solid fa-comments"></i> **Start new chat**: Begin fresh conversation
* <i class="fa-lg fa-solid fa-address-book"></i> **Manage chat files**: [Chat file operations](/Usage/Characters/chatfilemanagement.md) such as import, export, and renaming

### Message Controls

* <i class="fa-lg fa-solid fa-trash-can"></i> **Delete messages**: Select and remove multiple messages
* <i class="fa-lg fa-solid fa-repeat"></i> **Regenerate**: Create new response
* <i class="fa-lg fa-solid fa-user-secret"></i> **Impersonate**: AI writes message as user
* <i class="fa-lg fa-solid fa-arrow-right"></i> **Continue**: Extend last message

Note: Some options may be hidden depending on context and chat state.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
icon: rel-file-path
route: /usage/core-concepts/slashcommands
---

# Slash commands
Expand Down
2 changes: 1 addition & 1 deletion Usage/Common-Settings.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
order: -50
order: 160
icon: sliders
---

Expand Down
Loading

0 comments on commit dbce8c0

Please sign in to comment.