mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 20:09:01 +00:00
strip whitespace (#680)
This commit is contained in:
@@ -19,6 +19,14 @@ def test_get_action_and_input() -> None:
|
||||
assert action_input == "NBA"
|
||||
|
||||
|
||||
def test_get_action_and_input_whitespace() -> None:
|
||||
"""Test getting an action from text."""
|
||||
llm_output = "Thought: I need to search for NBA\nAction: Search \nAction Input: NBA"
|
||||
action, action_input = get_action_and_input(llm_output)
|
||||
assert action == "Search"
|
||||
assert action_input == "NBA"
|
||||
|
||||
|
||||
def test_get_final_answer() -> None:
|
||||
"""Test getting final answer."""
|
||||
llm_output = (
|
||||
|
Reference in New Issue
Block a user