mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 12:07:36 +00:00
Harrison/add human prefix (#520)
Co-authored-by: Andrew Huang <jhuang16888@gmail.com>
This commit is contained in:
@@ -19,6 +19,13 @@ def test_memory_ai_prefix() -> None:
|
||||
assert memory.buffer == "\nHuman: bar\nAssistant: foo"
|
||||
|
||||
|
||||
def test_memory_human_prefix() -> None:
|
||||
"""Test that human_prefix in the memory component works."""
|
||||
memory = ConversationBufferMemory(memory_key="foo", human_prefix="Friend")
|
||||
memory.save_context({"input": "bar"}, {"output": "foo"})
|
||||
assert memory.buffer == "\nFriend: bar\nAI: foo"
|
||||
|
||||
|
||||
def test_conversation_chain_works() -> None:
|
||||
"""Test that conversation chain works in basic setting."""
|
||||
llm = FakeLLM()
|
||||
|
Reference in New Issue
Block a user