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

Allow multiple general agents #305

Merged
merged 6 commits into from
Jul 17, 2024
Merged

Allow multiple general agents #305

merged 6 commits into from
Jul 17, 2024

Conversation

kongzii
Copy link
Contributor

@kongzii kongzii commented Jul 3, 2024

Screenshot by Dropbox Capture

Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Warning

Rate limit exceeded

@kongzii has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 40 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 6411d33 and a3b2945.

Walkthrough

The changes involve updating the microchain_agent module to use a consistent AgentIdentifier system, introducing and refactoring API keys handling for balance and position retrieval functions, and renaming and reorganizing agent classes and identifiers for clarity and modularity.

Changes

Files Change Summaries
app.py, deploy.py, microchain_agent.py Consistently utilize AgentIdentifier for task descriptions and session identifiers.
market_functions.py, omen_functions.py, utils.py, test_functions.py Introduce APIKeys parameter for balance and position retrieval functions to ensure correct API key usage.
utils.py Expand AgentIdentifier enum and replace microchain_task_from_market with general_agent_identifiers method.
run_agent.py Update RunnableAgent class to include new enums and corresponding agent deployments for microchain modifiable system prompt agents, differentiated as 0, 1, and 2.
deployed_general_agent_viewer.py Refactor settings handling by introducing a new DeployedGeneralAgentSettings class for managing agent settings and API key retrieval.

Sequence Diagrams

Old Flow for Retrieving Balance

sequenceDiagram
    participant User
    participant MarketFunctions
    participant Utils

    User->>MarketFunctions: get_balance(market_type)
    MarketFunctions->>Utils: get_balance(market_type)
    Utils-->>MarketFunctions: balance
    MarketFunctions-->>User: balance
Loading

New Flow for Retrieving Balance

sequenceDiagram
    participant User
    participant MarketFunctions
    participant Utils

    User->>MarketFunctions: get_balance(keys, market_type)
    MarketFunctions->>Utils: get_balance(keys, market_type)
    Utils-->>MarketFunctions: balance
    MarketFunctions-->>User: balance
Loading

Old Flow for Task Description Initialization

sequenceDiagram
    participant Deploy
    participant AgentIdentifier

    Deploy->>AgentIdentifier: MICROCHAIN_AGENT_OMEN
    Deploy-->>AgentIdentifier: task_description
Loading

New Flow for Task Description Initialization

sequenceDiagram
    participant Deploy
    participant AgentIdentifier

    Deploy->>AgentIdentifier: MICROCHAIN_AGENT_OMEN
    Deploy-->>AgentIdentifier: task_description
Loading

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -18,16 +17,22 @@
class AgentIdentifier(str, Enum):
THINK_THOROUGHLY = "think-thoroughly-agent"
MICROCHAIN_AGENT_OMEN = "microchain-agent-deployment-omen"
MICROCHAIN_AGENT_OMEN_TEST = "microchain-agent-deployment-omen_test"
MICROCHAIN_AGENT_OMEN_LEARNING_0 = "general-agent-0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Named them just general-agent-X, because it was too long for the select box 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh fair enough 😄

from prediction_market_agent.utils import APIKeys


class DeployedGeneralAgentKeys(APIKeys):
START_TIME: datetime
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted starting time, as we can get it easily from the chat history object below. So we don't need to track this in the env for all the general agents.

Copy link
Contributor

Choose a reason for hiding this comment

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

nice, that's better!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between aad1721 and 8898be6.

Files selected for processing (10)
  • prediction_market_agent/agents/microchain_agent/app.py (4 hunks)
  • prediction_market_agent/agents/microchain_agent/deploy.py (3 hunks)
  • prediction_market_agent/agents/microchain_agent/market_functions.py (3 hunks)
  • prediction_market_agent/agents/microchain_agent/microchain_agent.py (1 hunks)
  • prediction_market_agent/agents/microchain_agent/omen_functions.py (1 hunks)
  • prediction_market_agent/agents/microchain_agent/utils.py (2 hunks)
  • prediction_market_agent/agents/utils.py (2 hunks)
  • prediction_market_agent/run_agent.py (3 hunks)
  • scripts/deployed_general_agent_viewer.py (5 hunks)
  • tests/agents/microchain/test_functions.py (2 hunks)
