Home / Function/ test_func_call_invalid() — langchain Function Reference

test_func_call_invalid() — langchain Function Reference

Architecture documentation for the test_func_call_invalid() function in test_openai_functions_multi.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7282a82f_e3ca_276a_0b12_02f0944b63b9["test_func_call_invalid()"]
  744eb6ed_e970_902c_3b2f_989585354200["TestParseAIMessage"]
  7282a82f_e3ca_276a_0b12_02f0944b63b9 -->|defined in| 744eb6ed_e970_902c_3b2f_989585354200
  style 7282a82f_e3ca_276a_0b12_02f0944b63b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py lines 80–91

    def test_func_call_invalid(self) -> None:
        msg = AIMessage(
            content="LLM thoughts.",
            additional_kwargs={"function_call": {"name": "foo", "arguments": "{42]"}},
        )

        err = (
            "Could not parse tool input: {'name': 'foo', 'arguments': '{42]'} "
            "because the `arguments` is not valid JSON."
        )
        with pytest.raises(OutputParserException, match=err):
            _parse_ai_message(msg)

Domain

Subdomains

Frequently Asked Questions

What does test_func_call_invalid() do?
test_func_call_invalid() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py.
Where is test_func_call_invalid() defined?
test_func_call_invalid() is defined in libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py at line 80.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free