Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

misc

Shangyint2d11532b807c
diff --git a/dspy/primitives/assertions.py b/dspy/primitives/assertions.py
index c33f5658c..c66f50202 100644
--- a/dspy/primitives/assertions.py
+++ b/dspy/primitives/assertions.py
@@ -82,7 +82,9 @@ class Suggest(Constraint):
return True
else:
logger.error(f"SuggestionFailed: {self.msg}")
- raise DSPyAssertionError(msg=self.msg, state=dsp.settings.trace)
+ raise DSPySuggestionError(msg=self.msg, state=dsp.settings.trace)
+ else:
+ raise ValueError("Suggestion function should always return [bool]")
def noop_handler(func):