-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTools.py
96 lines (96 loc) · 2.76 KB
/
Tools.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
84
85
86
87
88
89
90
91
92
93
94
95
96
tools = [
{
"type": "function", #获取当前时间
"function": {
"name": "get_current_date",
"description": "Get the current time,or get today's date",
"parameters": {
"type": "object",
"properties": {
},
"required": [],
},
}
},
{
"type": "function", #获取当前地址
"function": {
"name": "get_location",
"description": "Get the current address",
"parameters": {
"type": "object",
"properties": {
},
"required": [],
},
}
},
{
"type": "function", #获取当前天气
"function": {
"name": "get_weather",
"description": "Get the current weather",
"parameters": {
"type": "object",
"properties": {
},
"required": [],
},
}
},
{
"type": "function", #获取几天的天气预报
"function": {
"name": "get_weather_n",
"description": "Get an N-day weather forecast",
"parameters": {
"type": "object",
"properties": {
"num_days": {
"type": "string",
"description": "The number of days to forecast",
}
},
"required": ["num_days"],
},
}
},
{
"type": "function", #获取问题,并google搜索返回
"function": {
"name": "get_web",
"description": "Get the question's answer from web search",
"parameters": {
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "user's question",
}
},
"required": ["question"],
},
}
},
{
"type": "function", #发送电子邮件
"function": {
"name": "get_email",
"description": "Send a email to some address",
"parameters": {
"type": "object",
"properties": {
"receiver": {
"type": "string",
"description": "email address",
},
"content": {
"type": "string",
"description": "the contents of the email ",
},
},
"required": ["receiver", "content"],
},
}
}
]