DSPy: The framework for programming—not prompting—language models
Python
Fix/docstring examples section header (#9418)
Maxime Rivestbb7fd6f01c80
diff --git a/docs/docs/api/adapters/Adapter.md b/docs/docs/api/adapters/Adapter.mdindex 00cc4151b..4205f36ec 100644--- a/docs/docs/api/adapters/Adapter.md+++ b/docs/docs/api/adapters/Adapter.md@@ -25,5 +25,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/adapters/ChatAdapter.md b/docs/docs/api/adapters/ChatAdapter.mdindex 2bd2b06b5..be34970a1 100644--- a/docs/docs/api/adapters/ChatAdapter.md+++ b/docs/docs/api/adapters/ChatAdapter.md@@ -28,5 +28,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/adapters/JSONAdapter.md b/docs/docs/api/adapters/JSONAdapter.mdindex 65c274107..ab0472600 100644--- a/docs/docs/api/adapters/JSONAdapter.md+++ b/docs/docs/api/adapters/JSONAdapter.md@@ -28,5 +28,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/adapters/TwoStepAdapter.md b/docs/docs/api/adapters/TwoStepAdapter.mdindex 3594c4f55..1c3d7b328 100644--- a/docs/docs/api/adapters/TwoStepAdapter.md+++ b/docs/docs/api/adapters/TwoStepAdapter.md@@ -25,5 +25,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/CompleteAndGrounded.md b/docs/docs/api/evaluation/CompleteAndGrounded.mdindex 20bdb1d42..5c3c47288 100644--- a/docs/docs/api/evaluation/CompleteAndGrounded.md+++ b/docs/docs/api/evaluation/CompleteAndGrounded.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/Evaluate.md b/docs/docs/api/evaluation/Evaluate.mdindex 2c7c4451c..17d369d72 100644--- a/docs/docs/api/evaluation/Evaluate.md+++ b/docs/docs/api/evaluation/Evaluate.md@@ -14,5 +14,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/EvaluationResult.md b/docs/docs/api/evaluation/EvaluationResult.mdindex 3483670e2..c4aac4fde 100644--- a/docs/docs/api/evaluation/EvaluationResult.md+++ b/docs/docs/api/evaluation/EvaluationResult.md@@ -26,5 +26,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/SemanticF1.md b/docs/docs/api/evaluation/SemanticF1.mdindex 537a657db..aa419648f 100644--- a/docs/docs/api/evaluation/SemanticF1.md+++ b/docs/docs/api/evaluation/SemanticF1.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/answer_exact_match.md b/docs/docs/api/evaluation/answer_exact_match.mdindex 3ee483879..f3faa5f6a 100644--- a/docs/docs/api/evaluation/answer_exact_match.md+++ b/docs/docs/api/evaluation/answer_exact_match.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/evaluation/answer_passage_match.md b/docs/docs/api/evaluation/answer_passage_match.mdindex 7a571bcff..2fcbaf524 100644--- a/docs/docs/api/evaluation/answer_passage_match.md+++ b/docs/docs/api/evaluation/answer_passage_match.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/experimental/Citations.md b/docs/docs/api/experimental/Citations.mdindex 9650eee1e..3738fd892 100644--- a/docs/docs/api/experimental/Citations.md+++ b/docs/docs/api/experimental/Citations.md@@ -23,5 +23,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/experimental/Document.md b/docs/docs/api/experimental/Document.mdindex 885dd3d09..5b6fb6d64 100644--- a/docs/docs/api/experimental/Document.md+++ b/docs/docs/api/experimental/Document.md@@ -22,5 +22,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/models/Embedder.md b/docs/docs/api/models/Embedder.mdindex 510a749a2..48a2459ab 100644--- a/docs/docs/api/models/Embedder.md+++ b/docs/docs/api/models/Embedder.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/models/LM.md b/docs/docs/api/models/LM.mdindex b6c9732e2..f2d8d8247 100644--- a/docs/docs/api/models/LM.md+++ b/docs/docs/api/models/LM.md@@ -26,5 +26,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/BestOfN.md b/docs/docs/api/modules/BestOfN.mdindex ae778a6cb..225efff90 100644--- a/docs/docs/api/modules/BestOfN.md+++ b/docs/docs/api/modules/BestOfN.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/ChainOfThought.md b/docs/docs/api/modules/ChainOfThought.mdindex 978ffae3d..21a1fad94 100644--- a/docs/docs/api/modules/ChainOfThought.md+++ b/docs/docs/api/modules/ChainOfThought.md@@ -33,5 +33,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/Module.md b/docs/docs/api/modules/Module.mdindex c192fc707..dbce6fb2a 100644--- a/docs/docs/api/modules/Module.md+++ b/docs/docs/api/modules/Module.md@@ -31,5 +31,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/MultiChainComparison.md b/docs/docs/api/modules/MultiChainComparison.mdindex 364b66329..90f0a9501 100644--- a/docs/docs/api/modules/MultiChainComparison.md+++ b/docs/docs/api/modules/MultiChainComparison.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/Parallel.md b/docs/docs/api/modules/Parallel.mdindex 5c7985270..f935c2dbf 100644--- a/docs/docs/api/modules/Parallel.md+++ b/docs/docs/api/modules/Parallel.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/Predict.md b/docs/docs/api/modules/Predict.mdindex 6ae87aa1b..161ff3720 100644--- a/docs/docs/api/modules/Predict.md+++ b/docs/docs/api/modules/Predict.md@@ -36,5 +36,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/ProgramOfThought.md b/docs/docs/api/modules/ProgramOfThought.mdindex b8e76b509..91efe7194 100644--- a/docs/docs/api/modules/ProgramOfThought.md+++ b/docs/docs/api/modules/ProgramOfThought.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/RLM.md b/docs/docs/api/modules/RLM.mdindex c3d550bc1..c3e38c175 100644--- a/docs/docs/api/modules/RLM.md+++ b/docs/docs/api/modules/RLM.md@@ -262,5 +262,4 @@ RLM returns a `Prediction` with:show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/ReAct.md b/docs/docs/api/modules/ReAct.mdindex bf108aac8..b06dcf926 100644--- a/docs/docs/api/modules/ReAct.md+++ b/docs/docs/api/modules/ReAct.md@@ -34,5 +34,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/modules/Refine.md b/docs/docs/api/modules/Refine.mdindex 19d7f759f..152b1fcca 100644--- a/docs/docs/api/modules/Refine.md+++ b/docs/docs/api/modules/Refine.md@@ -32,5 +32,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/BetterTogether.md b/docs/docs/api/optimizers/BetterTogether.mdindex fc8712279..aa1cb995d 100644--- a/docs/docs/api/optimizers/BetterTogether.md+++ b/docs/docs/api/optimizers/BetterTogether.md@@ -17,7 +17,6 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->## Usage Examplesdiff --git a/docs/docs/api/optimizers/BootstrapFewShot.md b/docs/docs/api/optimizers/BootstrapFewShot.mdindex a02c14a63..3dace8195 100644--- a/docs/docs/api/optimizers/BootstrapFewShot.md+++ b/docs/docs/api/optimizers/BootstrapFewShot.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.md b/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.mdindex 24593f4ae..f2df1530b 100644--- a/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.md+++ b/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/BootstrapFinetune.md b/docs/docs/api/optimizers/BootstrapFinetune.mdindex 7e149fa16..8f1d3a337 100644--- a/docs/docs/api/optimizers/BootstrapFinetune.md+++ b/docs/docs/api/optimizers/BootstrapFinetune.md@@ -17,5 +17,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/BootstrapRS.md b/docs/docs/api/optimizers/BootstrapRS.mdindex 013356ed4..df523b4e7 100644--- a/docs/docs/api/optimizers/BootstrapRS.md+++ b/docs/docs/api/optimizers/BootstrapRS.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/COPRO.md b/docs/docs/api/optimizers/COPRO.mdindex 9f92e68cf..89926b407 100644--- a/docs/docs/api/optimizers/COPRO.md+++ b/docs/docs/api/optimizers/COPRO.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/Ensemble.md b/docs/docs/api/optimizers/Ensemble.mdindex 9cd5e00e0..58aef770f 100644--- a/docs/docs/api/optimizers/Ensemble.md+++ b/docs/docs/api/optimizers/Ensemble.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/GEPA/overview.md b/docs/docs/api/optimizers/GEPA/overview.mdindex 0125702be..fbb77acac 100644--- a/docs/docs/api/optimizers/GEPA/overview.md+++ b/docs/docs/api/optimizers/GEPA/overview.md@@ -18,7 +18,6 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->One of the key insights behind GEPA is its ability to leverage domain-specific textual feedback. Users should provide a feedback function as the GEPA metric, which has the following call signature:@@ -36,7 +35,6 @@ One of the key insights behind GEPA is its ability to leverage domain-specific tshow_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->When `track_stats=True`, GEPA returns detailed results about all of the proposed candidates, and metadata about the optimization run. The results are available in the `detailed_results` attribute of the optimized program returned by GEPA, and has the following type:@@ -52,7 +50,6 @@ When `track_stats=True`, GEPA returns detailed results about all of the proposedshow_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->## Usage Examplesdiff --git a/docs/docs/api/optimizers/InferRules.md b/docs/docs/api/optimizers/InferRules.mdindex b8af99a26..035c0b138 100644--- a/docs/docs/api/optimizers/InferRules.md+++ b/docs/docs/api/optimizers/InferRules.md@@ -20,5 +20,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/KNN.md b/docs/docs/api/optimizers/KNN.mdindex dcf4c7a24..d8c3fcf94 100644--- a/docs/docs/api/optimizers/KNN.md+++ b/docs/docs/api/optimizers/KNN.md@@ -14,5 +14,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/KNNFewShot.md b/docs/docs/api/optimizers/KNNFewShot.mdindex edcc54ea2..758a6f819 100644--- a/docs/docs/api/optimizers/KNNFewShot.md+++ b/docs/docs/api/optimizers/KNNFewShot.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/LabeledFewShot.md b/docs/docs/api/optimizers/LabeledFewShot.mdindex 55d7773c4..f1d96313e 100644--- a/docs/docs/api/optimizers/LabeledFewShot.md+++ b/docs/docs/api/optimizers/LabeledFewShot.md@@ -15,5 +15,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/optimizers/MIPROv2.md b/docs/docs/api/optimizers/MIPROv2.mdindex f1ebd22ed..ff57f1b79 100644--- a/docs/docs/api/optimizers/MIPROv2.md+++ b/docs/docs/api/optimizers/MIPROv2.md@@ -17,7 +17,6 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->## Example Usagediff --git a/docs/docs/api/primitives/Audio.md b/docs/docs/api/primitives/Audio.mdindex 6c766e8dc..129d9b358 100644--- a/docs/docs/api/primitives/Audio.md+++ b/docs/docs/api/primitives/Audio.md@@ -25,5 +25,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/Code.md b/docs/docs/api/primitives/Code.mdindex 3b2ec341e..d84b4b05a 100644--- a/docs/docs/api/primitives/Code.md+++ b/docs/docs/api/primitives/Code.md@@ -22,5 +22,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/Example.md b/docs/docs/api/primitives/Example.mdindex b312c581e..1cfecea07 100644--- a/docs/docs/api/primitives/Example.md+++ b/docs/docs/api/primitives/Example.md@@ -23,5 +23,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/History.md b/docs/docs/api/primitives/History.mdindex 1be9232b7..3b5b717d0 100644--- a/docs/docs/api/primitives/History.md+++ b/docs/docs/api/primitives/History.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/Image.md b/docs/docs/api/primitives/Image.mdindex 07a8eab87..fc46ce9cc 100644--- a/docs/docs/api/primitives/Image.md+++ b/docs/docs/api/primitives/Image.md@@ -24,5 +24,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/Prediction.md b/docs/docs/api/primitives/Prediction.mdindex 9060950f4..9f78b2b2c 100644--- a/docs/docs/api/primitives/Prediction.md+++ b/docs/docs/api/primitives/Prediction.md@@ -26,5 +26,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/Tool.md b/docs/docs/api/primitives/Tool.mdindex 22ba090a0..45f447e50 100644--- a/docs/docs/api/primitives/Tool.md+++ b/docs/docs/api/primitives/Tool.md@@ -26,5 +26,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/primitives/ToolCalls.md b/docs/docs/api/primitives/ToolCalls.mdindex 7f4c31db0..350bf0a9c 100644--- a/docs/docs/api/primitives/ToolCalls.md+++ b/docs/docs/api/primitives/ToolCalls.md@@ -23,5 +23,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/signatures/InputField.md b/docs/docs/api/signatures/InputField.mdindex 534b3740d..f9b679d71 100644--- a/docs/docs/api/signatures/InputField.md+++ b/docs/docs/api/signatures/InputField.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/signatures/OutputField.md b/docs/docs/api/signatures/OutputField.mdindex ca9f48584..16a096ca2 100644--- a/docs/docs/api/signatures/OutputField.md+++ b/docs/docs/api/signatures/OutputField.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/signatures/Signature.md b/docs/docs/api/signatures/Signature.mdindex 7272acd55..14e7db8ad 100644--- a/docs/docs/api/signatures/Signature.md+++ b/docs/docs/api/signatures/Signature.md@@ -22,5 +22,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/tools/ColBERTv2.md b/docs/docs/api/tools/ColBERTv2.mdindex 1743b07ad..9cfc13277 100644--- a/docs/docs/api/tools/ColBERTv2.md+++ b/docs/docs/api/tools/ColBERTv2.md@@ -14,5 +14,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/tools/Embeddings.md b/docs/docs/api/tools/Embeddings.mdindex 1b8a7bdf2..6be5d5574 100644--- a/docs/docs/api/tools/Embeddings.md+++ b/docs/docs/api/tools/Embeddings.md@@ -18,5 +18,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/tools/PythonInterpreter.md b/docs/docs/api/tools/PythonInterpreter.mdindex 4f428b6a1..1c0f87425 100644--- a/docs/docs/api/tools/PythonInterpreter.md+++ b/docs/docs/api/tools/PythonInterpreter.md@@ -17,5 +17,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/StatusMessage.md b/docs/docs/api/utils/StatusMessage.mdindex cab18fb3c..161b7a13d 100644--- a/docs/docs/api/utils/StatusMessage.md+++ b/docs/docs/api/utils/StatusMessage.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/StatusMessageProvider.md b/docs/docs/api/utils/StatusMessageProvider.mdindex e22db0ddd..19fac23ae 100644--- a/docs/docs/api/utils/StatusMessageProvider.md+++ b/docs/docs/api/utils/StatusMessageProvider.md@@ -19,5 +19,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/StreamListener.md b/docs/docs/api/utils/StreamListener.mdindex 66c2db8a1..48bd6f632 100644--- a/docs/docs/api/utils/StreamListener.md+++ b/docs/docs/api/utils/StreamListener.md@@ -16,5 +16,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/asyncify.md b/docs/docs/api/utils/asyncify.mdindex e42be0aa7..b1fa70a88 100644--- a/docs/docs/api/utils/asyncify.md+++ b/docs/docs/api/utils/asyncify.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/configure_cache.md b/docs/docs/api/utils/configure_cache.mdindex a13ae7b40..87516a942 100644--- a/docs/docs/api/utils/configure_cache.md+++ b/docs/docs/api/utils/configure_cache.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/disable_litellm_logging.md b/docs/docs/api/utils/disable_litellm_logging.mdindex 6280e7960..2d7b2a074 100644--- a/docs/docs/api/utils/disable_litellm_logging.md+++ b/docs/docs/api/utils/disable_litellm_logging.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/disable_logging.md b/docs/docs/api/utils/disable_logging.mdindex f2517325d..6bb9debbe 100644--- a/docs/docs/api/utils/disable_logging.md+++ b/docs/docs/api/utils/disable_logging.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/enable_litellm_logging.md b/docs/docs/api/utils/enable_litellm_logging.mdindex 3bd6f89d7..fa7f73705 100644--- a/docs/docs/api/utils/enable_litellm_logging.md+++ b/docs/docs/api/utils/enable_litellm_logging.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/enable_logging.md b/docs/docs/api/utils/enable_logging.mdindex 5fd3e7720..55ae12b02 100644--- a/docs/docs/api/utils/enable_logging.md+++ b/docs/docs/api/utils/enable_logging.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/inspect_history.md b/docs/docs/api/utils/inspect_history.mdindex 1de813af1..81357c6d7 100644--- a/docs/docs/api/utils/inspect_history.md+++ b/docs/docs/api/utils/inspect_history.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/load.md b/docs/docs/api/utils/load.mdindex 00fdd2c5a..dec1eaa57 100644--- a/docs/docs/api/utils/load.md+++ b/docs/docs/api/utils/load.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/docs/docs/api/utils/streamify.md b/docs/docs/api/utils/streamify.mdindex 22fb7951a..57e1f7ede 100644--- a/docs/docs/api/utils/streamify.md+++ b/docs/docs/api/utils/streamify.md@@ -12,5 +12,4 @@show_object_full_path: falseseparate_signature: falseinherited_members: true-:::<!-- END_API_REF -->diff --git a/dspy/adapters/two_step_adapter.py b/dspy/adapters/two_step_adapter.pyindex b78375f14..1ce6ecb81 100644--- a/dspy/adapters/two_step_adapter.py+++ b/dspy/adapters/two_step_adapter.py@@ -27,7 +27,7 @@ class TwoStepAdapter(Adapter):This class is particularly useful when interacting with reasoning models as the main LM since reasoning modelsare known to struggle with structured outputs.- Example:+ Examples:```import dspylm = dspy.LM(model="openai/o3-mini", max_tokens=16000, temperature = 1.0)diff --git a/dspy/adapters/types/base_type.py b/dspy/adapters/types/base_type.pyindex afcacb47a..4783cee03 100644--- a/dspy/adapters/types/base_type.py+++ b/dspy/adapters/types/base_type.py@@ -20,7 +20,7 @@ class Type(pydantic.BaseModel):This is the parent class of DSPy custom types, e.g, dspy.Image. Subclasses must implement the `format` method toreturn a list of dictionaries (same as the Array of content parts in the OpenAI API user message's content field).- Example:+ Examples:```pythonclass Image(Type):diff --git a/dspy/adapters/types/citation.py b/dspy/adapters/types/citation.pyindex e6ca01b2c..a8c5461a5 100644--- a/dspy/adapters/types/citation.py+++ b/dspy/adapters/types/citation.py@@ -14,7 +14,7 @@ class Citations(Type):citation extraction, particularly Anthropic's Citations API through LiteLLM.Citations include the quoted text and source information.- Example:+ Examples:```pythonimport osimport dspy@@ -98,7 +98,7 @@ class Citations(Type):Returns:A Citations instance.- Example:+ Examples:```pythoncitations_dict = [{diff --git a/dspy/adapters/types/document.py b/dspy/adapters/types/document.pyindex cd492a6ff..145f5eb90 100644--- a/dspy/adapters/types/document.py+++ b/dspy/adapters/types/document.py@@ -20,7 +20,7 @@ class Document(Type):media_type: MIME type of the document content (defaults to "text/plain")context: Optional context information about the document- Example:+ Examples:```pythonimport dspyfrom dspy.signatures import Signaturediff --git a/dspy/adapters/types/file.py b/dspy/adapters/types/file.pyindex 34bc2a011..cbb0cc3d7 100644--- a/dspy/adapters/types/file.py+++ b/dspy/adapters/types/file.py@@ -15,7 +15,7 @@ class File(Type):The file_data field should be a data URI with the format:data:<mime_type>;base64,<base64_encoded_data>- Example:+ Examples:```pythonimport dspydiff --git a/dspy/adapters/types/history.py b/dspy/adapters/types/history.pyindex 2c39d5c4a..6dda4f9b7 100644--- a/dspy/adapters/types/history.py+++ b/dspy/adapters/types/history.py@@ -18,7 +18,7 @@ class History(pydantic.BaseModel):Then the history should be a list of dictionaries with keys "question" and "answer".- Example:+ Examples:```import dspydiff --git a/dspy/adapters/types/tool.py b/dspy/adapters/types/tool.pyindex e6614837d..e6deb9b7c 100644--- a/dspy/adapters/types/tool.py+++ b/dspy/adapters/types/tool.py@@ -58,7 +58,7 @@ class Tool(Type):arg_desc (Optional[dict[str, str]], optional): Descriptions for each arg, represented as adictionary from arg name to description string. Defaults to None.- Example:+ Examples:```pythondef foo(x: int, y: str = "hello"):@@ -225,7 +225,7 @@ class Tool(Type):Returns:A Tool object.- Example:+ Examples:```pythonimport asyncio@@ -330,7 +330,7 @@ class ToolCalls(Type):Returns:A ToolCalls instance.- Example:+ Examples:```pythontool_calls_dict = [diff --git a/dspy/clients/base_lm.py b/dspy/clients/base_lm.pyindex d9dc9db47..d28e0fc2b 100644--- a/dspy/clients/base_lm.py+++ b/dspy/clients/base_lm.py@@ -18,7 +18,7 @@ class BaseLM:`forward` method and make sure the return format is identical to the[OpenAI response format](https://platform.openai.com/docs/api-reference/responses/object).- Example:+ Examples:```pythonfrom openai import OpenAIdiff --git a/dspy/clients/provider.py b/dspy/clients/provider.pyindex a209d122c..e47e3f692 100644--- a/dspy/clients/provider.py+++ b/dspy/clients/provider.py@@ -23,7 +23,7 @@ class TrainingJob(Future):train_data_format: The format of the training data.train_kwargs: Additional keyword arguments for training configuration.- Example:+ Examples:```pythonfrom dspy.clients.provider import TrainingJob@@ -91,7 +91,7 @@ class ReinforceJob:checkpoints: Dictionary storing checkpoint data.last_checkpoint: The name of the most recent checkpoint.- Example:+ Examples:```pythonfrom dspy.clients.provider import ReinforceJob@@ -190,7 +190,7 @@ class Provider:TrainingJob: The class to use for training jobs (subclass of `TrainingJob`).ReinforceJob: The class to use for reinforcement learning jobs (subclass of `ReinforceJob`).- Example:+ Examples:```pythonfrom dspy.clients.provider import Providerdiff --git a/dspy/evaluate/metrics.py b/dspy/evaluate/metrics.pyindex efd3929f0..882fb3231 100644--- a/dspy/evaluate/metrics.py+++ b/dspy/evaluate/metrics.py@@ -22,7 +22,7 @@ def EM(prediction, answers_list): # noqa: N802Returns:bool: Whether any reference exactly equals the prediction after normalization.- Example:+ Examples:```pythonEM("The Eiffel Tower", ["Eiffel Tower", "Louvre"]) # True@@ -49,7 +49,7 @@ def F1(prediction, answers_list): # noqa: N802Returns:float: Highest F1 score in [0.0, 1.0].- Example:+ Examples:```pythonround(F1("Eiffel Tower is in Paris", ["Paris"]), 2) # 0.33```@@ -73,7 +73,7 @@ def HotPotF1(prediction, answers_list): # noqa: N802Returns:float: Highest HotPotQA-style F1 in [0.0, 1.0].- Example:+ Examples:```pythonHotPotF1("yes", ["no"]) # 0.0```@@ -100,7 +100,7 @@ def normalize_text(s):Returns:str: Normalized string.- Example:+ Examples:```pythonnormalize_text("The, Eiffel Tower!") # "eiffel tower"```@@ -133,7 +133,7 @@ def em_score(prediction, ground_truth):Returns:bool: True if normalized strings are identical; otherwise False.- Example:+ Examples:```pythonem_score("Paris", "paris") # True```@@ -155,7 +155,7 @@ def f1_score(prediction, ground_truth):Returns:float: F1 score in [0.0, 1.0].- Example:+ Examples:```pythonround(f1_score("the Eiffel Tower", "Eiffel Tower"), 2) # 1.0```@@ -193,7 +193,7 @@ def hotpot_f1_score(prediction, ground_truth):Returns:float: HotPotQA-style F1 score in [0.0, 1.0].- Example:+ Examples:```pythonhotpot_f1_score("no", "yes") # 0.0```@@ -232,7 +232,7 @@ def precision_score(prediction, ground_truth):Returns:float: Precision in [0.0, 1.0].- Example:+ Examples:```pythonprecision_score("eiffel tower in paris", "eiffel tower") # 0.67```@@ -298,7 +298,7 @@ def answer_exact_match(example, pred, trace=None, frac=1.0):Returns:bool: True if the match condition holds; otherwise False.- Example:+ Examples:```pythonimport dspy@@ -330,7 +330,7 @@ def answer_passage_match(example, pred, trace=None):Returns:bool: True if any passage contains any reference answer; otherwise False.- Example:+ Examples:```pythonimport dspydiff --git a/dspy/predict/best_of_n.py b/dspy/predict/best_of_n.pyindex 789ea0ed8..c3f788c31 100644--- a/dspy/predict/best_of_n.py+++ b/dspy/predict/best_of_n.py@@ -25,7 +25,7 @@ class BestOfN(Module):threshold (float): The threshold for the reward function.fail_count (Optional[int], optional): The number of times the module can fail before raising an error. Defaults to N if not provided.- Example:+ Examples:```pythonimport dspydiff --git a/dspy/predict/code_act.py b/dspy/predict/code_act.pyindex 6d1616e5f..1773c8da1 100644--- a/dspy/predict/code_act.py+++ b/dspy/predict/code_act.py@@ -25,7 +25,7 @@ class CodeAct(ReAct, ProgramOfThought):tools (list[Callable]): The tool callables to be used. CodeAct only accepts functions and not callable objects.max_iters (int): The maximum number of iterations to generate the answer.interpreter: PythonInterpreter instance to use. If None, a new one is instantiated.- Example:+ Examples:```pythonfrom dspy.predict import CodeActdef factorial(n):diff --git a/dspy/predict/knn.py b/dspy/predict/knn.pyindex 142c53468..0e8a3711e 100644--- a/dspy/predict/knn.py+++ b/dspy/predict/knn.py@@ -14,7 +14,7 @@ class KNN:trainset: List of training examples to search throughvectorizer: The `Embedder` to use for vectorization- Example:+ Examples:```pythonimport dspyfrom sentence_transformers import SentenceTransformerdiff --git a/dspy/predict/program_of_thought.py b/dspy/predict/program_of_thought.pyindex e0d7bcb75..c92ddd4aa 100644--- a/dspy/predict/program_of_thought.py+++ b/dspy/predict/program_of_thought.py@@ -16,7 +16,7 @@ class ProgramOfThought(Module):A DSPy module that runs Python programs to solve a problem.This module requires deno to be installed. Please install deno following https://docs.deno.com/runtime/getting_started/installation/- Example:+ Examples:```import dspydiff --git a/dspy/predict/react.py b/dspy/predict/react.pyindex 2b93575f6..1300f1272 100644--- a/dspy/predict/react.py+++ b/dspy/predict/react.py@@ -28,7 +28,7 @@ class ReAct(Module):tools (list[Callable]): A list of functions, callable objects, or `dspy.Tool` instances.max_iters (Optional[int]): The maximum number of iterations to run. Defaults to 10.- Example:+ Examples:```pythondef get_weather(city: str) -> str:diff --git a/dspy/predict/refine.py b/dspy/predict/refine.pyindex 320365cb9..bc4aca45e 100644--- a/dspy/predict/refine.py+++ b/dspy/predict/refine.py@@ -63,7 +63,7 @@ class Refine(Module):threshold (float): The threshold for the reward function.fail_count (Optional[int], optional): The number of times the module can fail before raising an error- Example:+ Examples:```pythonimport dspydiff --git a/dspy/predict/rlm.py b/dspy/predict/rlm.pyindex 48f55f79e..e0b6e9ae6 100644--- a/dspy/predict/rlm.py+++ b/dspy/predict/rlm.py@@ -113,7 +113,7 @@ class RLM(Module):Create separate RLM instances for concurrent use, or use the defaultPythonInterpreter which creates a fresh instance per forward() call.- Example:+ Examples:```python# Basic usagerlm = dspy.RLM("context, query -> output", max_iterations=10)diff --git a/dspy/primitives/module.py b/dspy/primitives/module.pyindex 55db3c76d..c6f6f70b2 100644--- a/dspy/primitives/module.py+++ b/dspy/primitives/module.py@@ -55,7 +55,7 @@ class Module(BaseModule, metaclass=ProgramMeta):callbacks: List of registered callback handlers.history: List of LM call history for this module.- Example:+ Examples:>>> import dspy>>> class MyProgram(dspy.Module):... def __init__(self):@@ -139,7 +139,7 @@ class Module(BaseModule, metaclass=ProgramMeta):where name is the attribute path and predictor is thePredict instance.- Example:+ Examples:>>> import dspy>>> class MyProgram(dspy.Module):... def __init__(self):@@ -163,7 +163,7 @@ class Module(BaseModule, metaclass=ProgramMeta):Returns:list[Predict]: A list of all Predict instances in this module.- Example:+ Examples:>>> import dspy>>> class MyProgram(dspy.Module):... def __init__(self):@@ -185,7 +185,7 @@ class Module(BaseModule, metaclass=ProgramMeta):Args:lm: The language model instance to use for all predictors.- Example:+ Examples:>>> import dspy>>> lm = dspy.LM("openai/gpt-4o-mini")>>> program = dspy.Predict("question -> answer")@@ -236,7 +236,7 @@ class Module(BaseModule, metaclass=ProgramMeta):Returns:Module: Returns self for method chaining.- Example:+ Examples:>>> import dspy>>> class MyProgram(dspy.Module):... def __init__(self):diff --git a/dspy/primitives/python_interpreter.py b/dspy/primitives/python_interpreter.pyindex b97d50c2d..a64960522 100644--- a/dspy/primitives/python_interpreter.py+++ b/dspy/primitives/python_interpreter.py@@ -82,7 +82,7 @@ class PythonInterpreter:Prerequisites:Deno must be installed: https://docs.deno.com/runtime/getting_started/installation/- Example:+ Examples:```python# Basic executionwith PythonInterpreter() as interp:diff --git a/dspy/retrievers/embeddings.py b/dspy/retrievers/embeddings.pyindex 02da76007..94bbc589f 100644--- a/dspy/retrievers/embeddings.py+++ b/dspy/retrievers/embeddings.py@@ -198,7 +198,7 @@ class Embeddings:Returns:Embeddings instance loaded from disk- Example:+ Examples:```python# Save embeddingsembeddings = Embeddings(corpus, embedder)diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.pyindex 12d8037db..096a75057 100644--- a/dspy/signatures/signature.py+++ b/dspy/signatures/signature.py@@ -278,7 +278,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):A new Signature class whose fields match `cls.fields`and whose instructions equal `instructions`.- Example:+ Examples:```pythonimport dspy@@ -332,7 +332,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):Returns:A new `Signature` class with the field inserted first.- Example:+ Examples:```pythonimport dspy@@ -359,7 +359,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):Returns:A new Signature class with the field appended.- Example:+ Examples:```pythonimport dspy@@ -385,7 +385,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):Returns:A new Signature class with the field removed (or unchanged if the field was absent).- Example:+ Examples:```pythonimport dspy@@ -427,7 +427,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):Raises:ValueError: If `index` falls outside the valid range for the chosen section.- Example:+ Examples:```pythonimport dspydiff --git a/dspy/streaming/messages.py b/dspy/streaming/messages.pyindex 4170a0a49..b8cb33774 100644--- a/dspy/streaming/messages.py+++ b/dspy/streaming/messages.py@@ -57,7 +57,7 @@ class StatusMessageProvider:and override its methods to define specific status messages for different stages of program execution,each method must return a string.- Example:+ Examples:```pythonclass MyStatusMessageProvider(StatusMessageProvider):def lm_start_status_message(self, instance, inputs):diff --git a/dspy/streaming/streamify.py b/dspy/streaming/streamify.pyindex 4d935308a..730223f4c 100644--- a/dspy/streaming/streamify.py+++ b/dspy/streaming/streamify.py@@ -58,7 +58,7 @@ def streamify(A function that takes the same arguments as the original program, but returns an asyncgenerator that yields the program's outputs incrementally.- Example:+ Examples:```pythonimport asynciodiff --git a/dspy/teleprompt/bettertogether.py b/dspy/teleprompt/bettertogether.pyindex c842df6f5..1294c5722 100644--- a/dspy/teleprompt/bettertogether.py+++ b/dspy/teleprompt/bettertogether.py@@ -157,7 +157,7 @@ class BetterTogether(Teleprompter):defaults to ``p=BootstrapFewShotWithRandomSearch(metric=metric)`` and``w=BootstrapFinetune(metric=metric)``. Any DSPy Teleprompter can be used.- Example:+ Examples:>>> # Use custom optimizers>>> from dspy.teleprompt import GEPA, BootstrapFinetune>>> optimizer = BetterTogether(@@ -257,7 +257,7 @@ class BetterTogether(Teleprompter):contains invalid optimizer keys, or optimizer_compile_args contains invalid arguments.TypeError: If optimizer_compile_args contains a 'student' key (not allowed).- Example:+ Examples:>>> optimizer = BetterTogether(... metric=metric,... p=GEPA(metric=metric),diff --git a/dspy/teleprompt/gepa/gepa.py b/dspy/teleprompt/gepa/gepa.pyindex 5995b67bb..2fdc0494d 100644--- a/dspy/teleprompt/gepa/gepa.py+++ b/dspy/teleprompt/gepa/gepa.py@@ -194,7 +194,7 @@ class GEPA(Teleprompter):GEPA can also be used as a batch inference-time search strategy, by passing `valset=trainset, track_stats=True, track_best_outputs=True`, and using the`detailed_results` attribute of the optimized program (returned by `compile`) to get the Pareto frontier of the batch. `optimized_program.detailed_results.best_outputs_valset` will contain the best outputs for each task in the batch.- Example:+ Examples:```gepa = GEPA(metric=metric, track_stats=True)batch_of_tasks = [dspy.Example(...) for task in tasks]diff --git a/dspy/teleprompt/knn_fewshot.py b/dspy/teleprompt/knn_fewshot.pyindex 0c8557ca6..20124afef 100644--- a/dspy/teleprompt/knn_fewshot.py+++ b/dspy/teleprompt/knn_fewshot.py@@ -21,7 +21,7 @@ class KNNFewShot(Teleprompter):vectorizer: The `Embedder` to use for vectorization**few_shot_bootstrap_args: Additional arguments for the `BootstrapFewShot` optimizer.- Example:+ Examples:```pythonimport dspyfrom sentence_transformers import SentenceTransformerdiff --git a/dspy/utils/dummies.py b/dspy/utils/dummies.pyindex e0ff12d3b..648f759fb 100644--- a/dspy/utils/dummies.py+++ b/dspy/utils/dummies.py@@ -20,7 +20,7 @@ class DummyLM(LM):If a list of dictionaries is provided, the dummy model will return the next dictionaryin the list for each request, formatted according to the `format_field_with_value` function.- Example:+ Examples:```lm = DummyLM([{"answer": "red"}, {"answer": "blue"}])