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
Copy file name to clipboardExpand all lines: web/api/views.py
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -313,8 +313,8 @@ class DocumentIn(Schema):
313
313
name: str
314
314
metadata: dict=Field(default_factory=dict)
315
315
collection_name: str=Field(
316
-
"default collection",
317
-
description="""The name of the collection to which the document belongs. If not provided, the document will be added to the default collection. Use 'all' to access all collections belonging to the user.""",
316
+
"default_collection",
317
+
description="""The name of the collection to which the document belongs. If not provided, the document will be added to the default_collection. Use 'all' to access all collections belonging to the user.""",
318
318
)
319
319
url: Optional[str] =None
320
320
base64: Optional[str] =None
@@ -349,8 +349,8 @@ class DocumentInPatch(Schema):
description="""The name of the collection to which the document belongs. If not provided, the document will be added to the default collection. Use 'all' to access all collections belonging to the user.""",
352
+
"default_collection",
353
+
description="""The name of the collection to which the document belongs. If not provided, the document will be added to the default_collection. Use 'all' to access all collections belonging to the user.""",
354
354
)
355
355
url: Optional[str] =None
356
356
base64: Optional[str] =None
@@ -453,7 +453,7 @@ async def upsert_document(
453
453
454
454
This endpoint allows the user to create or update a document in a collection.
455
455
The document can be provided as a URL or a base64-encoded string.
456
-
if the collection is not provided, a collection named "default collection" will be used.
456
+
if the collection is not provided, a collection named "default_collection" will be used.
457
457
if the collection is provided, it will be created if it does not exist.
458
458
459
459
Args:
@@ -476,7 +476,7 @@ async def upsert_document(
476
476
"wait": true # optional, if true, the response will be sent after waiting for the document to be processed. Otherwise, it will be done asynchronously.
477
477
}
478
478
"""
479
-
# if the user didn't give a collection, payload.collection will be "default collection"
479
+
# if the user didn't give a collection, payload.collection will be "default_collection"
480
480
ifpayload.collection_name=="all":
481
481
return400, GenericError(
482
482
detail="The collection name 'all' is not allowed when inserting or updating a document - only when retrieving. Please provide a valid collection name."
collection_name (Optional[str]): The name of the collection to fetch documents from. Defaults to "default collection". Use "all" to fetch documents from all collections.
591
+
collection_name (Optional[str]): The name of the collection to fetch documents from. Defaults to "default_collection". Use "all" to fetch documents from all collections.
592
592
expand (Optional[str]): A comma-separated string specifying additional fields to include in the response.
593
593
If "pages" is included, the pages of each document will be included.
594
594
@@ -599,7 +599,7 @@ async def list_documents(
599
599
HTTPException: If the collection or documents are not found.
600
600
601
601
Example:
602
-
GET /documents/?collection_name=default collection&expand=pages
602
+
GET /documents/?collection_name=default_collection&expand=pages
request: The HTTP request object, which includes authentication information.
750
-
collection_name (name): The name of the collection containing the document. Defaults to "default collection". Use "all" to access all collections belonging to the user.
750
+
collection_name (name): The name of the collection containing the document. Defaults to "default_collection". Use "all" to access all collections belonging to the user.
751
751
document_name (int): The name of the document to be deleted.
0 commit comments