mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
API: Add alias names to field descriptions
Helps with understanding API aliases. These aliases should not be used but are helpful for developers who want frontend compat. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -78,7 +78,9 @@ class CommonCompletionRequest(BaseModel):
|
||||
|
||||
# Aliased variables
|
||||
typical: Optional[float] = Field(
|
||||
default=1.0, validation_alias=AliasChoices("typical", "typical_p")
|
||||
default=1.0,
|
||||
validation_alias=AliasChoices("typical", "typical_p"),
|
||||
description="Aliases: typical_p",
|
||||
)
|
||||
|
||||
penalty_range: Optional[int] = Field(
|
||||
@@ -88,10 +90,13 @@ class CommonCompletionRequest(BaseModel):
|
||||
"repetition_range",
|
||||
"repetition_penalty_range",
|
||||
),
|
||||
description="Aliases: repetition_range, repetition_penalty_range",
|
||||
)
|
||||
|
||||
cfg_scale: Optional[float] = Field(
|
||||
default=1.0, validation_alias=AliasChoices("cfg_scale", "guidance_scale")
|
||||
default=1.0,
|
||||
validation_alias=AliasChoices("cfg_scale", "guidance_scale"),
|
||||
description="Aliases: guidance_scale",
|
||||
)
|
||||
|
||||
def to_gen_params(self):
|
||||
|
||||
Reference in New Issue
Block a user