diff --git a/spiceaidocs/docs/features/ai-gateway/runtime_tools.md b/spiceaidocs/docs/features/ai-gateway/runtime_tools.md index 5d0d80a5..0996741b 100644 --- a/spiceaidocs/docs/features/ai-gateway/runtime_tools.md +++ b/spiceaidocs/docs/features/ai-gateway/runtime_tools.md @@ -21,8 +21,22 @@ models: spice_tools: auto # Use all available tools ``` +### Tool Recursion Limit +When a model requests to call a runtime tool, Spice runs the tool internally and feeds it back to the model. The `tool_recursion_limit` parameter limits the depth of internal recursion Spice will undertake. By default, Spice can infinitely recurse if the model requests to do so. + +```yaml +models: + - name: my-model + from: openai + params: + tool_recursion_limit: 3 +``` + ## Available tools - `list_datasets`: List all available datasets in the runtime. - `sql`: Execute SQL queries on the runtime. - `table_schema`: Get the schema of a specific SQL table. - `document_similarity`: For datasets with an embedding column, retrieve documents based on an input query. It is equivalent to [/v1/search](/api/http/search). + - `sample_distinct_columns`: For a dataset, generate a synthetic sample of data whereby each column has at least a number of distinct values. + - `random_sample`: Sample random rows from a table. + - `top_n_sample`: Sample the top N rows from a table based on a specified ordering.