Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion specification/v0_10/json/client_to_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"$ref": "common_types.json#/$defs/CallId",
"description": "Unique ID for the instance of this function. MUST be copied verbatim from the function invocation."
},
"call": {
"type": "string",
"description": "The name of the function which was called. MUST be copied verbatim from the function invocation. Useful for logging."
},
Comment thread
jgindin marked this conversation as resolved.
"value": {
"description": "The return value of the function invocation.",
"type": [
Expand All @@ -72,7 +76,7 @@
]
}
},
"required": ["functionCallId", "value"],
"required": ["functionCallId", "call", "value"],
"unevaluatedProperties": false
},
"error": {
Expand Down
15 changes: 2 additions & 13 deletions specification/v0_10/json/common_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@
"description": "The unique identifier for a component, used for both definitions and references within the same surface."
},
"CallId": {
"type": "object",
"description": "The unique identifier for a server initiated function call.",
"properties": {
"agentId": {
"type": "string",
"description": "Identifies the agent initiating the function call."
},
"callId": {
"type": "string",
"description": "Uniquely identifies this instance of the function call."
}
},
"required": ["callId"]
"type": "string",
"description": "The unique identifier for a server initiated function call."
},
"AccessibilityAttributes": {
"type": "object",
Expand Down
20 changes: 10 additions & 10 deletions specification/v0_10/test/cases/call_function_message.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"returnType": "void",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "unique-call-id-123" },
"functionCallId": "unique-call-id-123",
"wantResponse": true
}
},
Expand All @@ -29,7 +29,7 @@
"returnType": "void",
"callableFrom": "remoteOnly"
},
"functionCallId": { "callId": "unique-call-id-123a" },
"functionCallId": "unique-call-id-123a",
"wantResponse": false
}
},
Expand All @@ -46,7 +46,7 @@
"returnType": "void",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "unique-call-id-124" }
"functionCallId": "unique-call-id-124"
}
},
{
Expand All @@ -67,7 +67,7 @@
"valid": false,
"data": {
"version": "v0.10",
"functionCallId": { "callId": "unique-call-id-125" }
"functionCallId": "unique-call-id-125"
}
},
{
Expand All @@ -81,7 +81,7 @@
"returnType": "boolean",
"callableFrom": "clientOnly"
},
"functionCallId": { "callId": "unique-call-id-126" }
"functionCallId": "unique-call-id-126"
}
},
{
Expand All @@ -94,7 +94,7 @@
"args": { "value": "bar" },
"returnType": "boolean"
},
"functionCallId": { "callId": "unique-call-id-126b" }
"functionCallId": "unique-call-id-126b"
}
},
{
Expand All @@ -110,7 +110,7 @@
"returnType": "boolean",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "unique-call-id-127" }
"functionCallId": "unique-call-id-127"
}
},
{
Expand All @@ -126,7 +126,7 @@
"returnType": "boolean",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "unique-call-id-128" }
"functionCallId": "unique-call-id-128"
}
},
{
Expand All @@ -140,7 +140,7 @@
"returnType": "object",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "unique-call-id-129" }
"functionCallId": "unique-call-id-129"
}
},
{
Expand All @@ -156,7 +156,7 @@
"returnType": "boolean",
"callableFrom": "clientOrRemote"
},
"functionCallId": { "callId": "id-3" }
"functionCallId": "id-3"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions specification/v0_10/test/cases/client_messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"version": "v0.10",
"error": {
"code": "FUNCTION_FAILED",
"functionCallId": { "callId": "unique-call-id-132" },
"functionCallId": "unique-call-id-132",
"message": "Something went wrong"
}
}
Expand All @@ -62,7 +62,7 @@
"version": "v0.10",
"error": {
"code": "FUNCTION_FAILED",
"functionCallId": { "callId": "unique-call-id-133" },
"functionCallId": "unique-call-id-133",
"surfaceId": "main",
"message": "Something went wrong"
}
Expand Down
59 changes: 51 additions & 8 deletions specification/v0_10/test/cases/function_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-130" },
"functionCallId": "unique-call-id-130",
"call": "someFunction",
"value": {
"result": "success",
"count": 42
Expand All @@ -33,7 +34,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131a" },
"functionCallId": "unique-call-id-131a",
"call": "someFunction",
"value": "success"
}
}
Expand All @@ -44,7 +46,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131b" },
"functionCallId": "unique-call-id-131b",
"call": "someFunction",
"value": 42
}
}
Expand All @@ -55,7 +58,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131c" },
"functionCallId": "unique-call-id-131c",
"call": "someFunction",
"value": true
}
}
Expand All @@ -66,7 +70,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131d" },
"functionCallId": "unique-call-id-131d",
"call": "someFunction",
"value": null
}
}
Expand All @@ -77,7 +82,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131e" },
"functionCallId": "unique-call-id-131e",
"call": "someFunction",
"value": [
"one",
2,
Expand All @@ -93,7 +99,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131" },
"functionCallId": "unique-call-id-131",
"call": "someFunction",
"value": {
"result": { "nested": "object" }
}
Expand All @@ -106,7 +113,8 @@
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": { "callId": "unique-call-id-131f" },
"functionCallId": "unique-call-id-131f",
"call": "someFunction",
"value": [
"one",
{
Expand All @@ -115,6 +123,41 @@
]
}
}
},
{
"description": "functionResponse: Valid (with call property)",
"valid": true,
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": "unique-call-id-132",
"call": "myAwesomeFunction",
"value": "success"
}
}
},
{
"description": "functionResponse: Invalid (call property is not a string)",
"valid": false,
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": "unique-call-id-133",
"call": 123,
"value": "success"
}
}
},
{
"description": "functionResponse: Invalid (missing call)",
"valid": false,
"data": {
"version": "v0.10",
"functionResponse": {
"functionCallId": "unique-call-id-134",
"value": "success"
}
}
}
]
}
Loading