Additional context used
Ruff
scripts/deployed_general_agent_viewer.py

91-91: f-string without any placeholders

Remove extraneous f prefix

(F541)

Additional comments not posted (18)
prediction_market_agent/agents/microchain_agent/omen_functions.py (1)

21-24: LGTM! But verify the usage of RedeemWinningBets class.

The code changes are approved.

However, ensure that all instantiations and calls to RedeemWinningBets match the new signature.

prediction_market_agent/run_agent.py (2)

20-22: Imports look good.

The added imports for DeployableMicrochainModifiableSystemPromptAgent0, DeployableMicrochainModifiableSystemPromptAgent1, and DeployableMicrochainModifiableSystemPromptAgent2 are appropriate.


41-43: Enum values and dictionary entries look good.

The new enum values microchain_modifiable_system_prompt_0, microchain_modifiable_system_prompt_1, and microchain_modifiable_system_prompt_2 in the RunnableAgent class and the corresponding entries in the RUNNABLE_AGENTS dictionary are appropriate.

Also applies to: 54-56

prediction_market_agent/agents/microchain_agent/deploy.py (4)

25-25: Attribute addition looks good.

The task_description attribute added to the DeployableMicrochainAgent class is appropriate and aligns with the new AgentIdentifier values.


35-38: Initialization updates look good.

The updates to the long_term_memory and prompt_handler initialization in the run method of DeployableMicrochainAgent to use the task_description attribute are appropriate.


54-58: Class update looks good.

The DeployableMicrochainModifiableSystemPromptAgent0 class updated with a task_description attribute is appropriate and aligns with the new AgentIdentifier values.


60-69: Class updates look good.

The DeployableMicrochainModifiableSystemPromptAgent1 and DeployableMicrochainModifiableSystemPromptAgent2 classes updated with task_description attributes are appropriate and align with the new AgentIdentifier values.

prediction_market_agent/agents/microchain_agent/utils.py (2)

54-57: Function update looks good.

The get_balance function updated to include an APIKeys parameter is appropriate and improves security and consistency in API key management.


67-69: Function update looks good.

The get_total_asset_value function updated to include an APIKeys parameter is appropriate and improves security and consistency in API key management.

prediction_market_agent/agents/utils.py (2)

20-23: Enum values look good.

The new AgentIdentifier values MICROCHAIN_AGENT_OMEN_TEST, MICROCHAIN_AGENT_OMEN_LEARNING_0, MICROCHAIN_AGENT_OMEN_LEARNING_1, and MICROCHAIN_AGENT_OMEN_LEARNING_2 added to the AgentIdentifier enum are appropriate and align with the new deployable agent classes.


27-35: Method addition looks good.

The general_agent_identifiers method added to the AgentIdentifier class is appropriate and improves code modularity and maintainability.

scripts/deployed_general_agent_viewer.py (1)

35-54: LGTM!

The DeployedGeneralAgentSettings class is correctly utilizing Pydantic for settings management.

prediction_market_agent/agents/microchain_agent/microchain_agent.py (1)

112-117: LGTM!

The changes in the main function align with the PR objectives and look good.

tests/agents/microchain/test_functions.py (1)

103-105: LGTM!

The changes in the test_buy_sell_tokens function align with the PR objectives and look good.

prediction_market_agent/agents/microchain_agent/app.py (1)

109-109: LGTM!

The changes in the maybe_initialize_long_term_memory function align with the PR objectives and look good.

prediction_market_agent/agents/microchain_agent/market_functions.py (3)

122-125: LGTM!

The changes in the PredictProbabilityForQuestionRemote function align with the PR objectives and look good.


179-180: LGTM!

The changes in the BuyTokens function align with the PR objectives and look good.


288-289: LGTM!

The changes in the GetBalance function align with the PR objectives and look good.

label=f"Agent Wallet Address",
value=keys.bet_from_address,
)
st.metric(label=f"Agent Wallet Address", value=keys.bet_from_address)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove extraneous f prefix.

