Skip to main content

TOOLS_JSON

Constant TOOLS_JSON 

Source
pub const TOOLS_JSON: &str = "[\n  {\"name\": \"calc\", \"description\": \"Exact arithmetic on integers and decimals: + - * / % ^ and parentheses, sum(), min(), max(), mean(), abs(), round(). Returns the exact result.\",\n   \"parameters\": {\"type\": \"object\", \"properties\": {\"expression\": {\"type\": \"string\"}}, \"required\": [\"expression\"]}},\n  {\"name\": \"table\", \"description\": \"Computes over the last command output read as a table: one row a line, columns split by spaces, a header line names the columns, a row\'s name is its last column, a total line is left out. op: count, sum, min, max, mean, get (one cell), argmax or argmin (the name of the row), diff (the first of two rows minus the second).\",\n   \"parameters\": {\"type\": \"object\", \"properties\": {\"op\": {\"type\": \"string\", \"enum\": [\"count\", \"sum\", \"min\", \"max\", \"mean\", \"get\", \"argmax\", \"argmin\", \"diff\"]},\n     \"column\": {\"description\": \"the column: its header name or its number from 1\"},\n     \"rows\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}, \"description\": \"only the rows with these names\"},\n     \"where\": {\"type\": \"object\", \"properties\": {\"column\": {}, \"op\": {\"type\": \"string\", \"enum\": [\"=\", \"!=\", \">\", \"<\", \">=\", \"<=\", \"contains\"]}, \"value\": {}},\n       \"description\": \"only the rows whose cell passes the test\"}},\n     \"required\": [\"op\"]}}\n]\n";
Expand description

The model-facing descriptions ({"name", "description", "parameters"}).