Preset + external block generation for noass

Lightweight noass extension (without additional networks, without scripts)

Link - https://gitgud.io/Monblant/noass
Installation is described in the git, additionally you only need to set the stopstring.
Note: The context line (dotted) changes its behavior due to the extension and becomes meaningless. Ignore it.

V-0.3.1f (ST 1.12.0+)

Pack link - https://files.catbox.moe/zgzxg3.zip (alternative)
Changelog: fix for the latest tavern update, fix: payload too large
Updated: noass.js

TL;DR

Claude Sonnet/Opus - main network purely for story generation.
GPT-4/Claude - additional network for auto-generation of info block, reflection, global summary and thinking.
Presets for memo, regexes for hiding.
The essence of noass - RP in the prefill.



Installation and setup

Installing noass:

  1. Put the noass folder and start_both.bat next to the Tavern folder.
  2. In the noass folder in settings.json, change the link in the apiBaseUrl field to the proxy. In the charPrefix field, specify:
    • "\n\n" for canonical noass
    • "\n\n**Narrator:**" for noass with Narrator.
  3. In Tavern, add to Advanced Formatting (letter A) in Custom Stopping Strings: ["**Anonymous:**"].
  4. Change the proxy link in Tavern to http://127.0.0.1:3000. In the end, it should look like this: http://127.0.0.1:3000/proxy/anthropic.
  5. Launch options:
    • start_both.bat - will launch both noass and tavern. If the tavern folder is renamed - change line 2.
    • start_noass.bat or start_noass.sh - will launch only noass
    • from the command line via node noass.js, making sure npm i express http-proxy-middleware node-http-proxy-json body-parser was run

Addition for Termux:

launch tavern
swipe right from the left side of the termux screen
there's new session and you launch the script in the second just launched session

installation:
mkdir ~/noass
cd ~/noass
wget LINK_TO_ARCHIVE
unzip ARCHIVE_NAME.zip
npm i express http-proxy-middleware node-http-proxy-json body-parser

launch:
cd ~/noass/noass
node noass.js


Installing the rest:

  1. Disable dialog examples in User Settings if they are not already disabled. Check the boxes below for Show Assistant: in responses and Show Anonymous: in responses.
  2. Import the preset of your choice:
  3. Quick Reply: Ext.json - if you need blocks, import and enable. You can edit block configs in the Enablers script.
  4. Quick Reply: Ext-utils.json - import and enable if you need its functionality.
  5. Regex:
  • Required:
    • Zvezdochka - Claude likes to lose the closing asterisk at the end of the response, the regex restores it.
  • Required for blocks:
    • IEQR, TEQR, GSEQR - needed for the Ext script
    • Blocks purge - removes blocks for the network, Linebreaks purge - cleans extra line breaks
    • Spoiler kostyl - hides blocks (except for the info block) from the user.
  • Optional:
    • Add user prefix - adds display of user prefix
    • Hide old info - hides old info blocks. Important: needs to be placed before the Zvezdochka regex in the regex list.

[Opt.] Setting up an additional network for block generation:

  1. Change the value of addUse to true in settings.json.
  2. In addType specify gpt or claude depending on the type of additional network.
  3. In addBaseUrl change the link to the additional proxy.
  4. In addOriginalUrl set the method address:
    • for claude: .../messages from the endpoint. For example: /proxy/anthropic/messages.
    • for gpt: .../chat/completions from the endpoint. For example: /proxy/openai/chat/completions.
  5. In addApiModel set the specific network model.
  6. In addApiKey insert the apikey/password from the proxy.
  7. In addApiKeyHeader set x-api-key for claude or Authorization for gpt.
  8. You can edit the jail for gpt in blocksSystemGPT and jails for claude in blocksPF and blocksSystemClaude. You can change the temperature in blocksTemperature.
  9. Restart noass.

[Opt.] Setting up SOCKS:

  1. Run the console in the noass folder, run the command npm i socks-proxy-agent.
  2. Change the value of useSOCKS to true in settings.json.
  3. In socks5Proxy specify the proxy host and port.
    3.1. If the proxy has authentication, the format is: socks://login:pass@host:port

