|
|
|
@ -68,6 +68,13 @@ def test_sequential_usage_memory() -> None:
|
|
|
|
|
output = chain({"foo": "123"})
|
|
|
|
|
expected_output = {"baz": "123foofoo", "foo": "123", "zab": "rab"}
|
|
|
|
|
assert output == expected_output
|
|
|
|
|
memory = SimpleMemory(memories={"zab": "rab", "foo": "rab"})
|
|
|
|
|
chain_1 = FakeChain(input_variables=["foo"], output_variables=["bar"])
|
|
|
|
|
chain_2 = FakeChain(input_variables=["bar"], output_variables=["baz"])
|
|
|
|
|
with pytest.raises(ValueError):
|
|
|
|
|
SequentialChain(
|
|
|
|
|
memory=memory, chains=[chain_1, chain_2], input_variables=["foo"]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_sequential_usage_multiple_outputs() -> None:
|
|
|
|
|