You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2025. It is now read-only.
Create a Azure Storage container and upload files to it.
137
-
138
-
Args:
139
-
files (List[UploadFile]): A list of files to be uploaded.
140
-
storage_name (str): The name of the Azure Blob Storage container to which files will be uploaded.
141
-
overwrite (bool): Whether to overwrite existing files with the same name. Defaults to True. If False, files that already exist will be skipped.
142
-
143
-
Returns:
144
-
BaseResponse: An instance of the BaseResponse model with a status message indicating the result of the upload.
145
-
146
-
Raises:
147
-
HTTPException: If the container name is invalid or if any error occurs during the upload process.
138
+
Create a Azure Storage container (if needed) and upload files. Multiple file types are supported, including pdf, powerpoint, word, excel, html, csv, json, xml, etc.
139
+
The complete set of supported file types can be found in the MarkItDown (https://github.com/microsoft/markitdown) library.
148
140
"""
149
141
try:
150
142
# create the initial cache if it doesn't exist
@@ -153,16 +145,19 @@ async def upload_files(
153
145
)
154
146
awaitcreate_cache(blob_container_client)
155
147
156
-
# upload files in batches of 1000 to avoid exceeding Azure Storage API limits
157
-
batch_size=1000
148
+
# upload files in batches of 100 to avoid exceeding Azure Storage API limits
summary="Perform a global search across the knowledge graph index",
43
44
description="The global query method generates answers by searching over all AI-generated community reports in a map-reduce fashion. This is a resource-intensive method, but often gives good responses for questions that require an understanding of the dataset as a whole.",
summary="Perform a local search across the knowledge graph index.",
123
124
description="The local query method generates answers by combining relevant data from the AI-extracted knowledge-graph with text chunks of the raw documents. This method is suitable for questions that require an understanding of specific entities mentioned in the documents (e.g. What are the healing properties of chamomile?).",
Copy file name to clipboardExpand all lines: backend/graphrag_app/api/query_streaming.py
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
APIRouter,
13
13
Depends,
14
14
HTTPException,
15
+
status,
15
16
)
16
17
fromfastapi.responsesimportStreamingResponse
17
18
fromgraphrag.api.queryimport (
@@ -47,6 +48,7 @@
47
48
"/global",
48
49
summary="Stream a response back after performing a global search",
49
50
description="The global query method generates answers by searching over all AI-generated community reports in a map-reduce fashion. This is a resource-intensive method, but often gives good responses for questions that require an understanding of the dataset as a whole.",
summary="Stream a response back after performing a local search",
206
208
description="The local query method generates answers by combining relevant data from the AI-extracted knowledge-graph with text chunks of the raw documents. This method is suitable for questions that require an understanding of specific entities mentioned in the documents (e.g. What are the healing properties of chamomile?).",
0 commit comments