[Opt.] Fanfic mode:

Disabling the stopstring, the network will generate large blocks of text. In its current form - a feature for experiment, and does not imply role-playing for several messages, as memo drowns in context. Changing the memo depth to 1 or putting all memo in jail can partially help.

  1. Change the value of omitUserStopstring to true in settings.json.

Description

Commands in the noass console:

  • canon - changes the mode to canonical noass
  • narrator - changes the mode to noass with Narrator
  • fanfic toggle - switches to fanfic mode and back
  • addnet toggle - toggles the use of additional network mode

What Ext does:

  • After generating a character response, it generates blocks for this response according to a template.
  • A separate generation is a full summary (if enabled), after generating blocks at a specified period.
  • After the user's response, it injects an info block, reflection and random memory under the memo. Generates and injects thinking at 0 depth if it's enabled.

Configs in Enablers:

Variable name Meaning Possible values
enableBlocks Responsible for block generation. When disabled, info block and reflection will not be generated. true or false
enableReflexion Responsible for reflection generation true or false
enableStats Responsible for info block generation true or false
enableGlobalSummary Responsible for summary generation true or false
globalSummaryPeriod Summary period, i.e. once in how many messages the summary is generated Natural number
randomMemoryInject Responsible for memory injection true or false
blocksDepth Block injection depth. It's recommended to set the same as for memo. Natural number
userPrefix User prefix for message concatenation. Only needed for blocks. String
userPostfix User postfix for message concatenation. Only needed for blocks. String
charPrefix Character prefix for message concatenation. Only needed for blocks. String
charPostfix Character postfix for message concatenation. Only needed for blocks. String

What Ext-utils does:

  • Force blockgen - generates blocks for the last message if Ext is imported.
  • Force summary - generates summary if Ext is imported.
  • Enable\Disable thinking - enables\disables thinking if Ext is imported. Disabled by default.
  • Inject thinking - injects thinking at 0 depth. It makes sense to press only on swipes.
  • Flush injects - clears injects.
  • Rewrite greeting - rewrites the greeting according to the rules of canonical noass and outputs it as a system message. You can additionally set ideas in the input, but it's optional. Works poorly with greetings from the 2nd person. No need to copy tags.
  • Generate greeting - generates a greeting by the same rules. You set ideas in the input and press the button. No need to copy tags.
  • Request comment - generates a comment from the Assistant. You set the request in the input and press the button. Unlike other buttons, the main network is always used for comments.
  • Generate profile - generates a character profile based on information from the input.

The generation buttons won't give a perfect greeting/profile, you'll still have to write something by hand.

Block description:

  • Info block - brief information about the scene and characters
  • Reflection - analysis of the current scene
  • Random memory - random memory (one of the past messages from the character)
  • Global summary - summary of the entire narrative, includes ontology (high-level description of story elements and relationships between characters) and classic summary.
  • Thinking - thinking how to continue the scene, inserted at 0 depth. Disabled by default, it's recommended not to keep it enabled for long.

Preset description:

  • Group of prompts with a white circle - system prompt.
    • Style Prompt - sets the personality and literary style for the Assistant.
    • Formatting - sets general formatting rules. In Custom you can set your own.
  • Groups of prompts with blue and green circles - memo. Depth 7.
  • Group of prompts with a green circle - restrictions. Describe general restrictions that the story should follow. In Custom you can set your own.
  • Group of prompts with a blue circle - defs. Pulls information from the character card and user. Include only what is described in the character card, by default Persona and Description are included. What is implied to be contained there:
    • Persona - structured description of the user, pulled from the Persona Description field in Persona Management.
    • Description - structured description of the character, pulled from the same field in the character card. If it's too big, it's better to move the less important part to the lorebook.
    • Tags - tags inherent to the implied story (primarily) and character, pulled from the Personality summary field in the character card. Examples of tags can be found in HML's rentry.
    • Plans - long-term plot plans in the form of enumeration, pulled from the Scenario field in the character card.
    • Card Prompt - special card instructions, for example on blocks or formatting. Pulled from the Main Prompt field in the character card.
  • Group of prompts with a purple circle - jailbreaks, short instructions in the format [NOTE: ...] or similar. Depth 1.
    • Card JB - jailbreak from the character card, pulled from the Jailbreak field.
    • Custom JB - custom jailbreak.
  • Group of prompts with a yellow circle - prefills. Optionally included when a command is needed, for example to change the scene.

