v2
latestOpenAPI 3.1.02026-07-2670186350.6 KBfunctions
Update Function
Update a function, this will create a new revision of the function
patch/functions/{function_id}
Path parameters
function_idstring uuid required
Unique identifier of the function given as a UUID
Unique identifier of the function given as a UUID
Request body
Example request
{
"name": "my-function",
"description": "This function is used to add two numbers and return the result.",
"instructions": "You are a calculator that adds two numbers and returns the result.",
"input_schema": {
"properties": {
"x": {
"title": "X",
"type": "integer"
},
"y": {
"title": "Y",
"type": "integer"
}
},
"required": [
"x",
"y"
],
"title": "OpperInputExample",
"type": "object"
},
"output_schema": {
"properties": {
"sum": {
"title": "Sum",
"type": "integer"
}
},
"required": [
"sum"
],
"title": "OpperOutputExample",
"type": "object"
},
"configuration": {
"beta.invocation.input_validation.enabled": false,
"beta.invocation.xml_mode.enabled": false,
"invocation.cache.ttl": 0,
"invocation.few_shot.count": 3,
"invocation.structured_generation.max_attempts": 5
}
}Response
Successful Response
Example response
{
"name": "my-function",
"description": "This function is used to add two numbers and return the result.",
"instructions": "You are a calculator that adds two numbers and returns the result.",
"input_schema": {
"properties": {
"x": {
"title": "X",
"type": "integer"
},
"y": {
"title": "Y",
"type": "integer"
}
},
"required": [
"x",
"y"
],
"title": "OpperInputExample",
"type": "object"
},
"output_schema": {
"properties": {
"sum": {
"title": "Sum",
"type": "integer"
}
},
"required": [
"sum"
],
"title": "OpperOutputExample",
"type": "object"
}
}