Skip to content

Commit ab48b97

Browse files
Adam BaloghAdam Balogh
authored andcommitted
fix query
1 parent 7cef238 commit ab48b97

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

agent/tools.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,22 @@ def show_pools(pool_ids: List[str], config: RunnableConfig) -> Tuple[str, List]:
3939
return f"Showing pools to user: {pool_ids}", pools
4040

4141

42-
@tool()
42+
@tool
4343
def retrieve_pools(
44-
tokens: List[str] = None,
45-
protocols: List[str] = None,
46-
is_stablecoin: bool = None,
44+
token_addresses: List[str] = None,
4745
impermanent_loss_risk: bool = None,
4846
config: RunnableConfig = None,
4947
) -> List[Pool]:
50-
"""Retrieves pools matching the specified criteria for internal agent analysis.
51-
This tool is for the agent to analyze pools without displaying them to the user.
52-
53-
Args:
54-
tokens: List of token addresses to filter by
55-
protocols: List of protocol names to filter by
56-
is_stablecoin: Whether to filter for stablecoin pools
57-
impermanent_loss_risk: Whether to filter for pools with impermanent loss risk
58-
config: The runnable config containing available pools
59-
60-
Returns:
61-
List of matching pools
48+
"""
49+
Retrieves pools matching the specified criteria for analysis. token_addresses (if set) must be an address not a symbol.
6250
"""
6351
configurable = config["configurable"]
6452
protocol_registry: ProtocolRegistry = configurable["protocol_registry"]
6553

6654
# Create a query to filter pools
6755
query = PoolQuery(
6856
chain=Chain.SOLANA, # Currently only supporting Solana
69-
tokens=tokens or [],
70-
protocols=protocols or [],
71-
isStableCoin=is_stablecoin,
57+
tokens=token_addresses or [],
7258
impermanentLossRisk=impermanent_loss_risk,
7359
)
7460

server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def run_agent():
108108
# Get router decision
109109
router_response = router_model.invoke(router_prompt)
110110
agent_type = router_response.content.strip().lower()
111-
logger.info(f"Router response: {router_response}")
111+
logger.info(f"Router response: {router_response.content}")
112112

113113
# Route to appropriate handler
114114
if agent_type == "analytics_agent":

0 commit comments

Comments
 (0)