-
Notifications
You must be signed in to change notification settings - Fork 7
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
Use PMAT package #28
Use PMAT package #28
Conversation
WalkthroughThe recent updates involve a significant reorganization of import paths and method invocations across the prediction market agent's codebase. Key changes include transitioning to a new module structure under Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to path filters (6)
mypy.ini
is excluded by:!**/*.ini
poetry.lock
is excluded by:!**/*.lock
prediction_market_agent/abis/omen_fpmm.abi.json
is excluded by:!**/*.json
prediction_market_agent/abis/omen_fpmm_conditionaltokens.abi.json
is excluded by:!**/*.json
prediction_market_agent/abis/wxdai.abi.json
is excluded by:!**/*.json
pyproject.toml
is excluded by:!**/*.toml
Files selected for processing (15)
- main.py (2 hunks)
- prediction_market_agent/init.py (1 hunks)
- prediction_market_agent/agents/abstract.py (1 hunks)
- prediction_market_agent/agents/always_yes.py (1 hunks)
- prediction_market_agent/agents/autogen_agent.py (1 hunks)
- prediction_market_agent/agents/crewai_agent.py (1 hunks)
- prediction_market_agent/agents/custom_agent.py (3 hunks)
- prediction_market_agent/agents/langchain_agent.py (1 hunks)
- prediction_market_agent/agents/llamaindex_agent.py (1 hunks)
- prediction_market_agent/agents/metagpt_agent.py (1 hunks)
- prediction_market_agent/ai_models/llama_ai_models.py (2 hunks)
- prediction_market_agent/tools/betting_strategies.py (1 hunks)
- prediction_market_agent/tools/google_search.py (1 hunks)
- prediction_market_agent/utils.py (2 hunks)
- tests/tools/test_betting_strategies.py (1 hunks)
Files skipped from review due to trivial changes (1)
- tests/tools/test_betting_strategies.py
Additional comments: 15
prediction_market_agent/__init__.py (1)
- 1-2: Changes align with the PR objectives of removing specific imports.
prediction_market_agent/agents/always_yes.py (1)
- 2-2: Correctly updated import path for
AgentMarket
.prediction_market_agent/agents/abstract.py (1)
- 1-1: Correctly updated import path for
AgentMarket
.prediction_market_agent/tools/google_search.py (1)
- 7-7: Correctly updated the method for accessing the API key.
prediction_market_agent/agents/langchain_agent.py (2)
- 8-8: Correctly updated import path for
AgentMarket
.- 13-13: Correctly updated the method for accessing API keys.
prediction_market_agent/agents/llamaindex_agent.py (1)
- 9-9: Correctly updated import path for
AgentMarket
.prediction_market_agent/utils.py (1)
- 1-28: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [2-44]
Refactoring and updates in this file align with the PR objectives, enhancing functionality and maintainability.
main.py (2)
- 5-5: Correctly refactored imports to align with the new package structure.
- 21-21: Correctly updated the method for accessing API keys.
prediction_market_agent/ai_models/llama_ai_models.py (2)
- 7-7: Correctly updated import path for
should_not_happen
.- 59-63: Logic adjustment in
construct_llama_prompt
enhances clarity and functionality.prediction_market_agent/agents/metagpt_agent.py (1)
- 7-8: Correctly updated import paths for utility functions and data models.
prediction_market_agent/agents/custom_agent.py (1)
- 17-21: Correctly reorganized imports to align with the new package structure.
prediction_market_agent/tools/betting_strategies.py (1)
- 6-23: Correctly reorganized imports and adjusted import paths to align with the new package structure.
@@ -48,7 +51,7 @@ def __init__(self, model: AbstractAiChatModel, max_cycles: int, verbose: bool): | |||
|
|||
self.verbose = verbose | |||
self.max_cycles = max_cycles | |||
self.keys = utils.get_keys() | |||
self.keys = utils.APIKeys() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of utils.APIKeys()
should be updated to reflect the new method for accessing API keys.
- self.keys = utils.APIKeys()
+ self.keys = APIKeys()
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.keys = utils.APIKeys() | |
self.keys = APIKeys() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- prediction_market_agent/agents/autogen_agent.py (1 hunks)
- prediction_market_agent/agents/langchain_agent.py (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- prediction_market_agent/agents/autogen_agent.py
- prediction_market_agent/agents/langchain_agent.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
poetry.lock
is excluded by:!**/*.lock
pyproject.toml
is excluded by:!**/*.toml
Files selected for processing (1)
- main.py (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- main.py
@@ -35,6 +35,9 @@ poetry = "^1.7.1" | |||
poetry-plugin-export = "^1.6.0" | |||
functions-framework = "^3.5.0" | |||
cron-validator = "^1.0.8" | |||
# TODO: Change to the correct version once it's released. | |||
prediction-market-agent-tooling = { git = "https://github.com/gnosis/prediction-market-agent-tooling.git", branch = "peter/fix-apikeys" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woooo!
Summary by CodeRabbit
llama_ai_models.py
for handling roles in messages more explicitly.parse_result_to_boolean
function to handle lowercase input more accurately.