-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtool_definitions.py
83 lines (82 loc) · 2.64 KB
/
tool_definitions.py
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
"""
Function definitions and descriptions for the interactive chat system tools.
"""
function_definitions = [
{
"name": "perform_search",
"description": "Perform a web search using our native search tool.",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string", "description": "Search query"},
"max_results": {
"type": "integer",
"description": "Maximum search results",
"default": 10
},
"max_retries": {
"type": "integer",
"description": "Maximum number of retry attempts",
"default": 3
}
},
"required": ["query"]
}
},
{
"name": "fetch_web_content",
"description": "Fetch the content of web pages using our web scraper tool.",
"parameters": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {"type": "string"},
"description": "List of URLs to scrape"
},
"max_concurrent": {
"type": "integer",
"description": "Maximum number of concurrent requests",
"default": 3
}
},
"required": ["urls"]
}
},
{
"name": "create_file",
"description": "Create or change a file with the given content and return a success message.",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "Name of the file to create"
},
"content": {
"type": "string",
"description": "Content to write to the file"
}
},
"required": ["filename", "content"]
}
},
{
"name": "execute_command",
"description": "Execute a terminal command and return its output.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "The terminal command to execute"
},
"explanation": {
"type": "string",
"description": "Explanation of what the command does"
}
},
"required": ["command", "explanation"]
}
}
]