mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Sampling: Fix override for DRY sequence breakers
The common type should be an array of strings. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -159,7 +159,7 @@ class BaseSamplerRequest(BaseModel):
|
||||
description=("Aliases: dry_penalty_last_n"),
|
||||
)
|
||||
|
||||
dry_sequence_breakers: Optional[str] = Field(
|
||||
dry_sequence_breakers: Optional[Union[str, List[str]]] = Field(
|
||||
default_factory=lambda: get_default_sampler_value("dry_sequence_breakers", [])
|
||||
)
|
||||
|
||||
@@ -330,7 +330,7 @@ class BaseSamplerRequest(BaseModel):
|
||||
|
||||
# Convert sequence breakers into an array of strings
|
||||
# NOTE: This sampler sucks to parse.
|
||||
if self.dry_sequence_breakers:
|
||||
if self.dry_sequence_breakers and isinstance(self.dry_sequence_breakers, str):
|
||||
if not self.dry_sequence_breakers.startswith("["):
|
||||
self.dry_sequence_breakers = f"[{self.dry_sequence_breakers}]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user