DSPy: The framework for programming—not prompting—language models
Python
fix: Allow DummyLM answers dict values to be of any type to work with a wider range of signatures (#8803)
Ben McHone9c69dedf4bd7
diff --git a/dspy/utils/dummies.py b/dspy/utils/dummies.pyindex 20d54a623..a79f6b6c4 100644--- a/dspy/utils/dummies.py+++ b/dspy/utils/dummies.py@@ -67,7 +67,7 @@ class DummyLM(LM):"""- def __init__(self, answers: list[dict[str, str]] | dict[str, dict[str, str]], follow_examples: bool = False, adapter=None):+ def __init__(self, answers: list[dict[str, Any]] | dict[str, dict[str, Any]], follow_examples: bool = False, adapter=None):super().__init__("dummy", "chat", 0.0, 1000, True)self.answers = answersif isinstance(answers, list):