Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass in generic BetAmount to place_bet #23

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

evangriffiths
Copy link
Contributor

@evangriffiths evangriffiths commented Feb 6, 2024

I prefer place_bet taking a single required amount arg, and then handling the conversion to the correct currency, as apposed to taking optional amounts in all the possible currencies it could support.

--agent-type [langchain|autogen|always_yes|coin_flip|llamaindex|metagpt|crewai|custom_openai|custom_llama]
[default: AgentType.ALWAYS_YES]
--auto-bet / --no-auto-bet [default: no-auto-bet]
--help Show this message and exit.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an update since now main.py uses typer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@evangriffiths evangriffiths marked this pull request as draft February 6, 2024 12:30
@evangriffiths evangriffiths marked this pull request as ready for review February 6, 2024 12:43
--agent-type [langchain|autogen|always_yes|coin_flip|llamaindex|metagpt|crewai|custom_openai|custom_llama]
[default: AgentType.ALWAYS_YES]
--auto-bet / --no-auto-bet [default: no-auto-bet]
--help Show this message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

prediction_market_agent/data_models/market_data_models.py Outdated Show resolved Hide resolved
elif market_type == MarketType.MANIFOLD:
return BetAmount(amount=amount, currency=Currency.Mana)
else:
raise ValueError(f"Unknown market type: {market_type}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and cool! Nicer than having N arguments for each currency :-D

@evangriffiths evangriffiths merged commit 8b71d62 into gnosis:main Feb 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants