Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Auto-update documentation after merge [skip ci]

camel-docs-botef26dc0023bd
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.base.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.base.mdx
index 8d946e52e..27b44e0e0 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.base.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.base.mdx
@@ -15,7 +15,7 @@ to vector storage.
**Parameters:**
- **vector** (List[float]): The numerical representation of the vector.
-- **id** (str, optional): A unique identifier for the vector. If not provided, an random uuid will be assigned.
+- **id** (str, optional): A unique identifier for the vector. If not provided, a random uuid will be assigned.
- **payload** (Optional[Dict[str, Any]], optional): Any additional metadata or information related to the vector. (default: :obj:`None`)
<a id="camel.storages.vectordb_storages.base.VectorDBQuery"></a>
@@ -46,7 +46,7 @@ def __init__(
):
```
-Pass in query_vector and tok_k as positional arg.
+Pass in query_vector and top_k as positional arg.
**Parameters:**
@@ -84,6 +84,17 @@ def create(
A class method to construct a `VectorDBQueryResult` instance.
+**Parameters:**
+
+- **similarity** (float): The similarity score.
+- **vector** (List[float]): The numerical representation of the vector.
+- **id** (str): A unique identifier for the vector.
+- **payload** (Optional[Dict[str, Any]], optional): Any additional metadata or information related to the vector. (default: :obj:`None`)
+
+**Returns:**
+
+ VectorDBQueryResult: The constructed query result instance.
+
<a id="camel.storages.vectordb_storages.base.VectorDBStatus"></a>
## VectorDBStatus
@@ -219,5 +230,5 @@ This function is a wrapper of `BaseVectorStorage.query`.
**Returns:**
- List[List[Dict[str, Any]]]: A list of vector payloads retrieved
+ List[Dict[str, Any]]: A list of vector payloads retrieved
from the storage based on similarity to the query vector.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.chroma.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.chroma.mdx
index ea8df9c47..03ab41f8e 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.chroma.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.chroma.mdx
@@ -112,7 +112,9 @@ def _validate_client_config(self):
def _get_connection_client(self):
```
-Get ChromaDB client based on client type and user settings.
+**Returns:**
+
+ ClientAPI: The ChromaDB client instance.
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._create_ephemeral_client"></a>
@@ -124,6 +126,14 @@ def _create_ephemeral_client(self, chromadb_module: Any):
Create an ephemeral ChromaDB client (in-memory).
+**Parameters:**
+
+- **chromadb_module** (Any): The imported chromadb module.
+
+**Returns:**
+
+ ClientAPI: The ephemeral ChromaDB client instance.
+
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._create_persistent_client"></a>
### _create_persistent_client
@@ -134,6 +144,14 @@ def _create_persistent_client(self, chromadb_module: Any):
Create a persistent ChromaDB client (local file storage).
+**Parameters:**
+
+- **chromadb_module** (Any): The imported chromadb module.
+
+**Returns:**
+
+ ClientAPI: The persistent ChromaDB client instance.
+
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._create_http_client"></a>
### _create_http_client
@@ -144,6 +162,14 @@ def _create_http_client(self, chromadb_module: Any):
Create an HTTP ChromaDB client (remote server).
+**Parameters:**
+
+- **chromadb_module** (Any): The imported chromadb module.
+
+**Returns:**
+
+ ClientAPI: The HTTP ChromaDB client instance.
+
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._create_cloud_client"></a>
### _create_cloud_client
@@ -154,6 +180,14 @@ def _create_cloud_client(self, chromadb_module: Any):
Create a cloud ChromaDB client.
+**Parameters:**
+
+- **chromadb_module** (Any): The imported chromadb module.
+
+**Returns:**
+
+ ClientAPI: The cloud ChromaDB client instance.
+
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._get_common_client_kwargs"></a>
### _get_common_client_kwargs
@@ -162,7 +196,10 @@ Create a cloud ChromaDB client.
def _get_common_client_kwargs(self):
```
-Get common kwargs for all ChromaDB clients.
+**Returns:**
+
+ Dict[str, Any]: Common keyword arguments for client
+initialization.
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage._generate_collection_name"></a>
@@ -201,7 +238,7 @@ def _get_or_create_collection(self):
**Returns:**
- ChromaDB collection object.
+ Collection: The ChromaDB collection object.
<a id="camel.storages.vectordb_storages.chroma.ChromaStorage.add"></a>
@@ -333,4 +370,4 @@ def collection(self):
**Returns:**
- ChromaDB collection instance.
+ Collection: The ChromaDB collection instance.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.faiss.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.faiss.mdx
index d25f16d59..1c66e7ed0 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.faiss.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.faiss.mdx
@@ -54,16 +54,6 @@ def __init__(
Initialize the FAISS vector storage.
-**Parameters:**
-
-- **vector_dim**: Dimension of vectors to be stored
-- **index_type**: FAISS index type ('Flat', 'IVF', 'HNSW', etc.)
-- **collection_name**: Name of the collection (defaults to timestamp) (default: timestamp)
-- **storage_path**: Directory to save the index (None for in-memory only)
-- **distance**: Vector distance metric
-- **nlist**: Number of clusters for IVF indexes
-- **m**: HNSW parameter for connections per node **kwargs: Additional parameters
-
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._generate_collection_name"></a>
### _generate_collection_name
@@ -72,7 +62,9 @@ Initialize the FAISS vector storage.
def _generate_collection_name(self):
```
-Generates a collection name if user doesn't provide
+**Returns:**
+
+ str: Generated collection name.
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._get_index_path"></a>
@@ -82,7 +74,9 @@ Generates a collection name if user doesn't provide
def _get_index_path(self):
```
-Returns the path to the index file
+**Returns:**
+
+ str: The path to the index file.
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._get_metadata_path"></a>
@@ -92,7 +86,9 @@ Returns the path to the index file
def _get_metadata_path(self):
```
-Returns the path to the metadata file
+**Returns:**
+
+ str: The path to the metadata file.
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._create_index"></a>
@@ -104,7 +100,7 @@ def _create_index(self):
**Returns:**
- A FAISS index object configured according to the parameters.
+ Any: A FAISS index object configured according to the parameters.
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._save_to_disk"></a>
@@ -126,6 +122,9 @@ def _load_from_disk(self):
Loads the index and metadata from disk if they exist.
+If loading fails, including when metadata is missing required keys,
+logs the error and attempts to create a new index.
+
<a id="camel.storages.vectordb_storages.faiss.FaissStorage.add"></a>
### add
@@ -265,7 +264,9 @@ Load the index from disk if storage_path is provided.
def client(self):
```
-Provides access to the underlying FAISS client.
+**Returns:**
+
+ Any: The FAISS client module or instance.
<a id="camel.storages.vectordb_storages.faiss.FaissStorage._matches_filter"></a>
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.milvus.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.milvus.mdx
index 79f866a51..e07695ccd 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.milvus.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.milvus.mdx
@@ -18,7 +18,7 @@ The detailed information about Milvus is available at:
- **vector_dim** (int): The dimension of storing vectors.
- **url_and_api_key** (Tuple[str, str]): Tuple containing the URL and API key for connecting to a remote Milvus instance. URL maps to Milvus uri concept, typically "endpoint:port". API key maps to Milvus token concept, for self-hosted it's "username:pwd", for Zilliz Cloud (fully-managed Milvus) it's API Key.
-- **collection_name** (Optional[str], optional): Name for the collection in the Milvus. If not provided, set it to the current time with iso format. (default: :obj:`None`) **kwargs (Any): Additional keyword arguments for initializing `MilvusClient`.
+- **collection_name** (Optional[str], optional): Name for the collection in the Milvus. If not provided, set it to the current time with iso format. (default: :obj:`None`) **kwargs (Any): Additional keyword arguments for initializing :obj:`MilvusClient`.
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage.__init__"></a>
@@ -46,7 +46,7 @@ Initializes the Milvus client with the provided connection details.
**Parameters:**
-- **url_and_api_key** (Tuple[str, str]): The URL and API key for the Milvus server. **kwargs: Additional keyword arguments passed to the Milvus client.
+- **url_and_api_key** (Tuple[str, str]): The URL and API key for the Milvus server. **kwargs (Any): Additional keyword arguments passed to the Milvus client.
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage._check_and_create_collection"></a>
@@ -56,9 +56,6 @@ Initializes the Milvus client with the provided connection details.
def _check_and_create_collection(self):
```
-Checks if the specified collection exists in Milvus and creates it
-if it doesn't, ensuring it matches the specified vector dimensionality.
-
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage._create_collection"></a>
### _create_collection
@@ -71,7 +68,7 @@ Creates a new collection in the database.
**Parameters:**
-- **collection_name** (str): Name of the collection to be created. **kwargs (Any): Additional keyword arguments pass to create collection.
+- **collection_name** (str): Name of the collection to be created. **kwargs (Any): Additional keyword arguments passed to create collection.
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage._delete_collection"></a>
@@ -85,7 +82,7 @@ Deletes an existing collection from the database.
**Parameters:**
-- **collection** (str): Name of the collection to be deleted.
+- **collection_name** (str): Name of the collection to be deleted.
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage._collection_exists"></a>
@@ -168,7 +165,7 @@ Adds a list of vectors to the specified collection.
**Parameters:**
-- **records** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments pass to insert.
+- **records** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments passed to insert.
<a id="camel.storages.vectordb_storages.milvus.MilvusStorage.delete"></a>
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.oceanbase.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.oceanbase.mdx
index 6e15708ca..becf0fa52 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.oceanbase.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.oceanbase.mdx
@@ -19,7 +19,7 @@ OceanBase Vector Database.
- **user** (str): Username for connecting to OceanBase. (default: :obj:`"root@test"`)
- **password** (str): Password for the user. (default: :obj:`""`) (default: `""`)
- **db_name** (str): Database name in OceanBase. (default: :obj:`"test"`) distance (Literal["l2", "cosine", "inner_product", "negative_inner_product"], optional): The distance metric for vector comparison. Options: "l2", "cosine", "inner_product", "negative_inner_product". (default: :obj:`"l2"`)
-- **delete_table_on_del** (bool, optional): Flag to determine if the table should be deleted upon object destruction. (default: :obj:`False`) **kwargs (Any): Additional keyword arguments for initializing `ObVecClient`.
+- **delete_table_on_del** (bool, optional): Flag to determine if the table should be deleted upon object destruction. (default: :obj:`False`) **kwargs (Any): Additional keyword arguments for initializing :obj:`ObVecClient`.
<a id="camel.storages.vectordb_storages.oceanbase.OceanBaseStorage.__init__"></a>
@@ -178,8 +178,6 @@ to map the full range to [0, 1].
def clear(self):
```
-Remove all vectors from the storage.
-
<a id="camel.storages.vectordb_storages.oceanbase.OceanBaseStorage.load"></a>
### load
@@ -198,4 +196,6 @@ Load the collection hosted on cloud service.
def client(self):
```
-Provides access to underlying OceanBase vector database client.
+**Returns:**
+
+ ObVecClient: The underlying OceanBase client instance.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.pgvector.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.pgvector.mdx
index de6d48ea8..4c426dfb4 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.pgvector.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.pgvector.mdx
@@ -18,7 +18,7 @@ It supports different distance metrics for similarity search.
**Parameters:**
- **vector_dim** (int): The dimension of the vectors to be stored.
-- **conn_info** (Dict[str, Any]): Connection information for psycopg2.connect.
+- **conn_info** (Dict[str, Any]): Connection information for :obj:`psycopg2.connect`.
- **table_name** (str, optional): Name of the table to store vectors. (default: :obj:`None`)
- **distance** (VectorDistance, optional): Distance metric for vector comparison. (default: :obj:`VectorDistance.COSINE`)
@@ -39,13 +39,6 @@ def __init__(
Initialize PgVectorStorage.
-**Parameters:**
-
-- **vector_dim** (int): The dimension of the vectors.
-- **conn_info** (Dict[str, Any]): Connection info for psycopg2.connect.
-- **table_name** (str, optional): Table name. (default: :obj:`None`)
-- **distance** (VectorDistance, optional): Distance metric. (default: :obj:`VectorDistance.COSINE`)
-
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage._ensure_table"></a>
### _ensure_table
@@ -54,9 +47,6 @@ Initialize PgVectorStorage.
def _ensure_table(self):
```
-Ensure the vector table exists in the database.
-Creates the table if it does not exist.
-
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage._ensure_index"></a>
### _ensure_index
@@ -80,7 +70,7 @@ Add or update vector records in the database.
**Parameters:**
-- **records** (List[VectorRecord]): List of vector records to add or update.
+- **records** (List[VectorRecord]): List of vector records to add or update. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage.delete"></a>
@@ -94,7 +84,7 @@ Delete vector records from the database by their IDs.
**Parameters:**
-- **ids** (List[str]): List of record IDs to delete.
+- **ids** (List[str]): List of record IDs to delete. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage.query"></a>
@@ -126,6 +116,14 @@ def _score_to_similarity(self, score: float):
Convert a pgvector operator result to high-is-better similarity.
+**Parameters:**
+
+- **score** (float): The distance or score returned by pgvector.
+
+**Returns:**
+
+ float: The similarity score.
+
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage.status"></a>
### status
@@ -149,8 +147,6 @@ dimension and count.
def clear(self):
```
-Remove all vectors from the storage by truncating the table.
-
<a id="camel.storages.vectordb_storages.pgvector.PgVectorStorage.load"></a>
### load
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.qdrant.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.qdrant.mdx
index 986f8f2ff..78e792340 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.qdrant.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.qdrant.mdx
@@ -58,8 +58,8 @@ def __init__(
def __del__(self):
```
-Deletes the collection if :obj:`del_collection` is set to
-:obj:`True`.
+Deletes the collection if :obj:`delete_collection_on_del` is set
+to :obj:`True`.
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage._create_client"></a>
@@ -116,7 +116,7 @@ Deletes an existing collection from the database.
**Parameters:**
-- **collection** (str): Name of the collection to be deleted. **kwargs (Any): Additional keyword arguments.
+- **collection_name** (str): Name of the collection to be deleted. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage._collection_exists"></a>
@@ -126,7 +126,15 @@ Deletes an existing collection from the database.
def _collection_exists(self, collection_name: str):
```
-Returns whether the collection exists in the database
+Returns whether the collection exists in the database.
+
+**Parameters:**
+
+- **collection_name** (str): The name of the collection to check.
+
+**Returns:**
+
+ bool: True if the collection exists, False otherwise.
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage._generate_collection_name"></a>
@@ -136,7 +144,9 @@ Returns whether the collection exists in the database
def _generate_collection_name(self):
```
-Generates a collection name if user doesn't provide
+**Returns:**
+
+ str: Generated collection name.
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage._get_collection_info"></a>
@@ -162,7 +172,7 @@ collection.
### close_client
```python
-def close_client(self, **kwargs):
+def close_client(self, **kwargs: Any):
```
Closes the client connection to the Qdrant storage.
@@ -179,7 +189,7 @@ Adds a list of vectors to the specified collection.
**Parameters:**
-- **vectors** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments.
+- **records** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage.update_payload"></a>
@@ -247,6 +257,10 @@ matching the `payload_filter` will be deleted.
def status(self):
```
+**Returns:**
+
+ VectorDBStatus: The vector database status.
+
<a id="camel.storages.vectordb_storages.qdrant.QdrantStorage.query"></a>
### query
@@ -301,4 +315,6 @@ Load the collection hosted on cloud service.
def client(self):
```
-Provides access to the underlying vector database client.
+**Returns:**
+
+ QdrantClient: The underlying Qdrant client instance.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.surreal.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.surreal.mdx
index 15fd2fe14..7ad602883 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.surreal.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.surreal.mdx
@@ -17,14 +17,14 @@ SurrealDB official site and documentation can be found at:
**Parameters:**
-- **url** (str): WebSocket URL for connecting to SurrealDB (default: "ws://localhost:8000/rpc").
-- **table** (str): Name of the table used for storing vectors (default: "vector_store").
+- **url** (str): WebSocket URL for connecting to SurrealDB. (default: :obj:`"ws://localhost:8000/rpc"`)
+- **table** (str): Name of the table used for storing vectors. (default: :obj:`"vector_store"`)
- **vector_dim** (int): Dimensionality of the stored vectors.
-- **distance** (VectorDistance): Distance metric used for similarity comparisons (default: VectorDistance.COSINE).
-- **namespace** (str): SurrealDB namespace to use (default: "default"). (default: `"default"`)
-- **database** (str): SurrealDB database name (default: "demo"). (default: `"demo"`)
-- **user** (str): Username for authentication (default: "root"). (default: `"root"`)
-- **password** (str): Password for authentication (default: "root"). (default: `"root"`)
+- **distance** (VectorDistance): Distance metric used for similarity comparisons. (default: :obj:`VectorDistance.COSINE`)
+- **namespace** (str): SurrealDB namespace to use. (default: :obj:`"default"`)
+- **database** (str): SurrealDB database name. (default: :obj:`"demo"`) (default: `"demo"`)
+- **user** (str): Username for authentication. (default: :obj:`"root"`) (default: `"root"`)
+- **password** (str): Password for authentication. (default: :obj:`"root"`) (default: `"root"`)
**Note:**
@@ -43,19 +43,7 @@ search with real-time updates.
def __init__(self):
```
-Initialize SurrealStorage with connection settings and ensure
-the target table exists.
-
-**Parameters:**
-
-- **url** (str): WebSocket URL for connecting to SurrealDB. (default: :obj:`"ws://localhost:8000/rpc"`)
-- **table** (str): Name of the table used for vector storage. (default: :obj:`"vector_store"`)
-- **vector_dim** (int): Dimensionality of the stored vectors. (default: :obj:`786`)
-- **distance** (VectorDistance): Distance metric for similarity searches. (default: :obj:`VectorDistance.COSINE`)
-- **namespace** (str): SurrealDB namespace to use. (default: :obj:`"default"`)
-- **database** (str): SurrealDB database name. (default: :obj:`"demo"`)
-- **user** (str): Username for authentication. (default: :obj:`"root"`)
-- **password** (str): Password for authentication. (default: :obj:`"root"`)
+Initialize SurrealStorage with connection settings.
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage._table_exists"></a>
@@ -89,11 +77,6 @@ def _get_table_info(self):
def _create_table(self):
```
-Define and create the vector storage table with HNSW index.
-
-Documentation: https://surrealdb.com/docs/surrealdb/reference-guide/
-vector-search#vector-search-cheat-sheet
-
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage._drop_table"></a>
### _drop_table
@@ -112,9 +95,6 @@ Drop the vector storage table if it exists.
def _check_and_create_table(self):
```
-Check if the table exists and matches the expected vector
-dimension. If not, create a new table.
-
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage._validate_and_convert_records"></a>
### _validate_and_convert_records
@@ -147,7 +127,7 @@ metric.
**Parameters:**
-- **query** (VectorDBQuery): Query containing the query vector and top_k value.
+- **query** (VectorDBQuery): Query containing the query vector and top_k value. **kwargs (Any): Additional keyword arguments.
**Returns:**
@@ -164,6 +144,14 @@ def _distance_to_similarity(self, distance: float):
Convert a SurrealDB distance value to high-is-better similarity.
+**Parameters:**
+
+- **distance** (float): The distance value returned by SurrealDB.
+
+**Returns:**
+
+ float: The similarity score.
+
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage.add"></a>
### add
@@ -176,7 +164,7 @@ Insert validated vector records into the SurrealDB table.
**Parameters:**
-- **records** (List[VectorRecord]): List of vector records to add.
+- **records** (List[VectorRecord]): List of vector records to add. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage.delete"></a>
@@ -196,7 +184,7 @@ Delete specific records by ID or clear the entire table.
**Parameters:**
- **ids** (Optional[List[str]]): List of record IDs to delete.
-- **if_all** (bool): Whether to delete all records in the table.
+- **if_all** (bool): Whether to delete all records in the table. **kwargs (Any): Additional keyword arguments.
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage.status"></a>
@@ -228,8 +216,6 @@ Reset the vector table by dropping and recreating it.
def load(self):
```
-Load the collection hosted on cloud service.
-
<a id="camel.storages.vectordb_storages.surreal.SurrealStorage.client"></a>
### client
@@ -238,4 +224,6 @@ Load the collection hosted on cloud service.
def client(self):
```
-Provides access to the underlying SurrealDB client.
+**Returns:**
+
+ Any: The underlying SurrealDB client instance.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.tidb.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.tidb.mdx
index 1f420c275..14aa6005b 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.tidb.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.tidb.mdx
@@ -32,8 +32,8 @@ The detailed information about TiDB is available at:
**Parameters:**
- **vector_dim** (int): The dimension of storing vectors.
-- **url_and_api_key** (Optional[Union[Tuple[str, str], str]]): A tuple containing the database url and API key for connecting to a TiDB cluster. The URL should be in the format: "mysql+pymysql://`<username>`:`<password>`@`<host>`:`<port>`/`<db_name>`". TiDB will not use the API Key, but retains the definition for interface compatible.
-- **collection_name** (Optional[str]): Name of the collection. The collection name will be used as the table name in TiDB. If not provided, set it to the current time with iso format. **kwargs (Any): Additional keyword arguments for initializing TiDB connection.
+- **url_and_api_key** (Optional[Union[Tuple[str, str], str]]): A tuple containing the database url and API key for connecting to a TiDB cluster. The URL should be in the format: :obj:`"mysql+pymysql://<username>:<password>@<host>:<port>/<db_name>"` . TiDB will not use the API Key, but retains the definition for interface compatible.
+- **collection_name** (Optional[str], optional): Name of the collection. The collection name will be used as the table name in TiDB. If not provided, set it to the current time with iso format. (default: :obj:`None`) **kwargs (Any): Additional keyword arguments for initializing TiDB connection.
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage.__init__"></a>
@@ -61,7 +61,7 @@ Initializes the TiDB client with the provided connection details.
**Parameters:**
-- **database_url** (Optional[str]): The database connection string for the TiDB server. **kwargs: Additional keyword arguments passed to the TiDB client.
+- **database_url** (Optional[str]): The database connection string for the TiDB server. **kwargs (Any): Additional keyword arguments passed to the TiDB client.
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage._get_table_model"></a>
@@ -71,6 +71,16 @@ Initializes the TiDB client with the provided connection details.
def _get_table_model(self, collection_name: str):
```
+Generates a dynamic SQLAlchemy table model for TiDB vector storage.
+
+**Parameters:**
+
+- **collection_name** (str): Name of the collection table.
+
+**Returns:**
+
+ Any: The generated table model class.
+
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage._open_and_create_table"></a>
### _open_and_create_table
@@ -79,7 +89,9 @@ def _get_table_model(self, collection_name: str):
def _open_and_create_table(self):
```
-Opens an existing table or creates a new table in TiDB.
+**Returns:**
+
+ Table[Any]: The opened or created table instance.
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage._check_table"></a>
@@ -89,9 +101,6 @@ Opens an existing table or creates a new table in TiDB.
def _check_table(self):
```
-Ensuring the specified table matches the specified vector
-dimensionality.
-
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage._generate_table_name"></a>
### _generate_table_name
@@ -134,7 +143,7 @@ instances.
**Returns:**
- List[VectorDBRecord]: A list of VectorDBRecord instances.
+ List[Any]: A list of converted database record instances.
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage.add"></a>
@@ -148,7 +157,7 @@ Adds a list of vectors to the specified table.
**Parameters:**
-- **records** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments pass to insert.
+- **records** (List[VectorRecord]): List of vectors to be added. **kwargs (Any): Additional keyword arguments passed to insert.
<a id="camel.storages.vectordb_storages.tidb.TiDBStorage.delete"></a>
@@ -230,4 +239,4 @@ def client(self):
**Returns:**
- Any: The TiDB client instance.
+ TiDBClient: The TiDB client instance.
diff --git a/docs/mintlify/reference/camel.storages.vectordb_storages.weaviate.mdx b/docs/mintlify/reference/camel.storages.vectordb_storages.weaviate.mdx
index ace0de10e..636c8f871 100644
--- a/docs/mintlify/reference/camel.storages.vectordb_storages.weaviate.mdx
+++ b/docs/mintlify/reference/camel.storages.vectordb_storages.weaviate.mdx
@@ -101,7 +101,9 @@ def __init__(
def _get_connection_client(self):
```
-Get Weaviate client based on connection type and user settings.
+**Returns:**
+
+ WeaviateClient: The created Weaviate client instance.
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._create_cloud_client"></a>
@@ -113,6 +115,14 @@ def _create_cloud_client(self, weaviate_module: Any):
Create a Weaviate Cloud client.
+**Parameters:**
+
+- **weaviate_module** (Any): The imported weaviate package module.
+
+**Returns:**
+
+ WeaviateClient: Connected Weaviate Cloud client.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._create_local_client"></a>
### _create_local_client
@@ -123,6 +133,14 @@ def _create_local_client(self, weaviate_module: Any):
Create a local Weaviate client.
+**Parameters:**
+
+- **weaviate_module** (Any): The imported weaviate package module.
+
+**Returns:**
+
+ WeaviateClient: Connected local Weaviate client.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._create_embedded_client"></a>
### _create_embedded_client
@@ -133,6 +151,14 @@ def _create_embedded_client(self, weaviate_module: Any):
Create an embedded Weaviate client.
+**Parameters:**
+
+- **weaviate_module** (Any): The imported weaviate package module.
+
+**Returns:**
+
+ WeaviateClient: Connected embedded Weaviate client.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._create_custom_client"></a>
### _create_custom_client
@@ -143,6 +169,14 @@ def _create_custom_client(self, weaviate_module: Any):
Create a custom Weaviate client.
+**Parameters:**
+
+- **weaviate_module** (Any): The imported weaviate package module.
+
+**Returns:**
+
+ WeaviateClient: Connected custom Weaviate client.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage.__del__"></a>
### __del__
@@ -171,7 +205,9 @@ Explicitly close the client connection.
def _generate_collection_name(self):
```
-Generate a collection name if user doesn't provide one.
+**Returns:**
+
+ str: Generated collection name.
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._check_and_create_collection"></a>
@@ -193,6 +229,14 @@ def _collection_exists(self, collection_name: str):
Check if the collection exists.
+**Parameters:**
+
+- **collection_name** (str): Name of the collection to check.
+
+**Returns:**
+
+ bool: True if collection exists, False otherwise.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._get_vector_index_config"></a>
### _get_vector_index_config
@@ -203,6 +247,10 @@ def _get_vector_index_config(self, **kwargs: Any):
Get vector index configuration based on user settings.
+**Returns:**
+
+ Any: The configured vector index configuration object.
+
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage._create_collection"></a>
### _create_collection
@@ -299,8 +347,6 @@ storage based on similarity to the query vector.
def clear(self):
```
-Remove all vectors from the storage.
-
<a id="camel.storages.vectordb_storages.weaviate.WeaviateStorage.load"></a>
### load
@@ -319,4 +365,6 @@ Load the collection hosted on cloud service.
def client(self):
```
-Provides access to the underlying vector database client.
+**Returns:**
+
+ WeaviateClient: The underlying Weaviate client instance.