From bdcf31035f06d666f01339c9af2447d6c2b83bcc Mon Sep 17 00:00:00 2001 From: Yiximail Date: Wed, 27 Mar 2024 03:34:03 +0800 Subject: [PATCH] Set a default empty string for user_bio to fix #5717 issue (#5722) --- extensions/openai/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/openai/typing.py b/extensions/openai/typing.py index af7b094f..5e26ce0c 100644 --- a/extensions/openai/typing.py +++ b/extensions/openai/typing.py @@ -107,7 +107,7 @@ class ChatCompletionRequestParams(BaseModel): context: str | None = Field(default=None, description="Overwrites the value set by character field.") greeting: str | None = Field(default=None, description="Overwrites the value set by character field.") user_name: str | None = Field(default=None, description="Your name (the user). By default, it's \"You\".", alias="name1") - user_bio: str | None = Field(default=None, description="The user description/personality.") + user_bio: str | None = Field(default='', description="The user description/personality.") chat_template_str: str | None = Field(default=None, description="Jinja2 template for chat.") chat_instruct_command: str | None = None