Complete Migration
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from modaic import PrecompiledAgent, PrecompiledConfig
|
||||
from .modules import TweetGeneratorModule, TweetEvaluatorModule
|
||||
from .models import EvaluationResult
|
||||
from .hill_climbing import HillClimbingOptimizer
|
||||
from models import EvaluationResult
|
||||
from hill_climbing import HillClimbingOptimizer
|
||||
from typing import Optional, List
|
||||
from .utils import get_dspy_lm
|
||||
from .constants import DEFAULT_CATEGORIES, DEFAULT_ITERATIONS, DEFAULT_PATIENCE
|
||||
from utils import get_dspy_lm
|
||||
from constants import DEFAULT_CATEGORIES, DEFAULT_ITERATIONS, DEFAULT_PATIENCE
|
||||
|
||||
|
||||
class TweetOptimizerConfig(PrecompiledConfig):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import dspy
|
||||
from typing import List, Optional
|
||||
from .models import EvaluationResult, CategoryEvaluation
|
||||
from .constants import (
|
||||
from models import EvaluationResult, CategoryEvaluation
|
||||
from constants import (
|
||||
TWEET_MAX_LENGTH,
|
||||
TWEET_TRUNCATION_SUFFIX,
|
||||
DEFAULT_SCORE,
|
||||
@@ -12,7 +12,7 @@ from .constants import (
|
||||
MIN_SCORE,
|
||||
MAX_SCORE
|
||||
)
|
||||
from .helpers import format_evaluation_for_generator, truncate_tweet
|
||||
from helpers import format_evaluation_for_generator, truncate_tweet
|
||||
|
||||
class TweetGenerator(dspy.Signature):
|
||||
"""Generate or improve a tweet based on input text and detailed evaluation feedback with reasoning."""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import List, Iterator, Tuple, Dict
|
||||
from models import EvaluationResult
|
||||
from modules import TweetGeneratorModule, TweetEvaluatorModule
|
||||
from agent.modules import TweetGeneratorModule, TweetEvaluatorModule
|
||||
from helpers import format_evaluation_for_generator
|
||||
|
||||
class HillClimbingOptimizer:
|
||||
|
||||
Reference in New Issue
Block a user