Fix: add required prefix argument to parse_response across all usage snippets

#11
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -170,7 +170,7 @@ outputs = model.generate(**inputs, max_new_tokens=1024)
170
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
171
 
172
  # Parse output
173
- processor.parse_response(response)
174
  ```
175
 
176
  To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
@@ -230,7 +230,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
230
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
231
 
232
  # Parse output
233
- processor.parse_response(response)
234
  ```
235
 
236
  </details>
@@ -288,7 +288,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
288
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
289
 
290
  # Parse output
291
- processor.parse_response(response)
292
  ```
293
 
294
  </details>
@@ -347,7 +347,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
347
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
348
 
349
  # Parse output
350
- processor.parse_response(response)
351
  ```
352
 
353
  </details>
 
170
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
171
 
172
  # Parse output
173
+ processor.parse_response(response, prefix=inputs["input_ids"])
174
  ```
175
 
176
  To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
 
230
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
231
 
232
  # Parse output
233
+ processor.parse_response(response, prefix=inputs["input_ids"])
234
  ```
235
 
236
  </details>
 
288
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
289
 
290
  # Parse output
291
+ processor.parse_response(response, prefix=inputs["input_ids"])
292
  ```
293
 
294
  </details>
 
347
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
348
 
349
  # Parse output
350
+ processor.parse_response(response, prefix=inputs["input_ids"])
351
  ```
352
 
353
  </details>