Fix pgvector, store source of truth in Chroma

This commit is contained in:
Ashwin Bharambe 2024-10-10 10:12:14 -07:00
parent dd9d34cf7d
commit fe0dabe596
4 changed files with 86 additions and 40 deletions

View file

@ -140,6 +140,10 @@ class WeaviateMemoryAdapter(
self.cache[memory_bank.identifier] = index
async def list_memory_banks(self) -> List[MemoryBankDef]:
# TODO: right now the Llama Stack is the source of truth for these banks. That is
# not ideal. It should be Weaviate which is the source of truth. Unfortunately,
# list() happens at Stack startup when the Weaviate client (credentials) is not
# yet available. We need to figure out a way to make this work.
return [i.bank for i in self.cache.values()]
async def _get_and_cache_bank_index(self, bank_id: str) -> Optional[BankWithIndex]: