diff --git a/dspy/predict/predict.py b/dspy/predict/predict.py index 0e15137b3..3fb160bec 100644 --- a/dspy/predict/predict.py +++ b/dspy/predict/predict.py @@ -108,6 +108,8 @@ def forward(self, **kwargs): import dspy adapter = dspy.settings.adapter or dspy.ChatAdapter() + tools = kwawrgs.pop("tools", None) + config["tools"] = tools completions = adapter(lm, lm_kwargs=config, signature=signature, demos=demos, inputs=kwargs) pred = Prediction.from_completions(completions, signature=signature)