get_action_and_input() — langchain Function Reference
Architecture documentation for the get_action_and_input() function in test_chat.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 944de1bd_501a_1d52_838f_49084107eecf["get_action_and_input()"] f5bec192_7de8_cc94_e8e5_efb1fe183808["test_chat.py"] 944de1bd_501a_1d52_838f_49084107eecf -->|defined in| f5bec192_7de8_cc94_e8e5_efb1fe183808 5eeade03_e2d1_a3a6_8a30_d48036aca668["test_parse_with_language()"] 5eeade03_e2d1_a3a6_8a30_d48036aca668 -->|calls| 944de1bd_501a_1d52_838f_49084107eecf 0b1de780_4b20_3a45_14f2_1305cb10c996["test_parse_without_language()"] 0b1de780_4b20_3a45_14f2_1305cb10c996 -->|calls| 944de1bd_501a_1d52_838f_49084107eecf style 944de1bd_501a_1d52_838f_49084107eecf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_chat.py lines 10–14
def get_action_and_input(text: str) -> tuple[str, str]:
output = output_parser.parse(text)
if isinstance(output, AgentAction):
return output.tool, str(output.tool_input)
return "Final Answer", output.return_values["output"]
Domain
Subdomains
Source
Frequently Asked Questions
What does get_action_and_input() do?
get_action_and_input() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_chat.py.
Where is get_action_and_input() defined?
get_action_and_input() is defined in libs/langchain/tests/unit_tests/agents/test_chat.py at line 10.
What calls get_action_and_input()?
get_action_and_input() is called by 2 function(s): test_parse_with_language, test_parse_without_language.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free