Skip to content

Commit 050c01a

Browse files
authored
Use field names in message history instead of explanations
1 parent ff395e8 commit 050c01a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guardrails/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def prepare(
308308
api, instructions, prompt
309309
)
310310
else:
311-
raise ValueError("Prompt or message history must be provided.")
311+
raise ValueError("'prompt' or 'msg_history' must be provided.")
312312

313313
action.log(
314314
message_type="info",
@@ -367,7 +367,7 @@ def call(
367367
except Exception:
368368
llm_response = api(prompt.source)
369369
else:
370-
raise ValueError("Prompt or message history must be provided.")
370+
raise ValueError("'prompt' or 'msg_history' must be provided.")
371371

372372
action.log(
373373
message_type="info",
@@ -695,7 +695,7 @@ async def async_call(
695695
except Exception:
696696
llm_response = await api(prompt.source)
697697
else:
698-
raise ValueError("Output, prompt or message history must be provided.")
698+
raise ValueError("'output', 'prompt' or 'msg_history' must be provided.")
699699

700700
action.log(
701701
message_type="info",

0 commit comments

Comments
 (0)