ahvn.klstore.mdb_store module¶
- class ahvn.klstore.mdb_store.MongoKLStore(database=None, collection=None, name=None, condition=None, include=None, exclude=None, *args, **kwargs)[源代码]¶
基类:
BaseKLStoreMongoDB-backed KL store using the MongoUKFAdapter.
Provides efficient CRUD operations for BaseUKF objects in MongoDB. Uses MongoDB's native operations for optimal performance.
备注
This store handles only CRUD operations without vector embeddings. Vector search capabilities are provided by MongoKLEngine.
- 参数:
- __init__(database=None, collection=None, name=None, condition=None, include=None, exclude=None, *args, **kwargs)[源代码]¶
Initialize the MongoDB KL store.
- 参数:
name (
Optional[str]) -- Name of the KLStore instance. If None, defaults to collection name.condition (
Optional[Callable]) -- Optional upsert/insert condition to apply to the KLStore. KLs that do not satisfy the condition will be ignored. If None, all KLs are accepted.include (
Optional[list]) -- Optional list of fields to include in MongoDB documents.exclude (
Optional[list]) -- Optional list of fields to exclude from MongoDB documents.*args -- Additional positional arguments for BaseKLStore.
**kwargs -- Additional keyword arguments for mongo database configuration.