llama-stack-mirror/docs/source/providers/vector_io/inline_faiss.md
ehhuang 3c43a2f529
fix: store configs (#2593)
# What does this PR do?
https://github.com/meta-llama/llama-stack/pull/2490 broke postgres_demo,
as the config expected a str but the value was converted to int.

This PR:
1. Updates the type of port in sqlstore to be int
2. template generation uses `dict` instead of `StackRunConfig` so as to
avoid failing pydantic typechecks.
3. Adds `replace_env_vars` to StackRunConfig instantiation in
`configure.py` (not sure why this wasn't needed before).

## Test Plan
`llama stack build --template postgres_demo --image-type conda --run`
2025-07-03 10:07:23 -07:00

1.3 KiB

inline::faiss

Description

Faiss is an inline 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.

Features

  • Lightweight and easy to use
  • Fully integrated with Llama Stack
  • GPU support

Usage

To use Faiss in your Llama Stack project, follow these steps:

  1. Install the necessary dependencies.
  2. Configure your Llama Stack project to use Faiss.
  3. Start storing and querying vectors.

Installation

You can install Faiss using pip:

pip install faiss-cpu

Documentation

See Faiss' documentation or the Faiss Wiki for more details about Faiss in general.

Configuration

Field Type Required Default Description
kvstore utils.kvstore.config.RedisKVStoreConfig | utils.kvstore.config.SqliteKVStoreConfig | utils.kvstore.config.PostgresKVStoreConfig | utils.kvstore.config.MongoDBKVStoreConfig No sqlite

Sample Configuration

kvstore:
  type: sqlite
  db_path: ${env.SQLITE_STORE_DIR:=~/.llama/dummy}/faiss_store.db