Elffuss BraidHub

kikocis/llama-stack public

7d178b9d269a · 1.4 KiBRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7from typing import List
8
9from llama_toolchain.core.datatypes import * # noqa: F403
10
11EMBEDDING_DEPS = [
12 "blobfile",
13 "sentence-transformers",
14]
15
16
17def available_memory_providers() -> List[ProviderSpec]:
18 return [
19 InlineProviderSpec(
20 api=Api.memory,
21 provider_type="meta-reference-faiss",
22 pip_packages=EMBEDDING_DEPS + ["faiss-cpu"],
23 module="llama_toolchain.memory.meta_reference.faiss",
24 config_class="llama_toolchain.memory.meta_reference.faiss.FaissImplConfig",
25 ),
26 remote_provider_spec(
27 api=Api.memory,
28 adapter=AdapterSpec(
29 adapter_id="chromadb",
30 pip_packages=EMBEDDING_DEPS + ["chromadb-client"],
31 module="llama_toolchain.memory.adapters.chroma",
32 ),
33 ),
34 remote_provider_spec(
35 api=Api.memory,
36 adapter=AdapterSpec(
37 adapter_id="pgvector",
38 pip_packages=EMBEDDING_DEPS + ["psycopg2-binary"],
39 module="llama_toolchain.memory.adapters.pgvector",
40 config_class="llama_toolchain.memory.adapters.pgvector.PGVectorConfig",
41 ),
42 ),
43 ]