mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-09-24 07:38:09 +08:00
Server: support function calling (#1003)
This commit is contained in:
@@ -594,6 +594,7 @@ class APIHandler(BaseHTTPRequestHandler):
|
|||||||
):
|
):
|
||||||
prompt = self.tokenizer.apply_chat_template(
|
prompt = self.tokenizer.apply_chat_template(
|
||||||
body["messages"],
|
body["messages"],
|
||||||
|
body.get("tools", None),
|
||||||
tokenize=True,
|
tokenize=True,
|
||||||
add_generation_prompt=True,
|
add_generation_prompt=True,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user