diff --git a/src/openai/types/chat/chat_completion_tool_message_param.py b/src/openai/types/chat/chat_completion_tool_message_param.py index eb5e270e47..c165c3cca8 100644 --- a/src/openai/types/chat/chat_completion_tool_message_param.py +++ b/src/openai/types/chat/chat_completion_tool_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import Optional, Union, Iterable from typing_extensions import Literal, Required, TypedDict from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam @@ -19,3 +19,13 @@ class ChatCompletionToolMessageParam(TypedDict, total=False): tool_call_id: Required[str] """Tool call that this message is responding to.""" + + name: Optional[str] + """The name of the tool that was called. + + This field is optional and mirrors the `name` field present on other message + types (e.g. ``ChatCompletionFunctionMessageParam``). Including the tool name + can improve clarity when multiple tools are used in a single conversation turn, + and is consistent with OpenAI's own documentation examples for parallel + function calling. + """