Skip to content

Commit c339cc8

Browse files
committed
Merge branch 'main' of github.com:huggingface/transformers into refactor-tokenization-more
2 parents 4600c0a + 7266f50 commit c339cc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1148
-1328
lines changed

docs/source/en/_toctree.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@
8888
title: Tool use
8989
- local: chat_templating_writing
9090
title: Writing a chat template
91-
- local: chat_response_parsing
92-
title: Response parsing
9391
title: Chat with models
9492
- sections:
9593
- local: serving

docs/source/en/chat_extras.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,8 @@ print(tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):]))
9595

9696
The chat model called the `get_current_temperature` tool with the correct parameters from the docstring. It inferred France as the location based on Paris, and that it should use Celsius for the units of temperature.
9797

98-
A model **cannot actually call the tool itself**. It requests a tool call, and it's your job to handle the call and append it and the result to the chat history. For
99-
models that support [response parsing](./chat_response_parsing), the response parsing will be handled automatically, and you can just use
100-
[`~PreTrainedTokenizer.parse_response] to extract the tool call. For other models, you'll need to manually translate the output
101-
string into a tool call dict.
102-
103-
Regardless of the approach you use, the tool call should go in the `tool_calls` key of an `assistant` message. This is the recommended API, and should be supported by the chat template of most tool-using models.
98+
A model **cannot actually call the tool itself**. It requests a tool call, and it's your job to handle the call and append it and the result to the chat history. You'll need to manually translate the output
99+
string into a tool call dict. The tool call should go in the `tool_calls` key of an `assistant` message. This is the recommended API, and should be supported by the chat template of most tool-using models.
104100

105101
> [!WARNING]
106102
> Although `tool_calls` is similar to the OpenAI API, the OpenAI API uses a JSON string as its `tool_calls` format. This may cause errors or strange model behavior if used in Transformers, which expects a dict.

docs/source/en/chat_response_parsing.md

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
 (0)