Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

add methods to get/update predictor specific configs

manishshettym933add7f8bf2
diff --git a/dspy/predict/predict.py b/dspy/predict/predict.py
index ba9d7f3a9..32ea2af1a 100644
--- a/dspy/predict/predict.py
+++ b/dspy/predict/predict.py
@@ -100,6 +100,12 @@ class Predict(Parameter):
return pred
+ def update_config(self, **kwargs):
+ self.config = {**self.config, **kwargs}
+
+ def get_config(self):
+ return self.config
+
def __repr__(self):
return f"{self.__class__.__name__}({self.signature})"