From a151e30c472543d5244366585c2c8cbaff4e6a27 Mon Sep 17 00:00:00 2001 From: Kishlay Singh Date: Wed, 11 Jun 2025 20:28:13 +0530 Subject: [PATCH 1/3] Adding Input Schema object definition --- .../resources/gen-ai/definitions.yml | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/specification/resources/gen-ai/definitions.yml b/specification/resources/gen-ai/definitions.yml index 52ee2d115..9059885c2 100644 --- a/specification/resources/gen-ai/definitions.yml +++ b/specification/resources/gen-ai/definitions.yml @@ -2093,7 +2093,7 @@ apiLinkAgentFunctionInputPublic: example: '"my-function"' type: string faas_namespace: - description: The namespace of the function in the DigitalOcean functions platform + description: The function uuid of the function in the DigitalOcean functions platform example: '"default"' type: string function_name: @@ -2104,6 +2104,7 @@ apiLinkAgentFunctionInputPublic: description: Describe the input schema for the function so the agent may call it type: object + $ref: '#/inputSchema' output_schema: description: Describe the output schema for the function so the agent handle its response @@ -3542,3 +3543,59 @@ protobufNullValue: - NULL_VALUE example: NULL_VALUE type: string +inputSchema: + description: Input schema for a function + minItems: 1 + items: + $ref: '#/inputSchemaParameters' + type: array +inputSchemaParameters: + description: Input schema for a function parameters + type: object + properties: + name: + description: Name of the parameter + example: '"example parameter"' + type: string + in: + description: Location of the parameter + example: '"query"' + type: string + schema: + description: Schema of the parameter + $ref: '#/nestedSchema' + description: + description: Description of the parameter + example: '"This is an example parameter"' + type: string + required: + description: Whether the parameter is required + example: true + type: boolean +nestedSchema: + description: Nested schema for a function input or output + type: object + properties: + type: + description: Type of the schema + example: '"string"' + type: string + items: + description: Items in the schema if it is an array + $ref: '#/nestedSchema' + properties: + type: object + description: Properties if it is an object + additionalProperties: + $ref: '#/nestedSchema' + example: '{"property1": {"type": "string"}, "property2": {"type": "integer"}}' + enum: + description: Enum values if applicable + example: "['value1', 'value2']" + items: + type: string + type: array + description: + description: Description of the schema + example: '"This is an example nested schema"' + type: string From 1cb6969fcc39e3cafcefff3ec42174353cc07ec5 Mon Sep 17 00:00:00 2001 From: Kishlay Singh Date: Mon, 23 Jun 2025 18:02:56 +0530 Subject: [PATCH 2/3] Adding example to inputSchema --- .../resources/gen-ai/definitions.yml | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/specification/resources/gen-ai/definitions.yml b/specification/resources/gen-ai/definitions.yml index 9059885c2..85ea41d27 100644 --- a/specification/resources/gen-ai/definitions.yml +++ b/specification/resources/gen-ai/definitions.yml @@ -2103,8 +2103,23 @@ apiLinkAgentFunctionInputPublic: input_schema: description: Describe the input schema for the function so the agent may call it - type: object $ref: '#/inputSchema' + example: + { + "type": "object", + "properties": { + "param1": { + "type": "string", + "description": "A string parameter" + }, + "param2": { + "type": "integer", + "description": "An integer parameter" + } + }, + "required": ["param1"] + } + output_schema: description: Describe the output schema for the function so the agent handle its response @@ -3545,10 +3560,14 @@ protobufNullValue: type: string inputSchema: description: Input schema for a function - minItems: 1 - items: - $ref: '#/inputSchemaParameters' - type: array + type: object + properties: + parameters: + description: Parameters for the function + type: array + minItems: 1 + items: + $ref: '#/inputSchemaParameters' inputSchemaParameters: description: Input schema for a function parameters type: object @@ -3572,6 +3591,13 @@ inputSchemaParameters: description: Whether the parameter is required example: true type: boolean + example: + name: "user_id" + in: "query" + schema: + type: "string" + description: "The ID of the user" + required: true nestedSchema: description: Nested schema for a function input or output type: object From 4ff1945cedbed491ca92c797db56a7ed4ad59f7d Mon Sep 17 00:00:00 2001 From: Anup Deka Date: Tue, 24 Jun 2025 14:59:04 +0530 Subject: [PATCH 3/3] Resolve Error --- .../resources/gen-ai/definitions.yml | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/specification/resources/gen-ai/definitions.yml b/specification/resources/gen-ai/definitions.yml index 85ea41d27..1e0dd6dc8 100644 --- a/specification/resources/gen-ai/definitions.yml +++ b/specification/resources/gen-ai/definitions.yml @@ -2101,25 +2101,7 @@ apiLinkAgentFunctionInputPublic: example: '"My Function"' type: string input_schema: - description: Describe the input schema for the function so the agent may call - it $ref: '#/inputSchema' - example: - { - "type": "object", - "properties": { - "param1": { - "type": "string", - "description": "A string parameter" - }, - "param2": { - "type": "integer", - "description": "An integer parameter" - } - }, - "required": ["param1"] - } - output_schema: description: Describe the output schema for the function so the agent handle its response @@ -3565,7 +3547,6 @@ inputSchema: parameters: description: Parameters for the function type: array - minItems: 1 items: $ref: '#/inputSchemaParameters' inputSchemaParameters: @@ -3581,7 +3562,6 @@ inputSchemaParameters: example: '"query"' type: string schema: - description: Schema of the parameter $ref: '#/nestedSchema' description: description: Description of the parameter @@ -3607,17 +3587,19 @@ nestedSchema: example: '"string"' type: string items: - description: Items in the schema if it is an array $ref: '#/nestedSchema' properties: type: object description: Properties if it is an object additionalProperties: $ref: '#/nestedSchema' - example: '{"property1": {"type": "string"}, "property2": {"type": "integer"}}' + example: + property1: + type: "string" enum: description: Enum values if applicable - example: "['value1', 'value2']" + example: + - "value1" items: type: string type: array