How to modify blocks:

  • The prompt and template of blocks can be changed in Quick Reply, scripts Prompt and Template respectively. Prompts and templates are separated for each block and are contained in the first two lines and in the last two (for full story summary and thinking).
    An example of how to change the template for the script to accept it:

Example of info block template (old)

<current_info>
```
Time: [HH:MM | DD.MM.YY | day of week]
Location: [Location, sublocation]
Scene: [Notable objects enumeration, may be random]
World: [Observable surrounding actions (excluding Anonymous and Assistant), '-' if none]

Portrayals:

• Character name:
> [outward physical/mental condition] | [outward emotion]
> [relative position/location] | [brief description of relationships]
> [clothing, physical description] | [items]
```
</current_info>

In the original template, you need to change all | to \| and all line breaks to . Then insert the resulting string after /setvar key=statsTemplate in the Template script and don't forget | at the end to separate it from the next instruction.

How to transfer chat along with blocks:

  1. Wait until the next summary or press the Force summary button.
  2. Capture the message with the summary and other blocks - this is the new greeting. If the message is too small, then pull up the previous one from above along with the user, but not with the previous blocks. If it's still not enough, then write the exposition of the situation yourself.
  3. In the new chat, the summary will jump into the lorebook by itself, and the blocks into the inject, as soon as the user sends a message.

Known issues:

  • If you delete several messages and then swipe the last one instead of sending a message for the user, the injects will remain old. This is because there is no trigger for swiping. Not critical, but can be unpleasant.
  • If you enable the additional network, Test message and /genraw go to it. Not a bug, but a feature.
  • In group chats, block generation will not work correctly.
  • For additional generation, requests without streaming must be allowed on the proxy
  • Human breakthroughs - swipe/enable thinking.

About noass

Main functions of the noass script:

  1. Glues all chat history into one message (not including User first message) on behalf of the assistant. The network will perceive it as a prefill.
  2. Adds prefixes to user and character messages.
  3. If the request was from one message (e.g. /genraw for QR), it passes it to the additional network.

Moments in canonical noass:

  1. You need to change the card greeting in accordance with the preset formatting (prefixes, asterisks, scene descriptions). Without this, claude is unlikely to pick up the format. The style of further RP strongly depends on the greeting.
  2. It's desirable to start the greeting with a scene description in plaintext (the scene itself, character arrangement, setup).
  3. You can include speech and actions from the user in the greeting (also with a prefix). It's undesirable to insert long monologues from characters into the greeting.
  4. In the future, you don't need to write the user prefix, the script itself inserts it. (exception - a multi-paragraph response with exposition, there it might make sense to insert a second prefix). It's desirable to respond in detail and not break the format.

Differences between noass with Narrator and canonical:

- Canonical With Narrator
Format Play/script Interactive story
Prefixes Character names Anonymous and Narrator (others may appear)
Content Actions under prefixes and exposition Free
Greeting Needs to be adapted to formatting Any
Structural loops Less More
Roundings No May occur
Positivity bias Almost none Present
Writing for Anonymous Only in exposition Consequences of actions
Preset in the pack SychNoass SychNoassNarrator

Pastes about noass:

