Skip to content

Commit 837e1d2

Browse files
committed
Merge branch '0.3.0' into input-validation
2 parents 6d03e84 + 43f974c commit 837e1d2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

guardrails/run.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def prepare(
484484
)
485485
else:
486486
raise UserFacingException(
487-
ValueError("Prompt or message history must be provided.")
487+
ValueError("'prompt' or 'msg_history' must be provided.")
488488
)
489489

490490
action.log(
@@ -544,7 +544,7 @@ def call(
544544
except Exception:
545545
llm_response = api(prompt.source)
546546
else:
547-
raise ValueError("Prompt or message history must be provided.")
547+
raise ValueError("'prompt' or 'msg_history' must be provided.")
548548

549549
action.log(
550550
message_type="info",
@@ -924,7 +924,9 @@ async def async_call(
924924
except Exception:
925925
llm_response = await api(prompt.source)
926926
else:
927-
raise ValueError("Output, prompt or message history must be provided.")
927+
raise ValueError(
928+
"'output', 'prompt' or 'msg_history' must be provided."
929+
)
928930

929931
action.log(
930932
message_type="info",

0 commit comments

Comments
 (0)