Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runtime_tools.md for tool_recursion_limit. #562

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions spiceaidocs/docs/features/ai-gateway/runtime_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.