server : clean up built-in template detection (#11026)
* server : clean up built-in template detection * fix compilation * add chat template test * fix condition
This commit is contained in:
parent
5896c65232
commit
45095a61bf
6 changed files with 44 additions and 27 deletions
|
@ -74,6 +74,7 @@ class ServerProcess:
|
|||
draft_min: int | None = None
|
||||
draft_max: int | None = None
|
||||
no_webui: bool | None = None
|
||||
chat_template: str | None = None
|
||||
|
||||
# session variables
|
||||
process: subprocess.Popen | None = None
|
||||
|
@ -164,6 +165,8 @@ class ServerProcess:
|
|||
server_args.extend(["--draft-min", self.draft_min])
|
||||
if self.no_webui:
|
||||
server_args.append("--no-webui")
|
||||
if self.chat_template:
|
||||
server_args.extend(["--chat-template", self.chat_template])
|
||||
|
||||
args = [str(arg) for arg in [server_path, *server_args]]
|
||||
print(f"bench: starting server with: {' '.join(args)}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue