Skip to content

Commit

Permalink
Merge pull request stanfordnlp#743 from thomasahle/main
Browse files Browse the repository at this point in the history
Fixed missing copy in TypedPredictor
  • Loading branch information
thomasahle authored Mar 30, 2024
2 parents 9b841b1 + 1340391 commit 7012930
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 7012930

Please sign in to comment.