test_partial_json_output_parser_return_id() — langchain Function Reference
Architecture documentation for the test_partial_json_output_parser_return_id() function in test_openai_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f3ddee10_e9c4_062e_9f7d_6cbb6b918119["test_partial_json_output_parser_return_id()"] 0f94a062_f577_31c7_fb9c_0f526b273e64["test_openai_tools.py"] f3ddee10_e9c4_062e_9f7d_6cbb6b918119 -->|defined in| 0f94a062_f577_31c7_fb9c_0f526b273e64 fb247906_e10d_6b69_ad23_383ab40a425f["_get_iter()"] f3ddee10_e9c4_062e_9f7d_6cbb6b918119 -->|calls| fb247906_e10d_6b69_ad23_383ab40a425f style f3ddee10_e9c4_062e_9f7d_6cbb6b918119 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/output_parsers/test_openai_tools.py lines 418–433
def test_partial_json_output_parser_return_id(*, use_tool_calls: bool) -> None:
input_iter = _get_iter(use_tool_calls=use_tool_calls)
chain = input_iter | JsonOutputToolsParser(return_id=True)
actual = list(chain.stream(None))
expected: list[list[dict[str, Any]]] = [[]] + [
[
{
"type": "NameCollector",
"args": chunk,
"id": "call_OwL7f5PEPJTYzw9sQlNJtCZl",
}
]
for chunk in EXPECTED_STREAMED_JSON
]
assert actual == expected
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_partial_json_output_parser_return_id() do?
test_partial_json_output_parser_return_id() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/output_parsers/test_openai_tools.py.
Where is test_partial_json_output_parser_return_id() defined?
test_partial_json_output_parser_return_id() is defined in libs/core/tests/unit_tests/output_parsers/test_openai_tools.py at line 418.
What does test_partial_json_output_parser_return_id() call?
test_partial_json_output_parser_return_id() calls 1 function(s): _get_iter.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free