Skip to content

Commit f74c36f

Browse files
authored
Fix tool call3 (#3086)
* Fixing the tool calling convention. * Update tehe doc. * Fixing some corner cases. * Fixing the tool call id. * Fmt. * Snapshot update with the new updated tool_call_id. * More qwen2.
1 parent ae4451c commit f74c36f

17 files changed

+1339
-2456
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ homepage = "https://github.com/huggingface/text-generation-inference"
2929
[workspace.dependencies]
3030
base64 = "0.22.0"
3131
tokenizers = { version = "0.20.0", features = ["http"] }
32-
hf-hub = { version = "0.4.1", features = ["tokio"] }
32+
hf-hub = { version = "0.4.2", features = ["tokio"] }
3333
metrics = { version = "0.23.0" }
3434
metrics-exporter-prometheus = { version = "0.15.1", features = [] }
3535
minijinja = { version = "2.2.0", features = ["json"] }

docs/openapi.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,9 +2148,6 @@
21482148
},
21492149
"StreamOptions": {
21502150
"type": "object",
2151-
"required": [
2152-
"include_usage"
2153-
],
21542151
"properties": {
21552152
"include_usage": {
21562153
"type": "boolean",

integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_auto_nostream.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"tool_calls": [
1111
{
1212
"function": {
13-
"arguments": "{\"format\":\"fahrenheit\",\"location\":\"Brooklyn, NY\"}",
13+
"arguments": "{\"location\":\"Brooklyn, NY\",\"format\":\"fahrenheit\"}",
1414
"description": null,
1515
"name": "get_current_weather"
1616
},
@@ -21,7 +21,7 @@
2121
}
2222
}
2323
],
24-
"created": 1741263682,
24+
"created": 1741372434,
2525
"id": "",
2626
"model": "meta-llama/Llama-3.1-8B-Instruct",
2727
"object": "chat.completion",

integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_choice_nostream.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"tool_calls": [
1111
{
1212
"function": {
13-
"arguments": "{\"format\":\"fahrenheit\",\"location\":\"Brooklyn, NY\"}",
13+
"arguments": "{\"location\":\"Brooklyn, NY\",\"format\":\"fahrenheit\"}",
1414
"description": null,
1515
"name": "get_current_weather"
1616
},
@@ -21,7 +21,7 @@
2121
}
2222
}
2323
],
24-
"created": 1741263684,
24+
"created": 1741372657,
2525
"id": "",
2626
"model": "meta-llama/Llama-3.1-8B-Instruct",
2727
"object": "chat.completion",

0 commit comments

Comments
 (0)