From 1831733c2e36a9f0fe417ea28c22a64a824d50db Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Tue, 5 Mar 2024 13:05:25 -0800 Subject: [PATCH] anthropic[patch]: fix argument integration test (#18605) --- .../anthropic/tests/integration_tests/test_experimental.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/partners/anthropic/tests/integration_tests/test_experimental.py b/libs/partners/anthropic/tests/integration_tests/test_experimental.py index 938681cceb..59a9288f29 100644 --- a/libs/partners/anthropic/tests/integration_tests/test_experimental.py +++ b/libs/partners/anthropic/tests/integration_tests/test_experimental.py @@ -1,5 +1,7 @@ """Test ChatAnthropic chat model.""" +import json + from langchain_core.prompts import ChatPromptTemplate from langchain_core.pydantic_v1 import BaseModel @@ -114,7 +116,7 @@ def test_tools() -> None: assert tool_call["type"] == "function" function = tool_call["function"] assert function["name"] == "Person" - assert function["arguments"] == {"name": "Erick", "age": "27"} + assert json.loads(function["arguments"]) == {"name": "Erick", "age": "27"} def test_with_structured_output() -> None: