DSPy: The framework for programming—not prompting—language models
Python
fix the type of format_demos (#8049)
TomuHirata80fa76b0b88d
diff --git a/dspy/adapters/base.py b/dspy/adapters/base.pyindex 52503781b..5569cfdd5 100644--- a/dspy/adapters/base.py+++ b/dspy/adapters/base.py@@ -212,7 +212,7 @@ class Adapter:"""raise NotImplementedError- def format_demos(self, signature: Type[Signature], demos: list[dict[str, Any]]) -> str:+ def format_demos(self, signature: Type[Signature], demos: list[dict[str, Any]]) -> list[dict[str, Any]]:"""Format the few-shot examples.This method formats the few-shot examples as multiturn messages.