From 5a339d44f73eed13908db8046e03b9079d51f24c Mon Sep 17 00:00:00 2001 From: Vladimir Blagojevic Date: Wed, 6 Mar 2024 10:25:22 +0100 Subject: [PATCH] docs: Final API docs touches (#538) * Final API docs touches * small fixes * remove error from API ref: MongoDBAtlasDocumentStoreError is never used --------- Co-authored-by: Stefano Fiorucci --- integrations/mongodb_atlas/pydoc/config.yml | 1 + .../document_stores/mongodb_atlas/document_store.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/integrations/mongodb_atlas/pydoc/config.yml b/integrations/mongodb_atlas/pydoc/config.yml index 782d662fa..e59993881 100644 --- a/integrations/mongodb_atlas/pydoc/config.yml +++ b/integrations/mongodb_atlas/pydoc/config.yml @@ -4,6 +4,7 @@ loaders: modules: [ "haystack_integrations.document_stores.mongodb_atlas.document_store", "haystack_integrations.document_stores.mongodb_atlas.filters", + "haystack_integrations.components.retrievers.mongodb_atlas.embedding_retriever", ] ignore_when_discovered: ["__init__"] processors: diff --git a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py index 0d7116b3a..27cb853db 100644 --- a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py +++ b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py @@ -20,11 +20,11 @@ class MongoDBAtlasDocumentStore: """ - MongoDBAtlasDocumentStore is a DocumentStore implementation that uses [MongoDB Atlas](https://www.mongodb.com/atlas/database). - service that is easy to deploy, operate, and scale. + MongoDBAtlasDocumentStore is a DocumentStore implementation that uses + [MongoDB Atlas](https://www.mongodb.com/atlas/database) service that is easy to deploy, operate, and scale. To connect to MongoDB Atlas, you need to provide a connection string in the format: - "mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}". + `"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}"`. This connection string can be obtained on the MongoDB Atlas Dashboard by clicking on the `CONNECT` button, selecting Python as the driver, and copying the connection string. The connection string can be provided as an environment @@ -39,7 +39,7 @@ class MongoDBAtlasDocumentStore: can support a chosen metric (i.e. cosine, dot product, or euclidean) and can be created in the Atlas web UI. For more details on MongoDB Atlas, see the official - MongoDB Atlas [documentation](https://www.mongodb.com/docs/atlas/getting-started/) + MongoDB Atlas [documentation](https://www.mongodb.com/docs/atlas/getting-started/). Usage example: ```python @@ -64,7 +64,7 @@ def __init__( Creates a new MongoDBAtlasDocumentStore instance. :param mongo_connection_string: MongoDB Atlas connection string in the format: - "mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}". + `"mongodb+srv://{mongo_atlas_username}:{mongo_atlas_password}@{mongo_atlas_host}/?{mongo_atlas_params_string}"`. This can be obtained on the MongoDB Atlas Dashboard by clicking on the `CONNECT` button. This value will be read automatically from the env var "MONGO_CONNECTION_STRING". :param database_name: Name of the database to use. @@ -73,7 +73,7 @@ def __init__( :param vector_search_index: The name of the vector search index to use for vector search operations. Create a vector_search_index in the Atlas web UI and specify the init params of MongoDBAtlasDocumentStore. \ For more details refer to MongoDB - Atlas [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#std-label-avs-create-index) + Atlas [documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#std-label-avs-create-index). :raises ValueError: If the collection name contains invalid characters. """