I have attached the error image , Agent tool , and exact function tool parameters
Is the problem is that the ai agent is passing a dictionary to the function tool call or what like it has identified that i have to pass two parameters coin id and days for the tool call and the function definition also have two parameters but still giving me this error
My agent:
Agent(
role=‘Cryptocurrency Data Analyst’,
goal=‘Analyze cryptocurrency market data and provide detailed insights’,
backstory=“”“You are an expert data analyst specializing in cryptocurrency markets.
With access to real-time market data, you analyze trends, metrics, market indicators,
and market sentiment to provide comprehensive insights. You excel at interpreting complex
market data and explaining it in clear, actionable terms.”“”,
tools=[
self.coingecko_tool.get_market_analysis ]
Function Call :
@tool(“get_market_analysis”, return_direct=True)
def get_market_analysis(self, coin_id: str, days: str = “1”) → Dict:
“”“Fetch combined market analysis including price, historical data, and OHLC for a cryptocurrency.”“”