diff --git a/graphrag/config/defaults.py b/graphrag/config/defaults.py index 68339326ec..4ffbc1f1bd 100644 --- a/graphrag/config/defaults.py +++ b/graphrag/config/defaults.py @@ -93,16 +93,16 @@ UPDATE_STORAGE_BASE_DIR = "update_output" VECTOR_STORE = f""" - type: {VectorStoreType.LanceDB.value} + type: {VectorStoreType.LanceDB.value} # one of [lancedb, azure_ai_search, cosmosdb] db_uri: '{(Path(STORAGE_BASE_DIR) / "lancedb")!s}' - container_name: default + collection_name: default overwrite: true\ """ VECTOR_STORE_DICT = { "type": VectorStoreType.LanceDB.value, "db_uri": str(Path(STORAGE_BASE_DIR) / "lancedb"), - "container_name": "default", + "collection_name": "default", "overwrite": True, } diff --git a/graphrag/vector_stores/cosmosdb.py b/graphrag/vector_stores/cosmosdb.py index cabf8a7b6f..8fe4ba642f 100644 --- a/graphrag/vector_stores/cosmosdb.py +++ b/graphrag/vector_stores/cosmosdb.py @@ -31,12 +31,12 @@ def __init__(self, **kwargs: Any) -> None: def connect(self, **kwargs: Any) -> Any: """Connect to CosmosDB vector storage.""" - url = kwargs["url"] connection_string = kwargs.get("connection_string") if connection_string: self._cosmos_client = CosmosClient.from_connection_string(connection_string) else: - if url is None: + url = kwargs.get("url") + if not url: msg = "Either connection_string or url must be provided." raise ValueError(msg) self._cosmos_client = CosmosClient(