The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Extend test
Nuno Camposfdcd50aab4c1
diff --git a/libs/langchain/tests/unit_tests/schema/runnable/test_runnable.py b/libs/langchain/tests/unit_tests/schema/runnable/test_runnable.pyindex c6630d7a6d..ed40dec28d 100644--- a/libs/langchain/tests/unit_tests/schema/runnable/test_runnable.py+++ b/libs/langchain/tests/unit_tests/schema/runnable/test_runnable.py@@ -1113,10 +1113,16 @@ def test_each(snapshot: SnapshotAssertion) -> None:+ "{question}")first_llm = FakeStreamingListLLM(responses=["first item, second item, third item"])+ parser = FakeSplitIntoListParser()second_llm = FakeStreamingListLLM(responses=["this", "is", "a", "test"])- chain = prompt | first_llm | FakeSplitIntoListParser() | second_llm.map()+ chain = prompt | first_llm | parser | second_llm.map()assert dumps(chain, pretty=True) == snapshotoutput = chain.invoke({"question": "What up"})assert output == ["this", "is", "a"]++ assert (parser | second_llm.map()).invoke("first item, second item") == [+ "test",+ "this",+ ]