test_tools_output_parser_empty_content() — langchain Function Reference
Architecture documentation for the test_tools_output_parser_empty_content() function in test_output_parsers.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 46047f6c_2c5a_242c_9217_7368affb684d["test_tools_output_parser_empty_content()"] d0555d77_871a_515b_e021_71707366ba98["test_output_parsers.py"] 46047f6c_2c5a_242c_9217_7368affb684d -->|defined in| d0555d77_871a_515b_e021_71707366ba98 style 46047f6c_2c5a_242c_9217_7368affb684d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/test_output_parsers.py lines 93–114
def test_tools_output_parser_empty_content() -> None:
class ChartType(BaseModel):
chart_type: Literal["pie", "line", "bar"]
output_parser = ToolsOutputParser(
first_tool_only=True,
pydantic_schemas=[ChartType],
)
message = AIMessage(
"",
tool_calls=[
{
"name": "ChartType",
"args": {"chart_type": "pie"},
"id": "foo",
"type": "tool_call",
},
],
)
actual = output_parser.invoke(message)
expected = ChartType(chart_type="pie")
assert expected == actual
Domain
Subdomains
Source
Frequently Asked Questions
What does test_tools_output_parser_empty_content() do?
test_tools_output_parser_empty_content() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_output_parsers.py.
Where is test_tools_output_parser_empty_content() defined?
test_tools_output_parser_empty_content() is defined in libs/partners/anthropic/tests/unit_tests/test_output_parsers.py at line 93.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free