-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user_bio
is None by default, get an error when replacing the character names
#5717
Comments
No, I think it's better to keep them None. |
You should do whatever doesn't break stuff.
|
Just facing the same issue. |
Same issue API no longer works with my previous formatting. So this needs a new user bio field? |
Currently, we can simply add an empty string as user_bio to avoid this problem. |
… The default value same as in the webui.
Add keys 'user_bio' and 'user_name' in request data can avoid this problem {
"mode": "chat",
"character": "Ami",
"messages": history,
"stop": ["\n", "<|im_end|>"],
"temperature": 0.8,
"user_bio": "",
"user_name": ""
} |
Facing the same issue too. |
I encountered this too and worked around it by adding a sanity check to the replace_character_names function.
|
Yes, it's perfectly handled. |
This works when you use "requests"/http, but you cant use it with the openai lib |
I'm having this error too, when I try to use the openai library with baseURL for http://127.0.0.1:5000/v1 |
Same issue. Can confirm with a locally ran http://127.0.0.1:5000/v1 |
I don’t know how it should have been, but I just edited the file "text-generation-webui/extensions/openai/typing.py" to changed string n.110 (user_bio: str | None = Field(default='' ...) |
Describe the bug
Using API
/v1/chat/completions
(None stream mode) withoutuser_bio
.The new parameter
user_bio
in API chat mode raises an error because it'sNone
as default.text-generation-webui/extensions/openai/typing.py
Line 110 in 7cf1402
Then, in
chat.py
can't replace the names correctly.text-generation-webui/modules/chat.py
Line 97 in 7cf1402
get this error
An empty string as default in webui.
text-generation-webui/modules/shared.py
Line 60 in 7cf1402
Is there an existing issue for this?
Reproduction
Any request in
/v1/chat/completions
Screenshot
No response
Logs
System Info
The text was updated successfully, but these errors were encountered: