Skip to content

Commit

Permalink
anthropic[patch]: fix argument integration test (langchain-ai#18605)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored and thebhulawat committed Mar 6, 2024
1 parent 22a1879 commit 8b4ea65
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 8b4ea65

Please sign in to comment.