Language Models Tools
Spice provides tools that help LLMs interact with the runtime. To specify these tools for a Spice model, include them in its params.tools.
For a list of available tools, or how to define additional tools, see Tool Components.
Example: Specifying Tools for a Model​
models:
- name: sql-model
from: openai:gpt-4o
params:
tools: list_datasets, sql, table_schema
- name: full-runtime
from: openai:gpt-4o
params:
tools: auto # Use all default tools
Additional tools can be appended:
models:
- name: full-runtime
from: openai:gpt-4o
params:
tools: auto, memory
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.
models:
- name: my-model
from: openai
params:
tool_recursion_limit: 3
