[webui] add seed controls for reproducibility (#10629)

Co-authored-by: Karunanidhi Mishra <11963379+kmishra1204@users.noreply.github.com>
This commit is contained in:
Karunanidhi Mishra
2026-07-07 04:30:09 -05:00
committed by GitHub
parent a61cfa692a
commit 5987a8dd68
9 changed files with 104 additions and 5 deletions

View File

@@ -203,6 +203,7 @@ class WebChatModel(ChatModel):
max_new_tokens: int,
top_p: float,
temperature: float,
seed: float | int,
skip_special_tokens: bool,
escape_html: bool,
enable_thinking: bool,
@@ -225,6 +226,7 @@ class WebChatModel(ChatModel):
max_new_tokens=max_new_tokens,
top_p=top_p,
temperature=temperature,
seed=None if seed is None or int(seed) < 0 else int(seed),
skip_special_tokens=skip_special_tokens,
):
response += new_text