KnowledgeSourceFile interface

Metadata for a file uploaded to a File knowledge source.

Properties

createdAt

The timestamp when the file was created.

errorMessage

The error message if file processing failed, null otherwise.

extractionMode

The extraction mode applied to the file.

fileId

The unique identifier for the file.

fileName

The original file name.

fileSizeBytes

The file size in bytes.

lastUpdatedAt

The timestamp when the file was last updated.

metadata

Custom key/value metadata stored with the file. Returned but not searchable or filterable.

parsingMode

The parsing mode applied to the file (auto-detected from the file).

prefix

The prefix (directory-like path) derived from the full file name.

Property Details

createdAt

The timestamp when the file was created.

createdAt?: Date

Property Value

Date

errorMessage

The error message if file processing failed, null otherwise.

errorMessage?: string

Property Value

string

extractionMode

The extraction mode applied to the file.

extractionMode?: string

Property Value

string

fileId

The unique identifier for the file.

fileId?: string

Property Value

string

fileName

The original file name.

fileName?: string

Property Value

string

fileSizeBytes

The file size in bytes.

fileSizeBytes?: number

Property Value

number

lastUpdatedAt

The timestamp when the file was last updated.

lastUpdatedAt?: Date

Property Value

Date

metadata

Custom key/value metadata stored with the file. Returned but not searchable or filterable.

metadata?: Record<string, string>

Property Value

Record<string, string>

parsingMode

The parsing mode applied to the file (auto-detected from the file).

parsingMode?: "text" | "default" | "delimitedText" | "json" | "jsonArray" | "jsonLines" | "markdown"

Property Value

"text" | "default" | "delimitedText" | "json" | "jsonArray" | "jsonLines" | "markdown"

prefix

The prefix (directory-like path) derived from the full file name.

prefix?: string

Property Value

string