Server: support function calling (#1003)

This commit is contained in:
madroid 2024-10-03 03:36:07 +08:00 committed by GitHub
parent 0866e23a67
commit 36c1d8e8dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -594,6 +594,7 @@ class APIHandler(BaseHTTPRequestHandler):
):
prompt = self.tokenizer.apply_chat_template(
body["messages"],
body.get("tools", None),
tokenize=True,
add_generation_prompt=True,
)