Document tool_call_format API options

#1
Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -100,13 +100,15 @@ response = client.chat.completions.create(
100
  temperature=1.0,
101
  top_p=0.95,
102
  max_tokens=32768,
103
- extra_body={"chat_template_kwargs": {"reasoning_effort": "high"}},
104
  )
105
  message = response.choices[0].message
106
  print("Reasoning:", getattr(message, "reasoning_content", None))
107
  print("Answer:", message.content)
108
  ```
109
 
 
 
110
  ### Transformers
111
 
112
  Validated with Transformers 5.15.0, PyTorch 2.13.0, Safetensors 0.8.0.
 
100
  temperature=1.0,
101
  top_p=0.95,
102
  max_tokens=32768,
103
+ extra_body={"chat_template_kwargs": {"reasoning_effort": "high", "tool_call_format": "xml"}},
104
  )
105
  message = response.choices[0].message
106
  print("Reasoning:", getattr(message, "reasoning_content", None))
107
  print("Answer:", message.content)
108
  ```
109
 
110
+ 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.
111
+
112
  ### Transformers
113
 
114
  Validated with Transformers 5.15.0, PyTorch 2.13.0, Safetensors 0.8.0.