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
str <<"my phone number is: #{user.phone}\n"if user.phone.presence
149
212
str <<"my swipe card number is: #{user.card_number}\n"if user.card_number.presence
150
213
str <<"my user_id is: #{user.id}\n"
151
-
str <<"use these details in function calls as required\n"
214
+
str <<"use these details in function calls as required.\n"
215
+
str <<"perform one task at a time, making as many function calls as required to complete a task. Once a task is complete call the task_complete function with details of the progress you've made.\n"
152
216
str <<"the chat client prepends the date-time each message was sent at in the following format YYYY-MM-DD HH:mm:ss +ZZ:ZZ:ZZ"
"You have the following capability list, described in the following JSON:\n```json\n#{payload.capabilities.to_json}\n```\n"+
185
-
"if a request could benefit from these capabilities, obtain the list of functions by providing the id string."
186
-
else
187
-
"if a request could benefit from a capability, obtain the list of functions by providing the id string"
188
-
end
189
-
190
247
executor.add(
191
248
name:"list_function_schemas",
192
-
description:description,
249
+
description:"if a request could benefit from a capability, obtain the list of function schemas by providing the id string",
193
250
clz:FunctionDiscovery
194
251
) do |call|
195
252
request = call.as(FunctionDiscovery)
@@ -206,7 +263,8 @@ module PlaceOS::Api
206
263
executor.add(
207
264
name:"call_function",
208
265
description:"Executes functionality offered by a capability, you'll need to obtain the function schema to perform requests",
209
-
clz:FunctionExecutor) do |call|
266
+
clz:FunctionExecutor
267
+
) do |call|
210
268
request = call.as(FunctionExecutor)
211
269
reply ="No response received"
212
270
begin
@@ -219,6 +277,15 @@ module PlaceOS::Api
219
277
DriverResponse.new(reply).as(JSON::Serializable)
220
278
end
221
279
280
+
executor.add(
281
+
name:"task_complete",
282
+
description:"Once a task is complete, call this function with the details that are relevant to the conversion. Provide enough detail so you don't perform the actions again and can formulate a response to the user",
283
+
clz:TaskCompleted
284
+
) do |call|
285
+
request = call.as(TaskCompleted)
286
+
request.as(JSON::Serializable)
287
+
end
288
+
222
289
executor
223
290
end
224
291
@@ -279,6 +346,14 @@ module PlaceOS::Api
279
346
getter id : String
280
347
end
281
348
349
+
private structTaskCompleted
350
+
extendOpenAI::FuncMarker
351
+
includeJSON::Serializable
352
+
353
+
@[JSON::Field(description:"the details of the task that are relevant to continuing the conversion")]
0 commit comments