Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

fix the history related error of codeact (#8300)

TomuHiratac4279fe8fc30
diff --git a/dspy/predict/code_act.py b/dspy/predict/code_act.py
index 2c3e7d180..b136171d5 100644
--- a/dspy/predict/code_act.py
+++ b/dspy/predict/code_act.py
@@ -41,6 +41,7 @@ class CodeAct(ReAct, ProgramOfThought):
"""
self.signature = ensure_signature(signature)
self.max_iters = max_iters
+ self.history = []
tools = [t if isinstance(t, Tool) else Tool(t) for t in tools]
if any(