get_document_content¶
Operation¶
get_document_content
async
¶
get_document_content(input: GetDocumentContentInput, plugins: list[Plugin] | None = None) -> GetDocumentContentOutput
Retrieves the content of an ingested document from a knowledge base. Returns a pre-signed URL for secure document access.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetDocumentContentInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
GetDocumentContentOutput
|
An instance of |
Input¶
GetDocumentContentInput
dataclass
¶
Dataclass for GetDocumentContentInput structure.
Attributes¶
data_source_id
class-attribute
instance-attribute
¶
data_source_id: str | None = None
The unique identifier of the data source that contains the document.
document_id
class-attribute
instance-attribute
¶
document_id: str | None = None
The unique identifier of the document to retrieve content for.
knowledge_base_id
class-attribute
instance-attribute
¶
knowledge_base_id: str | None = None
The unique identifier of the knowledge base that contains the document.
output_format
class-attribute
instance-attribute
¶
output_format: DocumentOutputFormat | None = None
The output format for the document content. RAW returns the original
file. EXTRACTED returns parsed text as JSON. Defaults to RAW.
user_context
class-attribute
instance-attribute
¶
user_context: UserContext | None = field(repr=False, default=None)
Contains information about the user making the request. This is used for access control filtering to ensure that results only include documents the user is authorized to access.
Output¶
GetDocumentContentOutput
dataclass
¶
Dataclass for GetDocumentContentOutput structure.
Attributes¶
document_content_length
class-attribute
instance-attribute
¶
document_content_length: int | None = None
The size of the document content in bytes available at the pre-signed URL.