File size: 1,216 Bytes
fdf7bd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# --- Tool Definitions ---
# (Existing python functions search_knowledge_base/search_google remain here for reference, 
# but the schema below is what matters for the LLM)

search_knowledge_base_schema = {
  "type": "function",
  "function": {
    "name": "search_knowledge_base",
    "description": "Search internal company documents, policies and project data.",
    "parameters": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "query string"
        }
      },
      "required": ["query"]
    },
    "return": {"type": "string"}
  }
}

search_google_schema = {
  "type": "function",
  "function": {
    "name": "search_google",
    "description": "Search public information.",
    "parameters": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "query string"
        }
      },
      "required": ["query"]
    },
    "return": {"type": "string"}
  }
}

# Renamed to DEFAULT_TOOLS to imply modifiability
DEFAULT_TOOLS = [search_knowledge_base_schema, search_google_schema]
DEFAULT_SYSTEM_MSG = "You are a model that can do function calling with the following functions"