Skip to content

Commit 4cae555

Browse files
committed
tests: add messages
1 parent 5b3fa1f commit 4cae555

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_basic.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ def test_basic_print():
5050
def test_basic_chain():
5151
p = P("you're a helpful assistant.")
5252
p2 = P("you're a helpful assistant.")
53+
54+
pc = p / p2
55+
assert pc.messages() == [
56+
{"role": "user", "content": "you're a helpful assistant."},
57+
{"role": "assistant", "content": "you're a helpful assistant."},
58+
]
59+
5360
pc = p / p2 / p
5461
assert pc.roles == [None, None, None]
5562
assert len(pc) == 3

0 commit comments

Comments
 (0)