hanseungwook commited on
Commit
2380a9d
·
verified ·
1 Parent(s): 41ef143

Document tool_call_format API options

Browse files

Adds the supported tool-call format values and notes that the k2_horizon parser must remain enabled.

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