Skip to content

Commit

Permalink
Fix 'BuyTokens' Function description and example_args
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths committed Apr 10, 2024
1 parent f5c9eca commit d4af18f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prediction_market_agent/agents/microchain_agent/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,15 @@ def __init__(self, market_type: MarketType, outcome: str):

@property
def description(self) -> str:
return f"Use this function to buy {self.outcome} outcome tokens of a prediction market. The second parameter specifies how much $ you spend."
return (
f"Use this function to buy {self.outcome} outcome tokens of a "
f"prediction market. The first parameter is the market id. The "
f"second parameter specifies how much {self.currency} you spend."
)

@property
def example_args(self) -> list[t.Union[str, float]]:
return ["Will Joe Biden get reelected in 2024?", 2.3]
return [get_example_market_id(self.market_type), 2.3]

def __call__(self, market_id: str, amount: float) -> str:
outcome_bool = get_boolean_outcome(self.outcome)
Expand Down

0 comments on commit d4af18f

Please sign in to comment.