Complete Migration

This commit is contained in:
2025-10-19 19:39:57 -04:00
parent f26e256e7e
commit 256630961b
10 changed files with 30 additions and 61 deletions

View File

@@ -37,6 +37,9 @@ class TweetOptimizerAgent(PrecompiledAgent):
self.lm = config.lm
self.eval_lm = config.eval_lm
self.categories = config.categories
self.max_iterations = config.max_iterations
self.patience = config.patience
# initialize DSPy with the specified model
self.tweet_generator.set_lm(get_dspy_lm(config.lm))
@@ -49,8 +52,8 @@ class TweetOptimizerAgent(PrecompiledAgent):
patience: Optional[int] = None
) -> str:
"""Run full optimization process."""
max_iterations = iterations or self.config.max_iterations
patience_limit = patience or self.config.patience
max_iterations = iterations or self.max_iterations
patience_limit = patience or self.patience
results = {
'initial_text': input_text,