You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Only if explicitly specified by the user, the name of the alarm. Use title case. If the user didn't ask to name the alarm, just leave it empty.",
88
-
Nullable: true,
90
+
Nullable: &t,
89
91
}
90
92
// This registration is for new watch apps that support named alarms. The capability prevents the option for
91
93
// naming being presented to the model for older apps.
@@ -118,12 +120,12 @@ func init() {
118
120
Description: "Delete a specific alarm by its expiration time.",
119
121
Parameters: &genai.Schema{
120
122
Type: genai.TypeObject,
121
-
Nullable: false,
123
+
Nullable: &f,
122
124
Properties: map[string]*genai.Schema{
123
125
"time": {
124
126
Type: genai.TypeString,
125
127
Description: "The time of the alarm to delete in ISO 8601 format, e.g. '2023-07-12T00:00:00-07:00'.",
126
-
Nullable: false,
128
+
Nullable: &t,
127
129
},
128
130
},
129
131
},
@@ -134,12 +136,12 @@ func init() {
134
136
})
135
137
timerParams:= genai.Schema{
136
138
Type: genai.TypeObject,
137
-
Nullable: false,
139
+
Nullable: &f,
138
140
Properties: map[string]*genai.Schema{
139
141
"duration_seconds": {
140
142
Type: genai.TypeInteger,
141
143
Description: "The number of seconds to set the timer for.",
Description: "Only if explicitly specified by the user, the name of the timer. Use title case. If the user didn't ask to name the timer, just leave it empty.",
165
-
Nullable: true,
167
+
Nullable: &t,
166
168
}
167
169
registerFunction(Registration{
168
170
Definition: genai.FunctionDeclaration{
@@ -193,12 +195,12 @@ func init() {
193
195
Description: "Delete a specific timer by its expiration time.",
194
196
Parameters: &genai.Schema{
195
197
Type: genai.TypeObject,
196
-
Nullable: false,
198
+
Nullable: &f,
197
199
Properties: map[string]*genai.Schema{
198
200
"time": {
199
201
Type: genai.TypeString,
200
202
Description: "The time of the alarm to delete in ISO 8601 format, e.g. '2023-07-12T00:00:00-07:00'.",
Copy file name to clipboardExpand all lines: service/assistant/functions/currency.go
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -38,24 +38,25 @@ type CurrencyConversionResponse struct {
38
38
}
39
39
40
40
funcinit() {
41
+
f:=false
41
42
registerFunction(Registration{
42
43
Definition: genai.FunctionDeclaration{
43
44
Name: "convert_currency",
44
45
Description: "Convert an amount of one (real, non-crypto) currency to another. *Always* call this function to get exchange rates when doing currency conversion - never use memorised rates.",
45
46
Parameters: &genai.Schema{
46
47
Type: genai.TypeObject,
47
-
Nullable: false,
48
+
Nullable: &f,
48
49
Properties: map[string]*genai.Schema{
49
50
"amount": {
50
51
Type: genai.TypeNumber,
51
52
Format: "double",
52
53
Description: "The amount of currency to convert.",
53
-
Nullable: false,
54
+
Nullable: &f,
54
55
},
55
56
"from": {
56
57
Type: genai.TypeString,
57
58
Description: "The currency code to convert from.",
Copy file name to clipboardExpand all lines: service/assistant/functions/feedback.go
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,23 +28,24 @@ type FeedbackInput struct {
28
28
}
29
29
30
30
funcinit() {
31
+
f:=false
31
32
registerFunction(Registration{
32
33
Definition: genai.FunctionDeclaration{
33
34
Name: "send_feedback",
34
35
Description: "Send feedback to the developers. Include the thread if you want to provide context for the feedback. Only call this if the user specifically asks to send feedback. Feedback text is optional but recommended if include_thread is true.",
35
36
Parameters: &genai.Schema{
36
37
Type: genai.TypeObject,
37
-
Nullable: false,
38
+
Nullable: &f,
38
39
Properties: map[string]*genai.Schema{
39
40
"feedback": {
40
41
Type: genai.TypeString,
41
42
Description: "The feedback to send to the developers.",
42
-
Nullable: false,
43
+
Nullable: &f,
43
44
},
44
45
"include_thread": {
45
46
Type: genai.TypeBoolean,
46
47
Description: "Whether to include the thread as context in the feedback.",
Copy file name to clipboardExpand all lines: service/assistant/functions/poi.go
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -35,23 +35,25 @@ type POIResponse struct {
35
35
}
36
36
37
37
funcinit() {
38
+
f:=false
39
+
t:=true
38
40
registerFunction(Registration{
39
41
Definition: genai.FunctionDeclaration{
40
42
Name: "poi",
41
43
Description: "Look up points of interest near the user's location (or another named location).",
42
44
Parameters: &genai.Schema{
43
45
Type: genai.TypeObject,
44
-
Nullable: false,
46
+
Nullable: &f,
45
47
Properties: map[string]*genai.Schema{
46
48
"query": {
47
49
Type: genai.TypeString,
48
50
Description: "The search query to use to find points of interest. Could be a name (e.g. \"McDonald's\"), a category (e.g. \"restaurant\" or \"pizza\"), or another search term.",
49
-
Nullable: false,
51
+
Nullable: &f,
50
52
},
51
53
"location": {
52
54
Type: genai.TypeString,
53
55
Description: "The name of the location to search near. If not provided, the user's current location will be used. Assume that no location should be provided unless explicitly requested: not providing one results in more accurate answers.",
Copy file name to clipboardExpand all lines: service/assistant/functions/reminders.go
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -45,29 +45,31 @@ type DeleteReminderInput struct {
45
45
}
46
46
47
47
funcinit() {
48
+
f:=false
49
+
t:=true
48
50
registerFunction(Registration{
49
51
Definition: genai.FunctionDeclaration{
50
52
Name: "set_reminder",
51
53
Description: "Set a reminder for the user to perform a task at a time. Either time or delay must be provided, but not both. If the user specifies a time but not a day, assume they meant the next time that time will happen.",
52
54
Parameters: &genai.Schema{
53
55
Type: genai.TypeObject,
54
-
Nullable: false,
56
+
Nullable: &f,
55
57
Properties: map[string]*genai.Schema{
56
58
"time": {
57
59
Type: genai.TypeString,
58
60
Description: "The time to schedule the reminder for in ISO 8601 format, e.g. '2023-07-12T00:00:00-07:00'. Always assume the user's timezone unless otherwise specified.",
59
-
Nullable: true,
61
+
Nullable: &t,
60
62
},
61
63
"delay_mins": {
62
64
Type: genai.TypeInteger,
63
65
Description: "The delay from now to when the reminder should be scheduled, in minutes.",
64
-
Nullable: true,
66
+
Nullable: &t,
65
67
Format: "int32",
66
68
},
67
69
"what": {
68
70
Type: genai.TypeString,
69
71
Description: "What to remind the user to do.",
70
-
Nullable: false,
72
+
Nullable: &t,
71
73
},
72
74
},
73
75
Required: []string{"what"},
@@ -94,12 +96,12 @@ func init() {
94
96
Description: "Delete a specific reminder by its ID.",
95
97
Parameters: &genai.Schema{
96
98
Type: genai.TypeObject,
97
-
Nullable: false,
99
+
Nullable: &f,
98
100
Properties: map[string]*genai.Schema{
99
101
"id": {
100
102
Type: genai.TypeString,
101
103
Description: "The ID of the reminder to delete. You *must* call get_reminders first to discover the ID of the correct reminder.",
Copy file name to clipboardExpand all lines: service/assistant/functions/time.go
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,19 @@ type GetTimeInput struct {
23
23
}
24
24
25
25
funcinit() {
26
+
f:=false
26
27
registerFunction(Registration{
27
28
Definition: genai.FunctionDeclaration{
28
29
Name: "get_time_elsewhere",
29
30
Description: "Get the current time in a given valid tzdb timezone. Not all cities have a tzdb entry - be sure to use one that exists. Call multiple times to find the time in multiple timezones.",
30
31
Parameters: &genai.Schema{
31
32
Type: genai.TypeObject,
32
-
Nullable: false,
33
+
Nullable: &f,
33
34
Properties: map[string]*genai.Schema{
34
35
"timezone": {
35
36
Type: genai.TypeString,
36
37
Description: "The timezone, e.g. 'America/Los_Angeles'.",
Copy file name to clipboardExpand all lines: service/assistant/functions/weather.go
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -36,29 +36,31 @@ type WeatherInput struct {
36
36
}
37
37
38
38
funcinit() {
39
+
t:=true
40
+
f:=false
39
41
registerFunction(Registration{
40
42
Definition: genai.FunctionDeclaration{
41
43
Name: "get_weather",
42
44
Description: "Given a location, return the current or future weather, and sunrise/sunset times. Do not specify a location if you want the user's local weather.",
43
45
Parameters: &genai.Schema{
44
46
Type: genai.TypeObject,
45
-
Nullable: false,
47
+
Nullable: &f,
46
48
Properties: map[string]*genai.Schema{
47
49
"location": {
48
50
Type: genai.TypeString,
49
51
Description: "The city, state, and country, e.g. 'Redwood City, CA, USA'. Omit for the user's current location.",
Copy file name to clipboardExpand all lines: service/assistant/functions/wikipedia.go
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -46,29 +46,30 @@ var urlMap = map[string]string{
46
46
}
47
47
48
48
funcinit() {
49
+
f:=false
49
50
registerFunction(Registration{
50
51
Definition: genai.FunctionDeclaration{
51
52
Name: "wikipedia",
52
53
Description: "Look up the content of a single named wiki article, from Wikipedia or topic-specific wikis like Bulbapedia. Never say the wiki page didn't have the information needed without first trying to fetch the complete article.",
53
54
Parameters: &genai.Schema{
54
55
Type: genai.TypeObject,
55
-
Nullable: false,
56
+
Nullable: &f,
56
57
Properties: map[string]*genai.Schema{
57
58
"wiki": {
58
59
Type: genai.TypeString,
59
60
Description: "The Wiki to search.",
60
-
Nullable: false,
61
+
Nullable: &f,
61
62
Enum: []string{"wikipedia", "bulbapedia"},
62
63
},
63
64
"article_name": {
64
65
Type: genai.TypeString,
65
66
Description: "The name of the article to look up",
66
-
Nullable: false,
67
+
Nullable: &f,
67
68
},
68
69
"complete_article": {
69
70
Type: genai.TypeBoolean,
70
71
Description: "Whether to return the complete article or just the summary. Prefer to fetch only the summary. If the summary didn't have the information you expected, you can try again with the complete article.",
0 commit comments