Skip to content

Commit

Permalink
In deployed agent viewer build function list based on sysprompt (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
evangriffiths authored Sep 2, 2024
1 parent 03747ee commit 67eb359
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/deployed_general_agent_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
SupportedModel,
build_agent,
)
from prediction_market_agent.agents.microchain_agent.prompts import FunctionsConfig
from prediction_market_agent.agents.microchain_agent.prompts import (
FunctionsConfig,
SystemPromptChoice,
)
from prediction_market_agent.agents.microchain_agent.utils import (
get_function_useage_from_history,
get_total_asset_value,
Expand Down Expand Up @@ -88,6 +91,11 @@ def to_api_keys(self, identifier: AgentIdentifier) -> APIKeys:
def to_agent_description(self, identifier: AgentIdentifier) -> str:
return AGENT_IDENTIFIER_TO_CLASS[identifier].description

def to_system_prompt_choice(
self, identifier: AgentIdentifier
) -> SystemPromptChoice:
return AGENT_IDENTIFIER_TO_CLASS[identifier].system_prompt_choice


MARKET_TYPE = MarketType.OMEN
currency = MARKET_TYPE.market_class.currency
Expand Down Expand Up @@ -187,11 +195,8 @@ def to_agent_description(self, identifier: AgentIdentifier) -> str:
unformatted_system_prompt="foo", # placeholder, not used
allow_stop=True,
long_term_memory=long_term_memory,
functions_config=FunctionsConfig(
include_trading_functions=True, # placeholder, not used
include_learning_functions=True, # placeholder, not used
include_universal_functions=True, # placeholder, not used
include_agent_functions=True, # placeholder, not used
functions_config=FunctionsConfig.from_system_prompt_choice(
settings.to_system_prompt_choice(task_description)
),
enable_langfuse=False, # placeholder, not used
)
Expand Down

0 comments on commit 67eb359

Please sign in to comment.