Server: support function calling

This commit is contained in:
madroid
2024-09-29 15:46:22 +08:00
parent 7ec2021bb9
commit cdb2d29d4b

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,
)