mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 21:17:15 +00:00
Added support for mongoDB KV store
This commit is contained in:
parent
b1a63df8cd
commit
23df7db896
4 changed files with 129 additions and 7 deletions
|
|
@ -9,7 +9,7 @@ from .config import * # noqa: F403
|
|||
|
||||
|
||||
def kvstore_dependencies():
|
||||
return ["aiosqlite", "psycopg2-binary", "redis"]
|
||||
return ["aiosqlite", "psycopg2-binary", "redis", "pymongo"]
|
||||
|
||||
|
||||
class InmemoryKVStoreImpl(KVStore):
|
||||
|
|
@ -46,6 +46,10 @@ async def kvstore_impl(config: KVStoreConfig) -> KVStore:
|
|||
from .postgres import PostgresKVStoreImpl
|
||||
|
||||
impl = PostgresKVStoreImpl(config)
|
||||
elif config.type == KVStoreType.mongodb.value:
|
||||
from .mongodb import MongoDBKVStoreImpl
|
||||
|
||||
impl = MongoDBKVStoreImpl(config)
|
||||
else:
|
||||
raise ValueError(f"Unknown kvstore type {config.type}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue