-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfunction.py
74 lines (74 loc) · 2.55 KB
/
function.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
function_list = [
{
"name": "query_city_weather", # Function Name
"description": "query weather temperature", # Meta information of function
"parameters": { # parameters
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city",
},
},
"required": ["city"],
},
},
{
"name": "send_email",
"description": "Send email information",
"parameters": {
"type": "object",
"properties": {
"to_email": {
"type": "string",
"description": "Recipient's email address"
},
"title": {
"type": "string",
"description": "The title of the email"
},
"body": {
"type": "string",
"description": "The Body of the email"
}
},
"required": ["to_email", "title", "body"],
}
},
{
"name": "addition_function",
"description": "Calculate the left and right values of the + method operator symbol",
"parameters": {
"type": "object",
"properties": {
"left": {
"type": "number",
"description": "+The value on the left side of the operator symbol"
},
"right": {
"type": "number",
"description": "+The value on the right side of the operator symbol"
}
},
"required": ["left", "right"]
}
},
{
"name": "substruction_function",
"description": "substruction the left and right values of the - method operator symbol",
"parameters": {
"type": "object",
"properties": {
"left": {
"type": "number",
"description": "-The value on the left side of the operator symbol"
},
"right": {
"type": "number",
"description": "-The value on the right side of the operator symbol"
}
},
"required": ["left", "right"]
}
}
]