Skip to content

armgit / dspy

Public Imported from GitHub
0

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.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/adapters/ChatAdapter.md b/docs/docs/api/adapters/ChatAdapter.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/adapters/JSONAdapter.md b/docs/docs/api/adapters/JSONAdapter.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/adapters/TwoStepAdapter.md b/docs/docs/api/adapters/TwoStepAdapter.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/CompleteAndGrounded.md b/docs/docs/api/evaluation/CompleteAndGrounded.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/Evaluate.md b/docs/docs/api/evaluation/Evaluate.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/EvaluationResult.md b/docs/docs/api/evaluation/EvaluationResult.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/SemanticF1.md b/docs/docs/api/evaluation/SemanticF1.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/answer_exact_match.md b/docs/docs/api/evaluation/answer_exact_match.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/evaluation/answer_passage_match.md b/docs/docs/api/evaluation/answer_passage_match.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/experimental/Citations.md b/docs/docs/api/experimental/Citations.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/experimental/Document.md b/docs/docs/api/experimental/Document.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/models/Embedder.md b/docs/docs/api/models/Embedder.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/models/LM.md b/docs/docs/api/models/LM.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/BestOfN.md b/docs/docs/api/modules/BestOfN.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/ChainOfThought.md b/docs/docs/api/modules/ChainOfThought.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/Module.md b/docs/docs/api/modules/Module.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/MultiChainComparison.md b/docs/docs/api/modules/MultiChainComparison.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/Parallel.md b/docs/docs/api/modules/Parallel.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/Predict.md b/docs/docs/api/modules/Predict.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/ProgramOfThought.md b/docs/docs/api/modules/ProgramOfThought.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/RLM.md b/docs/docs/api/modules/RLM.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/ReAct.md b/docs/docs/api/modules/ReAct.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/modules/Refine.md b/docs/docs/api/modules/Refine.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/BetterTogether.md b/docs/docs/api/optimizers/BetterTogether.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
## Usage Examples
diff --git a/docs/docs/api/optimizers/BootstrapFewShot.md b/docs/docs/api/optimizers/BootstrapFewShot.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.md b/docs/docs/api/optimizers/BootstrapFewShotWithRandomSearch.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/BootstrapFinetune.md b/docs/docs/api/optimizers/BootstrapFinetune.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/BootstrapRS.md b/docs/docs/api/optimizers/BootstrapRS.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/COPRO.md b/docs/docs/api/optimizers/COPRO.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/Ensemble.md b/docs/docs/api/optimizers/Ensemble.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/GEPA/overview.md b/docs/docs/api/optimizers/GEPA/overview.md
index 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: false
separate_signature: false
inherited_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 t
show_object_full_path: false
separate_signature: false
inherited_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 proposed
show_object_full_path: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
## Usage Examples
diff --git a/docs/docs/api/optimizers/InferRules.md b/docs/docs/api/optimizers/InferRules.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/KNN.md b/docs/docs/api/optimizers/KNN.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/KNNFewShot.md b/docs/docs/api/optimizers/KNNFewShot.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/LabeledFewShot.md b/docs/docs/api/optimizers/LabeledFewShot.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/optimizers/MIPROv2.md b/docs/docs/api/optimizers/MIPROv2.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
## Example Usage
diff --git a/docs/docs/api/primitives/Audio.md b/docs/docs/api/primitives/Audio.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/Code.md b/docs/docs/api/primitives/Code.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/Example.md b/docs/docs/api/primitives/Example.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/History.md b/docs/docs/api/primitives/History.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/Image.md b/docs/docs/api/primitives/Image.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/Prediction.md b/docs/docs/api/primitives/Prediction.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/Tool.md b/docs/docs/api/primitives/Tool.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/primitives/ToolCalls.md b/docs/docs/api/primitives/ToolCalls.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/signatures/InputField.md b/docs/docs/api/signatures/InputField.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/signatures/OutputField.md b/docs/docs/api/signatures/OutputField.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/signatures/Signature.md b/docs/docs/api/signatures/Signature.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/tools/ColBERTv2.md b/docs/docs/api/tools/ColBERTv2.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/tools/Embeddings.md b/docs/docs/api/tools/Embeddings.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/tools/PythonInterpreter.md b/docs/docs/api/tools/PythonInterpreter.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/StatusMessage.md b/docs/docs/api/utils/StatusMessage.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/StatusMessageProvider.md b/docs/docs/api/utils/StatusMessageProvider.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/StreamListener.md b/docs/docs/api/utils/StreamListener.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/asyncify.md b/docs/docs/api/utils/asyncify.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/configure_cache.md b/docs/docs/api/utils/configure_cache.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/disable_litellm_logging.md b/docs/docs/api/utils/disable_litellm_logging.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/disable_logging.md b/docs/docs/api/utils/disable_logging.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/enable_litellm_logging.md b/docs/docs/api/utils/enable_litellm_logging.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/enable_logging.md b/docs/docs/api/utils/enable_logging.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/inspect_history.md b/docs/docs/api/utils/inspect_history.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/load.md b/docs/docs/api/utils/load.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/docs/docs/api/utils/streamify.md b/docs/docs/api/utils/streamify.md
index 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: false
separate_signature: false
inherited_members: true
-:::
<!-- END_API_REF -->
diff --git a/dspy/adapters/two_step_adapter.py b/dspy/adapters/two_step_adapter.py
index 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 models
are known to struggle with structured outputs.
- Example:
+ Examples:
```
import dspy
lm = 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.py
index 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 to
return a list of dictionaries (same as the Array of content parts in the OpenAI API user message's content field).
- Example:
+ Examples:
```python
class Image(Type):
diff --git a/dspy/adapters/types/citation.py b/dspy/adapters/types/citation.py
index 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:
```python
import os
import dspy
@@ -98,7 +98,7 @@ class Citations(Type):
Returns:
A Citations instance.
- Example:
+ Examples:
```python
citations_dict = [
{
diff --git a/dspy/adapters/types/document.py b/dspy/adapters/types/document.py
index 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:
```python
import dspy
from dspy.signatures import Signature
diff --git a/dspy/adapters/types/file.py b/dspy/adapters/types/file.py
index 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:
```python
import dspy
diff --git a/dspy/adapters/types/history.py b/dspy/adapters/types/history.py
index 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 dspy
diff --git a/dspy/adapters/types/tool.py b/dspy/adapters/types/tool.py
index 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 a
dictionary from arg name to description string. Defaults to None.
- Example:
+ Examples:
```python
def foo(x: int, y: str = "hello"):
@@ -225,7 +225,7 @@ class Tool(Type):
Returns:
A Tool object.
- Example:
+ Examples:
```python
import asyncio
@@ -330,7 +330,7 @@ class ToolCalls(Type):
Returns:
A ToolCalls instance.
- Example:
+ Examples:
```python
tool_calls_dict = [
diff --git a/dspy/clients/base_lm.py b/dspy/clients/base_lm.py
index 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:
```python
from openai import OpenAI
diff --git a/dspy/clients/provider.py b/dspy/clients/provider.py
index 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:
```python
from 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:
```python
from 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:
```python
from dspy.clients.provider import Provider
diff --git a/dspy/evaluate/metrics.py b/dspy/evaluate/metrics.py
index efd3929f0..882fb3231 100644
--- a/dspy/evaluate/metrics.py
+++ b/dspy/evaluate/metrics.py
@@ -22,7 +22,7 @@ def EM(prediction, answers_list): # noqa: N802
Returns:
bool: Whether any reference exactly equals the prediction after normalization.
- Example:
+ Examples:
```python
EM("The Eiffel Tower", ["Eiffel Tower", "Louvre"]) # True
@@ -49,7 +49,7 @@ def F1(prediction, answers_list): # noqa: N802
Returns:
float: Highest F1 score in [0.0, 1.0].
- Example:
+ Examples:
```python
round(F1("Eiffel Tower is in Paris", ["Paris"]), 2) # 0.33
```
@@ -73,7 +73,7 @@ def HotPotF1(prediction, answers_list): # noqa: N802
Returns:
float: Highest HotPotQA-style F1 in [0.0, 1.0].
- Example:
+ Examples:
```python
HotPotF1("yes", ["no"]) # 0.0
```
@@ -100,7 +100,7 @@ def normalize_text(s):
Returns:
str: Normalized string.
- Example:
+ Examples:
```python
normalize_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:
```python
em_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:
```python
round(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:
```python
hotpot_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:
```python
precision_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:
```python
import 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:
```python
import dspy
diff --git a/dspy/predict/best_of_n.py b/dspy/predict/best_of_n.py
index 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:
```python
import dspy
diff --git a/dspy/predict/code_act.py b/dspy/predict/code_act.py
index 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:
```python
from dspy.predict import CodeAct
def factorial(n):
diff --git a/dspy/predict/knn.py b/dspy/predict/knn.py
index 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 through
vectorizer: The `Embedder` to use for vectorization
- Example:
+ Examples:
```python
import dspy
from sentence_transformers import SentenceTransformer
diff --git a/dspy/predict/program_of_thought.py b/dspy/predict/program_of_thought.py
index 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 dspy
diff --git a/dspy/predict/react.py b/dspy/predict/react.py
index 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:
```python
def get_weather(city: str) -> str:
diff --git a/dspy/predict/refine.py b/dspy/predict/refine.py
index 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:
```python
import dspy
diff --git a/dspy/predict/rlm.py b/dspy/predict/rlm.py
index 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 default
PythonInterpreter which creates a fresh instance per forward() call.
- Example:
+ Examples:
```python
# Basic usage
rlm = dspy.RLM("context, query -> output", max_iterations=10)
diff --git a/dspy/primitives/module.py b/dspy/primitives/module.py
index 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 the
Predict 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.py
index 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 execution
with PythonInterpreter() as interp:
diff --git a/dspy/retrievers/embeddings.py b/dspy/retrievers/embeddings.py
index 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 embeddings
embeddings = Embeddings(corpus, embedder)
diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.py
index 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:
```python
import dspy
@@ -332,7 +332,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):
Returns:
A new `Signature` class with the field inserted first.
- Example:
+ Examples:
```python
import dspy
@@ -359,7 +359,7 @@ class Signature(BaseModel, metaclass=SignatureMeta):
Returns:
A new Signature class with the field appended.
- Example:
+ Examples:
```python
import 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:
```python
import 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:
```python
import dspy
diff --git a/dspy/streaming/messages.py b/dspy/streaming/messages.py
index 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:
```python
class MyStatusMessageProvider(StatusMessageProvider):
def lm_start_status_message(self, instance, inputs):
diff --git a/dspy/streaming/streamify.py b/dspy/streaming/streamify.py
index 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 async
generator that yields the program's outputs incrementally.
- Example:
+ Examples:
```python
import asyncio
diff --git a/dspy/teleprompt/bettertogether.py b/dspy/teleprompt/bettertogether.py
index 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.py
index 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.py
index 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:
```python
import dspy
from sentence_transformers import SentenceTransformer
diff --git a/dspy/utils/dummies.py b/dspy/utils/dummies.py
index 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 dictionary
in the list for each request, formatted according to the `format_field_with_value` function.
- Example:
+ Examples:
```
lm = DummyLM([{"answer": "red"}, {"answer": "blue"}])