Skip to content

Commit

Permalink
Cheaper (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii authored Nov 4, 2024
1 parent 678b589 commit d9086d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d9086d4

Please sign in to comment.