/Twinbook

Twinbook extension for Text WebUI

Primary LanguagePython

Twinbook

ko-fi

New:

  • Fix: Working with the most recent WebUI that removed the Instruct template and added jinja
  • Show Stats in divider (add model, lora and params after ~~~~ (optional settings in Extra context tab)
  • save state of the tect boxes so when it reloads, the text is back

It looks simple. It works simple. But this is a great way of combining Instruction Chat with Notebook. You get two huge text boxes! On the left, for typing INSTRUCTIONS; on the right, for RESPONSE.

So what, huh? Well, read on.

Here’s how it works. Type ‘What’s your name?’ into the Instructions box and click GENERATE NEW. That prints something like ‘My name is Assistant’ into the right Response box.

image

Oh, but you can type into the Response box as well, just like in the Notebook. For instance, you might delete the period and type ’ and I like ’. Then when you click CONTINUE, it goes on generating more text. Probably how it really likes to help users answering their questions.

image

So far so good. But hey! Did you realize you could have also changed the INSTRUCTIONS itself before you hit Continue! Let's say, ‘Describe how you enjoy your ice-cream.’ And then hit CONTINUE.

image

See? Suddenly it talks about ice cream, It uses the previous response plus the new instruction to CONTINUE generating the text.

This way you can modify responses, in the middle of the text - sort of steer the LLM towards your goal. It’s like a chat where you control both sides of the discussion. Just delete the part where it gets off the ramp and write different instructions. Both the previus text and the new instruction will became part of the new text.

image

GENERATE NEW

Every time you click GENERATE NEW, it inserts those little squiggly lines (separator) into the Response window before it starts writing. Then it comes up with a whole NEW bit of text following the Instruction that doesn’t depend on any previous Responses. Unlike the chat that will include all the previous questions and answer, Generate NEW is a new start from blank slate but without clearing the text in Response window. Just adding squiggly line and writing new response.

image

The squigglies are separating the different NEW responses (sort of like alternative takes). And Continue will always only take to account the text after the last squiggly. So removing squigglies, pasting your own text, editing the text - all those things will affect the Continue operation.

GEN WITH MEMORY

This function takes the last Response (i.e., after last Squiggly line, just like CONTINUE), and inserts it at the top of the LLM instruction, before System or Instruction commands. This means that the LLM gets to see the last response, but only as a memory. So it generates a NEW response, not a continuation of the text (like CONTIUE does), but with a faint remote ideas of previous facts.

So if you tell it to just write and story (Generate NEW) it will write a random story and then if you use Generate NEW again the next story will be different. However if you use Gen with Memory, the story could be somehow simillar to the last generated one.

Continue [SEL] (insert after selection)

If you select a text in Response textbox, you can use Continue [SEL] to continue generating text and insert it after the selected text. The text will be generated from the selected text with the instructions in the INSTRUCTION box. Very cheeky. Also selection CAN span multiple blocks (squigglies) and all the text will be used to generate Continue.

Keep

Keep is a box where you can keep stuff. You can also send text from Response to keep with one button. Just select text in Response window and click [sel] to Keep

Ugh, I know, it sounds complicated when you try to describe like this. You need to figure out how it works. It makes sense. I pinky swear.