From a5304aeb9b8fde8c8190acfce7cdc17ffa837bc0 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 18 Dec 2024 11:19:51 -0500 Subject: [PATCH] x --- libs/core/tests/unit_tests/test_messages.py | 36 +++++++++++---------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/libs/core/tests/unit_tests/test_messages.py b/libs/core/tests/unit_tests/test_messages.py index 27c76b4049f..146b5be6f94 100644 --- a/libs/core/tests/unit_tests/test_messages.py +++ b/libs/core/tests/unit_tests/test_messages.py @@ -408,37 +408,39 @@ def test_multiple_msg_with_name() -> None: "input_message, expected_message", [ ( - {"type": "human", "data": {"content": "Hello!", "id": "human1"}}, - HumanMessage(content="Hello!", id="human1"), + {"type": "human", "data": {"content": "Hello!", "id": "human1"}}, + HumanMessage(content="Hello!", id="human1"), ), ( - {"type": "ai", "data": {"content": "Hi!", "id": "ai1"}}, - AIMessage(content="Hi!", id="ai1"), + {"type": "ai", "data": {"content": "Hi!", "id": "ai1"}}, + AIMessage(content="Hi!", id="ai1"), ), ( - {"type": "system", "data": {"content": "You are a helpful assistant."}}, - SystemMessage(content="You are a helpful assistant."), + {"type": "system", "data": {"content": "You are a helpful assistant."}}, + SystemMessage(content="You are a helpful assistant."), ), ( - {"type": "developer", "data": {"content": "System-level control."}}, - SystemMessage(content="System-level control."), + {"type": "developer", "data": {"content": "System-level control."}}, + SystemMessage(content="System-level control."), ), ( - {"type": "function", "data": {"name": "greet", "content": "Hello!"}}, - FunctionMessage(name="greet", content="Hello!"), + {"type": "function", "data": {"name": "greet", "content": "Hello!"}}, + FunctionMessage(name="greet", content="Hello!"), ), ( - {"type": "tool", - "data": {"tool_call_id": "tool1", "content": "Tool output"}}, - ToolMessage(tool_call_id="tool1", content="Tool output"), + { + "type": "tool", + "data": {"tool_call_id": "tool1", "content": "Tool output"}, + }, + ToolMessage(tool_call_id="tool1", content="Tool output"), ), ( - {"type": "remove", "data": {"id": "remove1", "content": ""}}, - RemoveMessage(id="remove1"), + {"type": "remove", "data": {"id": "remove1", "content": ""}}, + RemoveMessage(id="remove1"), ), ( - {"type": "AIMessageChunk", "data": {"content": "AI chunk"}}, - AIMessageChunk(content="AI chunk"), + {"type": "AIMessageChunk", "data": {"content": "AI chunk"}}, + AIMessageChunk(content="AI chunk"), ), ], )