Skip to content

Commit

Permalink
anthropic[patch]: fix argument integration test (#18605)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis committed Mar 5, 2024
1 parent bd49931 commit 1831733
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Test ChatAnthropic chat model."""

import json

from langchain_core.prompts import ChatPromptTemplate
from langchain_core.pydantic_v1 import BaseModel

Expand Down Expand Up @@ -114,7 +116,7 @@ class Person(BaseModel):
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:
Expand Down

0 comments on commit 1831733

Please sign in to comment.