From 13403911d975ada903b23ea65878c883e6b1f230 Mon Sep 17 00:00:00 2001 From: Thomas D Ahle Date: Sat, 30 Mar 2024 13:57:53 -0700 Subject: [PATCH] Fixed missing copy in TypedPredictor --- dspy/functional/functional.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dspy/functional/functional.py b/dspy/functional/functional.py index 0f5b660f0..92f7c5a15 100644 --- a/dspy/functional/functional.py +++ b/dspy/functional/functional.py @@ -86,7 +86,12 @@ def __init__(self, signature, instructions=None, *, max_retries=3, wrap_json=Fal self.explain_errors = explain_errors def copy(self) -> "TypedPredictor": - return TypedPredictor(self.signature, max_retries=self.max_retries, wrap_json=self.wrap_json) + return TypedPredictor( + self.signature, + max_retries=self.max_retries, + wrap_json=self.wrap_json, + explain_errors=self.explain_errors, + ) def __repr__(self): """Return a string representation of the TypedPredictor object."""