From 8487771eed0ef1c8f3c96f294e300b7ada492de0 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Fri, 1 Nov 2024 09:30:19 +0100 Subject: [PATCH] Cheaper --- .../agents/think_thoroughly_agent/deploy.py | 7 +------ .../think_thoroughly_agent/think_thoroughly_agent.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/prediction_market_agent/agents/think_thoroughly_agent/deploy.py b/prediction_market_agent/agents/think_thoroughly_agent/deploy.py index 7851301a..b24d4bcc 100644 --- a/prediction_market_agent/agents/think_thoroughly_agent/deploy.py +++ b/prediction_market_agent/agents/think_thoroughly_agent/deploy.py @@ -18,13 +18,10 @@ class DeployableThinkThoroughlyAgentBase(DeployableTraderAgent): agent_class: type[ThinkThoroughlyBase] - model: str bet_on_n_markets_per_run = 1 def load(self) -> None: - self.agent = self.agent_class( - model=self.model, enable_langfuse=self.enable_langfuse - ) + self.agent = self.agent_class(enable_langfuse=self.enable_langfuse) def answer_binary_market(self, market: AgentMarket) -> ProbabilisticAnswer | None: return self.agent.answer_binary_market( @@ -38,7 +35,6 @@ def before_process_markets(self, market_type: MarketType) -> None: class DeployableThinkThoroughlyAgent(DeployableThinkThoroughlyAgentBase): agent_class = ThinkThoroughlyWithItsOwnResearch - model: str = "gpt-4-turbo-2024-04-09" def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy: return KellyBettingStrategy( @@ -51,7 +47,6 @@ def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy: class DeployableThinkThoroughlyProphetResearchAgent(DeployableThinkThoroughlyAgentBase): agent_class = ThinkThoroughlyWithPredictionProphetResearch - model: str = "gpt-4-turbo-2024-04-09" def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy: return KellyBettingStrategy( diff --git a/prediction_market_agent/agents/think_thoroughly_agent/think_thoroughly_agent.py b/prediction_market_agent/agents/think_thoroughly_agent/think_thoroughly_agent.py index d0577b1e..e555f466 100644 --- a/prediction_market_agent/agents/think_thoroughly_agent/think_thoroughly_agent.py +++ b/prediction_market_agent/agents/think_thoroughly_agent/think_thoroughly_agent.py @@ -105,9 +105,10 @@ async def _arun( class ThinkThoroughlyBase(ABC): identifier: str + model: str + model_for_generate_prediction_for_one_outcome: str - def __init__(self, model: str, enable_langfuse: bool, memory: bool = True) -> None: - self.model = model + def __init__(self, enable_langfuse: bool, memory: bool = True) -> None: self.enable_langfuse = enable_langfuse self.subgraph_handler = OmenSubgraphHandler() self.pinecone_handler = PineconeHandler() @@ -339,7 +340,7 @@ def answer_binary_market( ( self.enable_langfuse, unique_id, - self.model, + self.model_for_generate_prediction_for_one_outcome, scenario, question, scenarios_with_probs, @@ -374,6 +375,8 @@ def answer_binary_market( class ThinkThoroughlyWithItsOwnResearch(ThinkThoroughlyBase): identifier = "think-thoroughly-agent" + model = "gpt-4-turbo-2024-04-09" + model_for_generate_prediction_for_one_outcome = "gpt-4-turbo-2024-04-09" @staticmethod def generate_prediction_for_one_outcome( @@ -439,6 +442,8 @@ def generate_prediction_for_one_outcome( class ThinkThoroughlyWithPredictionProphetResearch(ThinkThoroughlyBase): identifier = "think-thoroughly-prophet-research-agent" + model = "gpt-4-turbo-2024-04-09" + model_for_generate_prediction_for_one_outcome = "gpt-4o-2024-08-06" @staticmethod def generate_prediction_for_one_outcome(