mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-29 21:30:18 +00:00
Harrison/memory check (#2119)
Co-authored-by: JIAQIA <jqq1716@gmail.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user