mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Better way to handle user_bio default in the API (alternative to bdcf31035f
)
This commit is contained in:
parent
9653a9176c
commit
c37f792afa
@ -261,6 +261,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) -
|
||||
name2 = body['bot_name'] or name2
|
||||
context = body['context'] or context
|
||||
greeting = body['greeting'] or greeting
|
||||
user_bio = body['user_bio'] or ''
|
||||
|
||||
# History
|
||||
user_input, custom_system_message, history = convert_history(messages)
|
||||
@ -271,6 +272,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) -
|
||||
'name2': name2,
|
||||
'context': context,
|
||||
'greeting': greeting,
|
||||
'user_bio': user_bio,
|
||||
'instruction_template_str': instruction_template_str,
|
||||
'custom_system_message': custom_system_message,
|
||||
'chat_template_str': chat_template_str,
|
||||
|
@ -103,7 +103,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='', description="The user description/personality.")
|
||||
user_bio: str | None = Field(default=None, description="The user description/personality.")
|
||||
chat_template_str: str | None = Field(default=None, description="Jinja2 template for chat.")
|
||||
|
||||
chat_instruct_command: str | None = None
|
||||
|
Loading…
Reference in New Issue
Block a user