functions = [
{
"type": "function",
"function": {
"name": "get_stock_info",
"description": "Retrieve specific info about a stock",
"parameters": {
"type": "object",
"properties": {
"symbol": {"type": "string", "description": "Stock ticker like AAPL or GOOGL"},
"key": {"type": "string", "description": "The financial attribute to retrieve (e.g., 'marketCap', 'beta', 'currentPrice')"}
},
"required": ["symbol", "key"]
}
}
},
{
"type": "function",
"function": {
"name": "get_historical_price",
"description": "Retrieve historical stock price data. Accepts both absolute dates (YYYY-MM-DD) and relative dates (like '6 months ago', 'today', '1 year ago', etc.)",
"parameters": {
"type": "object",
"properties": {
"symbol": {"type": "string", "description": "Stock ticker symbol"},
"start_date": {"type": "string", "description": "Start date in YYYY-MM-DD format OR relative date like '6 months ago', '1 year ago'"},
"end_date": {"type": "string", "description": "End date in YYYY-MM-DD format OR relative date like 'today', 'yesterday'"}
},
"required": ["symbol", "start_date", "end_date"]
}
}
}
]