Skip to main content

Giving Language Models Runtime Tools

Spice provides a set of tools that let LLMs interact with the runtime. To provide these tools to a Spice model, specify them in its params.spice_tools.

models:
- name: sql-model
from: openai:gpt-4o
params:
spice_tools: list_datasets, sql, table_schema

- name: full-runtime
from: openai:gpt-4o
params:
spice_tools: auto # Use all available tools

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.