test_get_action_and_input_newline_after_keyword() — langchain Function Reference
Architecture documentation for the test_get_action_and_input_newline_after_keyword() function in test_mrkl.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b519d8f2_549d_98d4_86d1_54296c7c626a["test_get_action_and_input_newline_after_keyword()"] 11e4d0ce_1ab2_b50d_7115_96011ca80049["test_mrkl.py"] b519d8f2_549d_98d4_86d1_54296c7c626a -->|defined in| 11e4d0ce_1ab2_b50d_7115_96011ca80049 893a0b31_0a99_6756_3281_2a5a05606fe2["get_action_and_input()"] b519d8f2_549d_98d4_86d1_54296c7c626a -->|calls| 893a0b31_0a99_6756_3281_2a5a05606fe2 style b519d8f2_549d_98d4_86d1_54296c7c626a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_mrkl.py lines 49–69
def test_get_action_and_input_newline_after_keyword() -> None:
"""Test when there is a new line before the action.
Test getting an action and action input from the text
when there is a new line before the action
(after the keywords "Action:" and "Action Input:").
"""
llm_output = """
I can use the `ls` command to list the contents of the directory \
and `grep` to search for the specific file.
Action:
Terminal
Action Input:
ls -l ~/.bashrc.d/
"""
action, action_input = get_action_and_input(llm_output)
assert action == "Terminal"
assert action_input == "ls -l ~/.bashrc.d/\n"
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_get_action_and_input_newline_after_keyword() do?
test_get_action_and_input_newline_after_keyword() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_mrkl.py.
Where is test_get_action_and_input_newline_after_keyword() defined?
test_get_action_and_input_newline_after_keyword() is defined in libs/langchain/tests/unit_tests/agents/test_mrkl.py at line 49.
What does test_get_action_and_input_newline_after_keyword() call?
test_get_action_and_input_newline_after_keyword() calls 1 function(s): get_action_and_input.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free