repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from typing import Optional |
| #2 | |
| #3 | from embedchain.config.vector_db.base import BaseVectorDbConfig |
| #4 | from embedchain.helpers.json_serializable import register_deserializable |
| #5 | |
| #6 | |
| #7 | @register_deserializable |
| #8 | class QdrantDBConfig(BaseVectorDbConfig): |
| #9 | """ |
| #10 | Config to initialize a qdrant client. |
| #11 | :param: url. qdrant url or list of nodes url to be used for connection |
| #12 | """ |
| #13 | |
| #14 | def __init__( |
| #15 | self, |
| #16 | collection_name: Optional[str] = None, |
| #17 | dir: Optional[str] = None, |
| #18 | hnsw_config: Optional[dict[str, any]] = None, |
| #19 | quantization_config: Optional[dict[str, any]] = None, |
| #20 | on_disk: Optional[bool] = None, |
| #21 | batch_size: Optional[int] = 10, |
| #22 | **extra_params: dict[str, any], |
| #23 | ): |
| #24 | """ |
| #25 | Initializes a configuration class instance for a qdrant client. |
| #26 | |
| #27 | :param collection_name: Default name for the collection, defaults to None |
| #28 | :type collection_name: Optional[str], optional |
| #29 | :param dir: Path to the database directory, where the database is stored, defaults to None |
| #30 | :type dir: Optional[str], optional |
| #31 | :param hnsw_config: Params for HNSW index |
| #32 | :type hnsw_config: Optional[dict[str, any]], defaults to None |
| #33 | :param quantization_config: Params for quantization, if None - quantization will be disabled |
| #34 | :type quantization_config: Optional[dict[str, any]], defaults to None |
| #35 | :param on_disk: If true - point`s payload will not be stored in memory. |
| #36 | It will be read from the disk every time it is requested. |
| #37 | This setting saves RAM by (slightly) increasing the response time. |
| #38 | Note: those payload values that are involved in filtering and are indexed - remain in RAM. |
| #39 | :type on_disk: bool, optional, defaults to None |
| #40 | :param batch_size: Number of items to insert in one batch, defaults to 10 |
| #41 | :type batch_size: Optional[int], optional |
| #42 | """ |
| #43 | self.hnsw_config = hnsw_config |
| #44 | self.quantization_config = quantization_config |
| #45 | self.on_disk = on_disk |
| #46 | self.batch_size = batch_size |
| #47 | self.extra_params = extra_params |
| #48 | super().__init__(collection_name=collection_name, dir=dir) |
| #49 |