Print the dict keys instead of the whole dict so the example doesn't become too big

This commit is contained in:
Matt
2025-10-17 17:51:18 +01:00
parent 9c197d425f
commit 24f01436d5

View File

@ -84,7 +84,13 @@ input_ids = tokenizer.apply_chat_template(
outputs = model.generate(input_ids, max_new_tokens=1024)[0, input_ids.shape[1]:]
out_text = tokenizer.decode(outputs)
parsed = tokenizer.parse_response(out_text)
print(parsed)
print(parsed.keys())
```
And you should get:
```text
dict_keys(['thinking', 'content'])
```
And that's all you need to start using response parsing! `parse_response` should return a complete message dict that is ready to be appended to the chat history.