From edc68d129c8b2163eb7e4272599e3aebae0ed261 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Fri, 20 Dec 2024 19:12:17 +0100 Subject: [PATCH] improve docstring --- haystack/dataclasses/chat_message.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/haystack/dataclasses/chat_message.py b/haystack/dataclasses/chat_message.py index 1d1e8f4194..76d1be8a42 100644 --- a/haystack/dataclasses/chat_message.py +++ b/haystack/dataclasses/chat_message.py @@ -437,8 +437,9 @@ def from_openai_dict_format(cls, message: Dict[str, Any]) -> "ChatMessage": Create a ChatMessage from a dictionary in the format expected by OpenAI's Chat API. NOTE: While OpenAI's API requires `tool_call_id` in both tool calls and tool messages, this method - accepts messages without it to support shallow OpenAI-compatible APIs. However, if you plan to use the - resulting ChatMessage with OpenAI, you must include `tool_call_id` or you'll encounter validation errors. + accepts messages without it to support shallow OpenAI-compatible APIs. + If you plan to use the resulting ChatMessage with OpenAI, you must include `tool_call_id` or you'll + encounter validation errors. :param message: The OpenAI dictionary to build the ChatMessage object.