mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 12:06:04 +00:00
**This PR changes configurations in a backward incompatible way.**
Run configs today repeat full SQLite/Postgres snippets everywhere a
store is needed, which means duplicated credentials, extra connection
pools, and lots of drift between files. This PR introduces named storage
backends so the stack and providers can share a single catalog and
reference those backends by name.
## Key Changes
- Add `storage.backends` to `StackRunConfig`, register each KV/SQL
backend once at startup, and validate that references point to the right
family.
- Move server stores under `storage.stores` with lightweight references
(backend + namespace/table) instead of full configs.
- Update every provider/config/doc to use the new reference style;
docs/codegen now surface the simplified YAML.
## Migration
Before:
```yaml
metadata_store:
type: sqlite
db_path: ~/.llama/distributions/foo/registry.db
inference_store:
type: postgres
host: ${env.POSTGRES_HOST}
port: ${env.POSTGRES_PORT}
db: ${env.POSTGRES_DB}
user: ${env.POSTGRES_USER}
password: ${env.POSTGRES_PASSWORD}
conversations_store:
type: postgres
host: ${env.POSTGRES_HOST}
port: ${env.POSTGRES_PORT}
db: ${env.POSTGRES_DB}
user: ${env.POSTGRES_USER}
password: ${env.POSTGRES_PASSWORD}
```
After:
```yaml
storage:
backends:
kv_default:
type: kv_sqlite
db_path: ~/.llama/distributions/foo/kvstore.db
sql_default:
type: sql_postgres
host: ${env.POSTGRES_HOST}
port: ${env.POSTGRES_PORT}
db: ${env.POSTGRES_DB}
user: ${env.POSTGRES_USER}
password: ${env.POSTGRES_PASSWORD}
stores:
metadata:
backend: kv_default
namespace: registry
inference:
backend: sql_default
table_name: inference_store
max_write_queue_size: 10000
num_writers: 4
conversations:
backend: sql_default
table_name: openai_conversations
```
Provider configs follow the same pattern—for example, a Chroma vector
adapter switches from:
```yaml
providers:
vector_io:
- provider_id: chromadb
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL}
kvstore:
type: sqlite
db_path: ~/.llama/distributions/foo/chroma.db
```
to:
```yaml
providers:
vector_io:
- provider_id: chromadb
provider_type: remote::chromadb
config:
url: ${env.CHROMADB_URL}
persistence:
backend: kv_default
namespace: vector_io::chroma_remote
```
Once the backends are declared, everything else just points at them, so
rotating credentials or swapping to Postgres happens in one place and
the stack reuses a single connection pool.
110 lines
3.7 KiB
Text
110 lines
3.7 KiB
Text
---
|
|
description: |
|
|
[Qdrant](https://qdrant.tech/documentation/) is an inline and remote vector database provider for Llama Stack. It
|
|
allows you to store and query vectors directly in memory.
|
|
That means you'll get fast and efficient vector retrieval.
|
|
|
|
> By default, Qdrant stores vectors in RAM, delivering incredibly fast access for datasets that fit comfortably in
|
|
> memory. But when your dataset exceeds RAM capacity, Qdrant offers Memmap as an alternative.
|
|
>
|
|
> \[[An Introduction to Vector Databases](https://qdrant.tech/articles/what-is-a-vector-database/)\]
|
|
|
|
|
|
|
|
## Features
|
|
|
|
- Lightweight and easy to use
|
|
- Fully integrated with Llama Stack
|
|
- Apache 2.0 license terms
|
|
- Store embeddings and their metadata
|
|
- Supports search by
|
|
[Keyword](https://qdrant.tech/articles/qdrant-introduces-full-text-filters-and-indexes/)
|
|
and [Hybrid](https://qdrant.tech/articles/hybrid-search/#building-a-hybrid-search-system-in-qdrant) search
|
|
- [Multilingual and Multimodal retrieval](https://qdrant.tech/documentation/multimodal-search/)
|
|
- [Medatata filtering](https://qdrant.tech/articles/vector-search-filtering/)
|
|
- [GPU support](https://qdrant.tech/documentation/guides/running-with-gpu/)
|
|
|
|
## Usage
|
|
|
|
To use Qdrant in your Llama Stack project, follow these steps:
|
|
|
|
1. Install the necessary dependencies.
|
|
2. Configure your Llama Stack project to use Qdrant.
|
|
3. Start storing and querying vectors.
|
|
|
|
## Installation
|
|
|
|
You can install Qdrant using docker:
|
|
|
|
```bash
|
|
docker pull qdrant/qdrant
|
|
```
|
|
## Documentation
|
|
See the [Qdrant documentation](https://qdrant.tech/documentation/) for more details about Qdrant in general.
|
|
sidebar_label: Qdrant
|
|
title: inline::qdrant
|
|
---
|
|
|
|
# inline::qdrant
|
|
|
|
## Description
|
|
|
|
|
|
[Qdrant](https://qdrant.tech/documentation/) is an inline and remote vector database provider for Llama Stack. It
|
|
allows you to store and query vectors directly in memory.
|
|
That means you'll get fast and efficient vector retrieval.
|
|
|
|
> By default, Qdrant stores vectors in RAM, delivering incredibly fast access for datasets that fit comfortably in
|
|
> memory. But when your dataset exceeds RAM capacity, Qdrant offers Memmap as an alternative.
|
|
>
|
|
> \[[An Introduction to Vector Databases](https://qdrant.tech/articles/what-is-a-vector-database/)\]
|
|
|
|
|
|
|
|
## Features
|
|
|
|
- Lightweight and easy to use
|
|
- Fully integrated with Llama Stack
|
|
- Apache 2.0 license terms
|
|
- Store embeddings and their metadata
|
|
- Supports search by
|
|
[Keyword](https://qdrant.tech/articles/qdrant-introduces-full-text-filters-and-indexes/)
|
|
and [Hybrid](https://qdrant.tech/articles/hybrid-search/#building-a-hybrid-search-system-in-qdrant) search
|
|
- [Multilingual and Multimodal retrieval](https://qdrant.tech/documentation/multimodal-search/)
|
|
- [Medatata filtering](https://qdrant.tech/articles/vector-search-filtering/)
|
|
- [GPU support](https://qdrant.tech/documentation/guides/running-with-gpu/)
|
|
|
|
## Usage
|
|
|
|
To use Qdrant in your Llama Stack project, follow these steps:
|
|
|
|
1. Install the necessary dependencies.
|
|
2. Configure your Llama Stack project to use Qdrant.
|
|
3. Start storing and querying vectors.
|
|
|
|
## Installation
|
|
|
|
You can install Qdrant using docker:
|
|
|
|
```bash
|
|
docker pull qdrant/qdrant
|
|
```
|
|
## Documentation
|
|
See the [Qdrant documentation](https://qdrant.tech/documentation/) for more details about Qdrant in general.
|
|
|
|
|
|
## Configuration
|
|
|
|
| Field | Type | Required | Default | Description |
|
|
|-------|------|----------|---------|-------------|
|
|
| `path` | `<class 'str'>` | No | | |
|
|
| `persistence` | `<class 'llama_stack.core.storage.datatypes.KVStoreReference'>` | No | | |
|
|
|
|
## Sample Configuration
|
|
|
|
```yaml
|
|
path: ${env.QDRANT_PATH:=~/.llama/~/.llama/dummy}/qdrant.db
|
|
persistence:
|
|
namespace: vector_io::qdrant
|
|
backend: kv_default
|
|
```
|