diff --git a/examples/cloud_deployment/gcp/deploy.py b/examples/cloud_deployment/gcp/deploy.py index 5b6caaa4..eca66f74 100644 --- a/examples/cloud_deployment/gcp/deploy.py +++ b/examples/cloud_deployment/gcp/deploy.py @@ -1,21 +1,8 @@ import getpass -import random -from prediction_market_agent_tooling.deploy.agent import DeployableAgent -from prediction_market_agent_tooling.markets.data_models import AgentMarket +from prediction_market_agent_tooling.deploy.agent_example import DeployableCoinFlipAgent from prediction_market_agent_tooling.markets.markets import MarketType - -class DeployableCoinFlipAgent(DeployableAgent): - def pick_markets(self, markets: list[AgentMarket]) -> list[AgentMarket]: - if len(markets) > 1: - return random.sample(markets, 1) - return markets - - def answer_binary_market(self, market: AgentMarket) -> bool: - return random.choice([True, False]) - - if __name__ == "__main__": agent = DeployableCoinFlipAgent() agent.deploy_gcp( diff --git a/prediction_market_agent_tooling/deploy/agent_example.py b/prediction_market_agent_tooling/deploy/agent_example.py new file mode 100644 index 00000000..8d2e822d --- /dev/null +++ b/prediction_market_agent_tooling/deploy/agent_example.py @@ -0,0 +1,14 @@ +import random + +from prediction_market_agent_tooling.deploy.agent import DeployableAgent +from prediction_market_agent_tooling.markets.data_models import AgentMarket + + +class DeployableCoinFlipAgent(DeployableAgent): + def pick_markets(self, markets: list[AgentMarket]) -> list[AgentMarket]: + if len(markets) > 1: + return random.sample(markets, 1) + return markets + + def answer_binary_market(self, market: AgentMarket) -> bool: + return random.choice([True, False])