Skip to content

Commit a712953

Browse files
committed
update init output and make url parameter optional due to connection string possibility
1 parent 30cd48a commit a712953

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

graphrag/config/defaults.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@
9393
UPDATE_STORAGE_BASE_DIR = "update_output"
9494

9595
VECTOR_STORE = f"""
96-
type: {VectorStoreType.LanceDB.value}
96+
type: {VectorStoreType.LanceDB.value} # one of [lancedb, azure_ai_search, cosmosdb]
9797
db_uri: '{(Path(STORAGE_BASE_DIR) / "lancedb")!s}'
98-
container_name: default
98+
collection_name: default
9999
overwrite: true\
100100
"""
101101

102102
VECTOR_STORE_DICT = {
103103
"type": VectorStoreType.LanceDB.value,
104104
"db_uri": str(Path(STORAGE_BASE_DIR) / "lancedb"),
105-
"container_name": "default",
105+
"collection_name": "default",
106106
"overwrite": True,
107107
}
108108

graphrag/vector_stores/cosmosdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ def __init__(self, **kwargs: Any) -> None:
3131

3232
def connect(self, **kwargs: Any) -> Any:
3333
"""Connect to CosmosDB vector storage."""
34-
url = kwargs["url"]
3534
connection_string = kwargs.get("connection_string")
3635
if connection_string:
3736
self._cosmos_client = CosmosClient.from_connection_string(connection_string)
3837
else:
39-
if url is None:
38+
url = kwargs.get("url")
39+
if not url:
4040
msg = "Either connection_string or url must be provided."
4141
raise ValueError(msg)
4242
self._cosmos_client = CosmosClient(

0 commit comments

Comments
 (0)