Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

anthropic[patch]: fix argument integration test #18605

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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