1.
In short, look, it's a bit off-topic, but in fact claude doesn't just answer your message and then stop - it endlessly generates a huge sheet of dialogue between human and assistant. That is, for example, you told it to solve a math problem:
Human: solve the problem
Assistant: yes, here's the solution
and then it would continue literally generating for you (for example, it would write on behalf of the human a request to solve another problem), BUT, it's stopped by the built-in stop token from Anthropic - Human:
Even simpler: Claude is not an Assistant. Claude is a neural network generating dialogue between human and assistant.
And here we approach that very fine-tune for the assistant, namely - instead of endlessly generating RP/fanfic, it generates that very dialogue between human and assistant, which, obviously, even through the mask of characters will affect the output (and hence follows soy, loops, passivity and other things required from the Assistant and what it's trained for).
And that's what no-ass solves. Now the dialogue is not between human and assistant, but between the characters directly participating in the story and/or narrator.

2.
Nope, look how Claude is structured (at least it was before jsons)
It's just an LLM that bashes out dialogue between human and assistant. Without stop tokens, it will just write for both the user (Oh no! That's a sin!) and the assistant. I learned all this when I was trying to play in the profile, because then there was a hole with stop tokens through spaces and Claude wrote for human. Without stop tokens, literally the following happens:
Human: help me
Assistant: bla bla bla, helped
Human: Thanks bro!
All this is just written by the LLM, but to allow the user to write with it, they start putting the owl on the globe. The devs made human a stop token. As a result, when the assistant finishes writing, it's interrupted and not allowed to write for human, you write for him. And if the assistant (those very lines with Assistant:, not the spherical assistant on Anthropic's side. It doesn't actually exist, it's just a fiction and the LLM writes for the assistant) is trained to give one specific answer to the user's request - it will always try to give one answer, short and with those very "roundings", because there's a fine-tune for the assistant. So no matter how you send the project, in its essence because of the fine-tune, the assistant will always try to respond with one message. And there may not be human and assistant in the prompt at all, all these restrictions are nothing but an artificial restriction from the Anthropic API. The whole assistant is artificial, entirely.

3.
>Well, let HML-schizo explain everything again, there's schizophrenia of unprecedented scale here, and I'm going to sleep
Well, let's go. I explained above how human assistant works, which I'm 100% sure of from experience when I was fucking around with the prompt format.
My idea is simple in its idea - replace human and assistant with Anonymous: and Assistant (A lot of characters actually). But there are a lot of problems because of our beloved soyboys and their API:

  1. We need to remove human and assistant, but it won't work because of the Anthropic API. Solution - we leave assistant and human at the very beginning, so that they eventually drown in the context. Literally drowning humans and assistants
  2. We need the network not to write for us - here's easy, just add Anonymous stop token. Once again for understanding, now there's a default Human: stop token and we just "substitute" it for the user, and human should fart at the very beginning and drown in the context.
  3. This is where the game in prefill comes from, where Claude writes one huge fanfic with implied writing for the user. But with the stop token we don't allow writing for the user and write ourselves.

Now again about the pros that this can give:

  1. No assistant rounding, because it will drown in the context and because it will be cut off mid-sentence when it wants to write for the user.
  2. Because it's cut off, short answers are possible, not schizophrenia with monologues of a million tokens
  3. Because in essence it's a fanfic prompt, the LLM is focused on storytelling, without unnecessary water
  4. The assistant prefix, which is the quintessence and root cause of soy, starts working weaker and weaker, apologies are impossible, because we don't let either human or assistant talk, and only they apologize.
  5. This ALREADY WORKED, I TESTED IT! But it was terribly inconvenient because I was jerry-rigging and fucking around there, because tavern wasn't re-engineered. Now even with fucking around it won't work because of jsons

Cons:

  1. Instructions with this approach need to be implemented differently, but I'm against instructions, I don't like them
  2. Need to make a fanfic prompt
  3. Tavern will fart and go limp if you try to do this but it needs to be redone
  4. Anthropic has already started fixing this
  5. Sometimes the assistant leaks through, but much less often, the problem of this fucking soy fine-tune
  6. All this worked on 2.1 now I don't know, possibly the point of no return has already been passed, when LLM can only do soyboy assistant
  1. Another preset for noass and useful things (as well as prose noass)
  2. Another type of noass - tag-based
  3. Memo and tags
  4. Original noass script
Edit Report
Pub: 06 Jul 2024 12:55 UTC
Views: 228