Skip to content

Commit

Permalink
improve docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Dec 20, 2024
1 parent 5acdd10 commit edc68d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions haystack/dataclasses/chat_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit edc68d1

Please sign in to comment.