oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
38.56k stars 5.09k forks source link

character user #5980

Open kalle07 opened 2 months ago

kalle07 commented 2 months ago

Describe the bug

if i chose a character every time the user name (tab user) is You even if i saved it before as a different username ...

Is there an existing issue for this?

Reproduction

every time

Screenshot

No response

Logs

...

System Info

win10
Alkohole commented 2 months ago

To save user info, use save button in the Session tab

kalle07 commented 2 months ago

i see but thats not in the tab order ... if i have different names for different chat-charcters ;)

Alkohole commented 2 months ago

Um... If you have different names for different chats, then of course you have to edit them as you switch between chats. I'm not quite sure what your problem is.

If you want chatbots to address you differently you need to specify in the invitation for each bot how to address you, and specify the user name as "You".

kalle07 commented 2 months ago

in the session file settings.yaml is not save the username

only this " max_new_tokens: 1024 truncation_length: 4096 default_extensions:

ok sry i cant send a screenshot (it doesnt work for me on github)

so again tab parameter subtab chat character, i can make my own with name and content -> tab user , name is usual (You) i can write a new one now for me is a logical conclusion, if i save my chracater, also the name and describtion of the user is saved but no ... so where i can save that ?

Alkohole commented 2 months ago

Example: 1 After that, in the "Session" tab, the "Save UI" button: 2 Two parameters "name1" and "user_bio" are added to the preview window:

name1: Alex
user_bio: '{{user}}''s full name is Alex Green.'

In the settings.yaml file, it looks like this:

mode: chat-instruct
chat_style: messenger
preset: My Preset
max_new_tokens: 1024
truncation_length: 8192
name1: "Alex"
user_bio: "{{user}}'s full name is Alex Green."
instruction_template_str: |-
  {%- set ns = namespace(found=false) -%}
  {%- for message in messages -%}
      {%- if message['role'] == 'system' -%}
          {%- set ns.found = true -%}
      {%- endif -%}
...

If you webui doesn't even try to save these settings, then I can assume that either you have too aggressive page caching settings in your browser, or you should update webui. Either way, you can manually add two lines into the settings.yaml file, between "truncation_length" and "instruction_template_str"(webui needs to be rebooted).

kalle07 commented 2 months ago

i dont know why, but now it works ;)

but in this case is must save for every character a new yaml file too have a different username, right? why is that not saved within the character itself ?

Alkohole commented 2 months ago

but in this case is must save for every character a new yaml file too have a different username, right?

There's no function for selecting user bio yet, so you'll have to change the name and/or bio yourself whenever you need to. I have a small text base of my users, and when needed I just use one of them.

why is that not saved within the character itself ?

The user bio is dynamic and in one dialog it can be edited. This allows without deleting the whole dialog to change some user rule to avoid logic errors or context window limitation.

kalle07 commented 2 months ago

i see...

thx so longg ;)