From a4c51b5a05b7ad6bb159f3811013077bff14932c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:02:45 -0800 Subject: [PATCH] API: add "user_name" and "bot_name" aliases for name1 and name2 --- extensions/openai/typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/openai/typing.py b/extensions/openai/typing.py index f8a5203f..5725ece8 100644 --- a/extensions/openai/typing.py +++ b/extensions/openai/typing.py @@ -99,8 +99,8 @@ class ChatCompletionRequestParams(BaseModel): instruction_template_str: str | None = Field(default=None, description="A Jinja2 instruction template. If set, will take precedence over everything else.") character: str | None = Field(default=None, description="A character defined under text-generation-webui/characters. If not set, the default \"Assistant\" character will be used.") - name1: str | None = Field(default=None, description="Your name (the user). By default, it's \"You\".") - name2: str | None = Field(default=None, description="Overwrites the value set by character.") + name1: str | None = Field(default=None, description="Your name (the user). By default, it's \"You\".", alias=['user_name']) + name2: str | None = Field(default=None, description="Overwrites the value set by character.", alias=['bot_name']) context: str | None = Field(default=None, description="Overwrites the value set by character.") greeting: str | None = Field(default=None, description="Overwrites the value set by character.") chat_template_str: str | None = Field(default=None, description="Jinja2 template for chat.")