File size: 5,146 Bytes
ce0bf87 6d0f82e ce0bf87 6d0f82e ce0bf87 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
"""
Enhanced Search Functions for Native Function Calling
This file defines all the function calling schemas for the enhanced research system
"""
ENHANCED_SEARCH_FUNCTIONS = [
{
"type": "function",
"function": {
"name": "search_web",
"description": "Search the web for current information and real-time data using DuckDuckGo",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query to find current information relevant to the expert analysis"
},
"depth": {
"type": "string",
"enum": ["standard", "deep"],
"description": "Search depth - 'standard' for single source, 'deep' for multi-source synthesis",
"default": "standard"
}
},
"required": ["query"]
}
}
},
{
"type": "function",
"function": {
"name": "search_wikipedia",
"description": "Search Wikipedia for comprehensive background information and authoritative encyclopedic data",
"parameters": {
"type": "object",
"properties": {
"topic": {
"type": "string",
"description": "The topic to research on Wikipedia for comprehensive background information"
}
},
"required": ["topic"]
}
}
},
{
"type": "function",
"function": {
"name": "search_academic",
"description": "Search academic papers and research on arXiv for scientific evidence",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Academic research query to find peer-reviewed papers and scientific studies"
}
},
"required": ["query"]
}
}
},
{
"type": "function",
"function": {
"name": "search_technology_trends",
"description": "Search GitHub for technology adoption, development trends, and open source activity",
"parameters": {
"type": "object",
"properties": {
"technology": {
"type": "string",
"description": "Technology, framework, or programming language to research for adoption trends"
}
},
"required": ["technology"]
}
}
},
{
"type": "function",
"function": {
"name": "search_financial_data",
"description": "Search SEC EDGAR filings and financial data for public companies",
"parameters": {
"type": "object",
"properties": {
"company": {
"type": "string",
"description": "Company name or ticker symbol to research financial data and SEC filings"
}
},
"required": ["company"]
}
}
},
{
"type": "function",
"function": {
"name": "multi_source_research",
"description": "Perform comprehensive multi-source research synthesis across all available sources",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Research query for comprehensive multi-source analysis"
},
"priority_sources": {
"type": "array",
"items": {
"type": "string",
"enum": ["web", "wikipedia", "arxiv", "github", "sec"]
},
"description": "Priority list of sources to focus on for this research",
"default": []
}
},
"required": ["query"]
}
}
}
]
def get_function_definitions():
"""Get the complete function definitions for API calls"""
return ENHANCED_SEARCH_FUNCTIONS
def get_function_names():
"""Get list of all available function names"""
return [func["function"]["name"] for func in ENHANCED_SEARCH_FUNCTIONS]
# Function routing map for backward compatibility
FUNCTION_ROUTING = {
"search_web": "web_search",
"search_wikipedia": "wikipedia_search",
"search_academic": "academic_search",
"search_technology_trends": "github_search",
"search_financial_data": "sec_search",
"multi_source_research": "multi_source_search"
} |