The f-string does not contain any placeholders and the f prefix is unnecessary.

-        f"To see the agent's transaction history, click [here]({MARKET_TYPE.market_class.get_user_url(keys=keys)})."
+        "To see the agent's transaction history, click [here]({MARKET_TYPE.market_class.get_user_url(keys=keys)})."

Committable suggestion was skipped due to low confidence.

Tools
Ruff

91-91: f-string without any placeholders

Remove extraneous f prefix

(F541)

@@ -57,10 +68,22 @@ def starting_balance(self) -> float:
)
st.title("Deployed Trader Agent Viewer")

check_required_api_keys(["BET_FROM_PRIVATE_KEY"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

check_required_api_keys not needed anymore, because now the requried env vars aren't optional in DeployedGeneralAgentSettings

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
scripts/deployed_general_agent_viewer.py (1)

96-96: Remove extraneous f prefix.

The f-string does not contain any placeholders and the f prefix is unnecessary.

-        f"Agent Wallet Address"
+        "Agent Wallet Address"
Tools
Ruff

96-96: f-string without any placeholders

Remove extraneous f prefix

(F541)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8898be6 and 374b458.

Files selected for processing (2)
  • prediction_market_agent/agents/utils.py (2 hunks)
  • scripts/deployed_general_agent_viewer.py (5 hunks)
Files skipped from review as they are similar to previous changes (1)
  • prediction_market_agent/agents/utils.py
Additional context used
Ruff
scripts/deployed_general_agent_viewer.py

96-96: f-string without any placeholders

Remove extraneous f prefix

(F541)

Additional comments not posted (11)
scripts/deployed_general_agent_viewer.py (11)

35-38: Ensure proper handling of environment variables in DeployedGeneralAgentSettings.

The model_config in SettingsConfigDict is correctly defined to read from the .env file with UTF-8 encoding. Ensure the .env file is properly managed and secured.


40-41: Ensure correct initialization of STARTING_BALANCE and AGENT_IDENTIFIER_TO_PRIVATE_KEY.

The STARTING_BALANCE and AGENT_IDENTIFIER_TO_PRIVATE_KEY attributes are crucial for the agent's operations. Ensure they are correctly initialized and validated.


47-49: Ensure agent_identifier_to_private_key property returns the correct mapping.

The agent_identifier_to_private_key property should return the correct mapping of AgentIdentifier to PrivateKey. Verify its correctness.


51-53: Ensure available_agents property lists all valid agents.

The available_agents property should return a list of all valid AgentIdentifier keys. Verify its correctness.


55-58: Ensure to_api_keys method correctly converts identifiers to APIKeys.

The to_api_keys method should correctly convert an AgentIdentifier to APIKeys. Verify its correctness.


71-72: Ensure proper initialization of DeployedGeneralAgentSettings.

The settings object is correctly initialized from DeployedGeneralAgentSettings. Ensure the initialization is error-free.


73-80: Ensure correct agent selection in the sidebar.

The agent selection dropdown should correctly list and handle all available agents. Verify its functionality.


85-86: Ensure correct conversion of agent identifier to APIKeys and initialization of starting_balance.

The keys and starting_balance should be correctly initialized from the selected agent. Verify their correctness.


96-96: Remove extraneous f prefix.

The f-string does not contain any placeholders and the f prefix is unnecessary.

Tools
Ruff

96-96: f-string without any placeholders

Remove extraneous f prefix

(F541)


113-116: Ensure chat_history and sessions are correctly initialized.

The chat_history and sessions should be correctly initialized from the long-term memory. Verify their correctness.


116-118: Ensure correct calculation of total_asset_value and roi.

The total_asset_value and roi should be correctly calculated. Verify their correctness.

system_prompt_choice: SystemPromptChoice = SystemPromptChoice.JUST_BORN
load_historical_prompt: bool = True
task_description = AgentIdentifier.MICROCHAIN_AGENT_OMEN_LEARNING_0
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be set via env var, and then you wouldn't need to duplicate this python code, and all the duplication would just be in the terraform modules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know but I actually liked that we have this explicit list of available agents:

But I agree there is a ton of duplication, what do you think about it now? I did a small refactor.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure. My instinct is that multiple copies of the same agent should be specified only in the terraform code. But by that logic I should have made load_historical_prompt settable by env var too, and not have DeployableMicrochainModifiableSystemPromptAgent either. So happy to go with this for now :)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 374b458 and 8daffac.

Files selected for processing (1)
  • prediction_market_agent/agents/microchain_agent/deploy.py (3 hunks)
Additional comments not posted (6)
prediction_market_agent/agents/microchain_agent/deploy.py (6)

59-59: LGTM!

The introduction of the task_description attribute improves consistency.


65-65: LGTM!

The introduction of the task_description attribute improves consistency.


71-71: LGTM!

The introduction of the task_description attribute improves consistency.


77-77: LGTM!

The introduction of the task_description attribute improves consistency.


25-25: LGTM! Verify the usage of task_description.

The introduction of the task_description attribute improves consistency. Ensure that all usages of task_description are correct and consistent across the codebase.

Verification successful

LGTM! Verify the usage of task_description.

The introduction of the task_description attribute improves consistency. Ensure that all usages of task_description are correct and consistent across the codebase.

  • prediction_market_agent/agents/microchain_agent/deploy.py
  • prediction_market_agent/agents/microchain_agent/microchain_agent.py
  • prediction_market_agent/db/long_term_memory_table_handler.py
  • scripts/deployed_general_agent_viewer.py
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `task_description` in the codebase to ensure consistency.

# Test: Search for the usage of `task_description`. Expect: Consistent usage across the codebase.
rg --type python $'task_description'

Length of output: 66


Script:

#!/bin/bash
# Description: Verify all usages of `task_description` in the codebase to ensure consistency.

# Test: Search for the usage of `task_description`. Expect: Consistent usage across the codebase.
rg --type py 'task_description'

Length of output: 3366


35-38: LGTM! Ensure proper initialization of long_term_memory and prompt_handler.

The initialization of long_term_memory and prompt_handler using task_description is correct. Verify that the PromptTableHandler and LongTermMemoryTableHandler classes handle the task_description correctly.

Verification successful

Initialization of long_term_memory and prompt_handler is correct.

The PromptTableHandler and LongTermMemoryTableHandler classes correctly handle the task_description parameter by assigning it to instance variables.

  • PromptTableHandler is defined in prediction_market_agent/db/prompt_table_handler.py and handles session_identifier correctly.
  • LongTermMemoryTableHandler is defined in prediction_market_agent/db/long_term_memory_table_handler.py and handles task_description correctly.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the initialization of `long_term_memory` and `prompt_handler` in `PromptTableHandler` and `LongTermMemoryTableHandler` classes.

# Test: Search for the initialization of `long_term_memory` and `prompt_handler`. Expect: Correct handling of `task_description` in these classes.
rg --type python $'PromptTableHandler'
rg --type python $'LongTermMemoryTableHandler'

Length of output: 145


Script:

#!/bin/bash
# Description: Verify the initialization of `long_term_memory` and `prompt_handler` in `PromptTableHandler` and `LongTermMemoryTableHandler` classes.

# Search for the definition of `PromptTableHandler` class and inspect its constructor
rg --pcre2 --glob '*.py' 'class PromptTableHandler' -A 10

# Search for the definition of `LongTermMemoryTableHandler` class and inspect its constructor
rg --pcre2 --glob '*.py' 'class LongTermMemoryTableHandler' -A 10

Length of output: 2230

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
scripts/deployed_general_agent_viewer.py (2)

50-51: Consider adding type hints for dictionary keys and values.

Adding type hints for the AGENT_IDENTIFIER_TO_PRIVATE_KEY dictionary can improve code readability and maintainability.

AGENT_IDENTIFIER_TO_PRIVATE_KEY: dict[AgentIdentifier, PrivateKey]

106-106: Remove extraneous f prefix.

The f-string does not contain any placeholders and the f prefix is unnecessary.

-        f"To see the agent's transaction history, click [here]({MARKET_TYPE.market_class.get_user_url(keys=keys)})."
+        "To see the agent's transaction history, click [here]({MARKET_TYPE.market_class.get_user_url(keys=keys)})."
Tools
Ruff

106-106: f-string without any placeholders

Remove extraneous f prefix

(F541)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8daffac and 8ca7e54.

Files selected for processing (6)
  • prediction_market_agent/agents/microchain_agent/app.py (4 hunks)
  • prediction_market_agent/agents/microchain_agent/deploy.py (3 hunks)
  • prediction_market_agent/agents/microchain_agent/microchain_agent.py (1 hunks)
  • prediction_market_agent/agents/microchain_agent/utils.py (2 hunks)
  • prediction_market_agent/agents/utils.py (2 hunks)
  • scripts/deployed_general_agent_viewer.py (6 hunks)
Files skipped from review as they are similar to previous changes (5)
  • prediction_market_agent/agents/microchain_agent/app.py
  • prediction_market_agent/agents/microchain_agent/deploy.py
  • prediction_market_agent/agents/microchain_agent/microchain_agent.py
  • prediction_market_agent/agents/microchain_agent/utils.py
  • prediction_market_agent/agents/utils.py
Additional context used
Ruff
scripts/deployed_general_agent_viewer.py

106-106: f-string without any placeholders

Remove extraneous f prefix

(F541)

Additional comments not posted (3)
scripts/deployed_general_agent_viewer.py (3)

45-48: Ensure extra configuration is necessary.

The extra="ignore" configuration in SettingsConfigDict prevents extra fields in the .env file from being considered. Ensure this behavior is intended.


83-93: Ensure AgentIdentifier values are valid.

The AgentIdentifier values used in the selectbox should be validated to ensure they match the expected values.


126-127: Ensure get_total_asset_value handles API key correctly.

Verify that the get_total_asset_value function correctly handles the keys parameter.

Comment on lines +65 to +68
def to_api_keys(self, identifier: AgentIdentifier) -> APIKeys:
return APIKeys(
BET_FROM_PRIVATE_KEY=self.agent_identifier_to_private_key[identifier]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure safe access to dictionary keys.

Accessing the dictionary without checking if the key exists may result in a KeyError. Consider adding error handling or using .get() method.

def to_api_keys(self, identifier: AgentIdentifier) -> APIKeys:
    private_key = self.agent_identifier_to_private_key.get(identifier)
    if private_key is None:
        raise ValueError(f"No private key found for agent identifier: {identifier}")
    return APIKeys(BET_FROM_PRIVATE_KEY=private_key)

@@ -18,16 +17,22 @@
class AgentIdentifier(str, Enum):
THINK_THOROUGHLY = "think-thoroughly-agent"
MICROCHAIN_AGENT_OMEN = "microchain-agent-deployment-omen"
MICROCHAIN_AGENT_OMEN_TEST = "microchain-agent-deployment-omen_test"
MICROCHAIN_AGENT_OMEN_LEARNING_0 = "general-agent-0"
Copy link
Contributor

Choose a reason for hiding this comment

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

ahh fair enough 😄

from prediction_market_agent.utils import APIKeys


class DeployedGeneralAgentKeys(APIKeys):
START_TIME: datetime
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, that's better!

system_prompt_choice: SystemPromptChoice = SystemPromptChoice.JUST_BORN
load_historical_prompt: bool = True
task_description = AgentIdentifier.MICROCHAIN_AGENT_OMEN_LEARNING_0
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure. My instinct is that multiple copies of the same agent should be specified only in the terraform code. But by that logic I should have made load_historical_prompt settable by env var too, and not have DeployableMicrochainModifiableSystemPromptAgent either. So happy to go with this for now :)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8ca7e54 and 6411d33.

Files selected for processing (1)
  • prediction_market_agent/run_agent.py (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • prediction_market_agent/run_agent.py

@kongzii
Copy link
Contributor Author

kongzii commented Jul 15, 2024

Waiting for funding for these new agents by finance people, if they won't send the some xDai soonish I will invest in them by myself 😄

@kongzii kongzii merged commit 664ca87 into main Jul 17, 2024
7 checks passed
@kongzii kongzii deleted the peter/multiple-generals branch July 17, 2024 07:54
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