Team Ai
Apppublic

google/functiongemma-tuning-lab

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
86likes
tools.py46 linesDownload Raw Back to root
1# --- Tool Definitions ---2# (Existing python functions search_knowledge_base/search_google remain here for reference, 3# but the schema below is what matters for the LLM)4 5search_knowledge_base_schema = {6  "type": "function",7  "function": {8    "name": "search_knowledge_base",9    "description": "Search internal company documents, policies and project data.",10    "parameters": {11      "type": "object",12      "properties": {13        "query": {14          "type": "string",15          "description": "query string"16        }17      },18      "required": ["query"]19    },20    "return": {"type": "string"}21  }22}23 24search_google_schema = {25  "type": "function",26  "function": {27    "name": "search_google",28    "description": "Search public information.",29    "parameters": {30      "type": "object",31      "properties": {32        "query": {33          "type": "string",34          "description": "query string"35        }36      },37      "required": ["query"]38    },39    "return": {"type": "string"}40  }41}42 43# Renamed to DEFAULT_TOOLS to imply modifiability44DEFAULT_TOOLS = [search_knowledge_base_schema, search_google_schema]45DEFAULT_SYSTEM_MSG = "You are a model that can do function calling with the following functions"46