hunterhector hanseungwook commited on
Commit
6e4d9ce
·
1 Parent(s): d33e3ae

Document tool_call_format API options (#3)

Browse files

- Document tool_call_format API options (bb0701635a1dedfbae955d01ca7e6ae58c32352a)


Co-authored-by: Seungwook Han <hanseungwook@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -92,13 +92,15 @@ response = client.chat.completions.create(
92
  temperature=1.0,
93
  top_p=0.95,
94
  max_tokens=32768,
95
- extra_body={"chat_template_kwargs": {"reasoning_effort": "high"}},
96
  )
97
  message = response.choices[0].message
98
  print("Reasoning:", getattr(message, "reasoning_content", None))
99
  print("Answer:", message.content)
100
  ```
101
 
 
 
102
  ### Transformers
103
 
104
  Validated with Transformers 4.57.6, PyTorch 2.13.0, Safetensors 0.8.0.
 
92
  temperature=1.0,
93
  top_p=0.95,
94
  max_tokens=32768,
95
+ extra_body={"chat_template_kwargs": {"reasoning_effort": "high", "tool_call_format": "xml"}},
96
  )
97
  message = response.choices[0].message
98
  print("Reasoning:", getattr(message, "reasoning_content", None))
99
  print("Answer:", message.content)
100
  ```
101
 
102
+ Our model supports multiple tool calls formats, which can be changed with `chat_template_kwargs`. The supported values are `json`, `xml`, and `xml_typed` . The default is `xml`. Keep `--tool-call-parser k2_horizon` enabled to parse the selected format.
103
+
104
  ### Transformers
105
 
106
  Validated with Transformers 4.57.6, PyTorch 2.13.0, Safetensors 0.8.0.