Skip to content

Commit 30856b7

Browse files
committed
test(runnable_rails): fix prompt format in passthrough mode
1 parent 955076e commit 30856b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/runnable_rails/test_runnable_rails.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ def test_string_passthrough_mode_on_with_dialog_rails():
327327
info = model_with_rails.rails.explain()
328328
assert len(info.llm_calls) == 2
329329

330-
assert info.llm_calls[1].prompt == "The capital of France is "
330+
# In passthrough mode with dialog rails, the second call should use the message format
331+
# since RunnableRails converts StringPromptValue to message list, which gets formatted as "Human: ..."
332+
assert info.llm_calls[1].prompt == "Human: The capital of France is "
331333
assert result == "Paris."
332334

333335

0 commit comments

Comments
 (0)