Expose no_stop_trim and skip_special_tokens in openai api (#2039)

This commit is contained in:
Lianmin Zheng
2024-11-14 19:09:21 -08:00
committed by GitHub
parent a10d530943
commit ea53c63bad
3 changed files with 35 additions and 29 deletions

View File

@@ -34,13 +34,13 @@ class SamplingParams:
frequency_penalty: float = 0.0,
presence_penalty: float = 0.0,
repetition_penalty: float = 1.0,
ignore_eos: bool = False,
skip_special_tokens: bool = True,
spaces_between_special_tokens: bool = True,
regex: Optional[str] = None,
n: int = 1,
json_schema: Optional[str] = None,
no_stop_trim: bool = False,
ignore_eos: bool = False,
skip_special_tokens: bool = True,
) -> None:
self.temperature = temperature
self.top_p = top_p