forked from phoenix-oss/llama-stack-mirror
The same code is used (inside providers/remote/memory/chroma/chroma.py) but it is driven by separate configurations and changes which Chroma client to use. Note that the dependencies are separate (`chromadb-client` vs `chromadb` -- the latter is a _much_ heavier package.) ``` pytest -s -v -m chroma memory/test_memory.py --env CHROMA_DB_PATH=/tmp/chroma_test pytest -s -v -m chroma memory/test_memory.py --env CHROMA_URL=http://localhost:6001 ```
23 lines
676 B
Python
23 lines
676 B
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
from .config import SampleConfig
|
|
|
|
|
|
from llama_stack.apis.memory import * # noqa: F403
|
|
|
|
|
|
class SampleMemoryImpl(Memory):
|
|
def __init__(self, config: SampleConfig):
|
|
self.config = config
|
|
|
|
async def register_memory_bank(self, memory_bank: MemoryBank) -> None:
|
|
# these are the memory banks the Llama Stack will use to route requests to this provider
|
|
# perform validation here if necessary
|
|
pass
|
|
|
|
async def initialize(self):
|
|
pass
|