We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad00372 commit 040cbc1Copy full SHA for 040cbc1
server/fastapi_server.py
@@ -332,6 +332,12 @@ async def run_suggestions(
332
# if not await verify_captcha_token(agent_request.captchaToken):
333
# raise HTTPException(status_code=429, detail="Invalid captcha token")
334
335
+ # Check if user has reached daily message limit (without incrementing)
336
+ stats = await activity_tracker.get_activity_stats(agent_request.context.address)
337
+ if stats.daily_message_count >= stats.daily_message_limit:
338
+ statsd.increment("agent.suggestions.daily_limit_reached")
339
+ raise HTTPException(status_code=429, detail="Daily message limit reached")
340
+
341
portfolio = await portfolio_fetcher.get_portfolio(
342
wallet_address=agent_request.context.address
343
)
0 commit comments