BotSharp/src/Plugins/BotSharp.Plugin.SqlDriver/data/agents/beda4c12-e1ec-4b4b-b328-3df4a6687c4f/functions.json
2024-02-22 13:37:14 -06:00

154 lines
4.2 KiB
JSON

[
{
"name": "get_table_columns",
"description": "Get related table columns and foreign key informations",
"parameters": {
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "table name"
}
},
"required": [ "table" ]
}
},
{
"name": "sql_insert",
"description": "Insert query is generated if the record doesn't exist.",
"parameters": {
"type": "object",
"properties": {
"sql_statement": {
"type": "string",
"description": "INSERT SQL statement. The value should use the parameter name like @field."
},
"reason": {
"type": "string",
"description": "reason"
},
"table": {
"type": "string",
"description": "related table"
},
"parameters": {
"type": "array",
"description": "a list of parameters in the statement match with the variables",
"items": {
"type": "object",
"description": "{name:'', value:''}",
"properties": {
"name": {
"type": "string",
"description": "field name"
},
"value": {
"type": "string",
"description": "real value inferred by the context"
}
},
"required": [ "name", "value" ]
}
},
"return_field": {
"type": "object",
"description": "the name and alias for the return field",
"properties": {
"name": {
"type": "string",
"description": "field name"
},
"alias": {
"type": "string",
"description": "meaningful field alias"
}
},
"required": [ "name", "alias" ]
}
},
"required": [ "sql_statement", "reason", "table", "parameters", "return_field" ]
}
},
{
"name": "sql_select",
"description": "Get the specific value from table",
"parameters": {
"type": "object",
"properties": {
"sql_statement": {
"type": "string",
"description": "SQL statement with SELECT"
},
"reason": {
"type": "string",
"description": "reason"
},
"table": {
"type": "string",
"description": "related table"
},
"parameters": {
"type": "array",
"description": "data criteria for the query",
"items": {
"type": "object",
"description": "the name and value for the parameter",
"properties": {
"name": {
"type": "string",
"description": "field name"
},
"value": {
"type": "string",
"description": "real value inferred by the context"
}
},
"required": [ "name", "value" ]
}
},
"return_field": {
"type": "object",
"description": "the name and alias for the return field",
"properties": {
"name": {
"type": "string",
"description": "field in the table"
},
"alias": {
"type": "string",
"description": "meaningful field alias"
}
},
"required": [ "name", "value" ]
}
},
"required": [ "sql_statement", "reason", "table", "parameters", "return_field" ]
}
},
{
"name": "lookup_dictionary",
"description": "Get id from dictionary table by keyword if tool or solution mentioned this approach",
"parameters": {
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "table name"
},
"keyword": {
"type": "string",
"description": "table name"
},
"columns": {
"type": "array",
"description": "columns",
"items": {
"type": "string",
"description": "column"
}
}
},
"required": [ "table", "columns", "keyword" ]
}
}
]