Skip to content

Commit

Permalink
Fixed missing copy in TypedPredictor
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasahle committed Mar 30, 2024
1 parent 9b841b1 commit 1340391
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dspy/functional/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 1340391

Please sign in to comment.