DSPy: The framework for programming—not prompting—language models
Python
expose InferRules (#7832)
Chen Qian9cf2d4005450
diff --git a/docs/docs/api/modules/ReAct.md b/docs/docs/api/modules/ReAct.mdindex d4117c74c..c0533100b 100644--- a/docs/docs/api/modules/ReAct.md+++ b/docs/docs/api/modules/ReAct.md@@ -21,6 +21,7 @@- reset_copy- save- set_lm+ - truncate_trajectoryshow_source: trueshow_undocumented_members: trueshow_root_heading: truediff --git a/docs/docs/api/optimizers/InferRules.md b/docs/docs/api/optimizers/InferRules.mdnew file mode 100644index 000000000..ac7fcf039--- /dev/null+++ b/docs/docs/api/optimizers/InferRules.md@@ -0,0 +1,21 @@+# dspy.InferRules++::: dspy.InferRules+ handler: python+ options:+ members:+ - compile+ - evaluate_program+ - format_examples+ - get_predictor_demos+ - induce_natural_language_rules+ - update_program_instructions+ show_source: true+ show_undocumented_members: true+ show_root_heading: true+ show_inherited_members: true+ heading_level: 2+ docstring_style: google+ show_root_full_path: true+ show_object_full_path: false+ separate_signature: falsediff --git a/docs/mkdocs.yml b/docs/mkdocs.ymlindex 4dce16ac6..1e5dbacec 100644--- a/docs/mkdocs.yml+++ b/docs/mkdocs.yml@@ -101,6 +101,7 @@ nav:- BootstrapRS: api/optimizers/BootstrapRS.md- COPRO: api/optimizers/COPRO.md- Ensemble: api/optimizers/Ensemble.md+ - InferRules: api/optimizers/InferRules.md- KNN: api/optimizers/KNN.md- KNNFewShot: api/optimizers/KNNFewShot.md- LabeledFewShot: api/optimizers/LabeledFewShot.mddiff --git a/docs/scripts/generate_api_docs.py b/docs/scripts/generate_api_docs.pyindex f49a6e404..fed4a332f 100644--- a/docs/scripts/generate_api_docs.py+++ b/docs/scripts/generate_api_docs.py@@ -72,6 +72,7 @@ API_MAPPING = {dspy.Ensemble,dspy.KNN,dspy.KNNFewShot,+ dspy.InferRules,],}