DocumentRef

org.llm4s.rag.loader.DocumentRef
final case class DocumentRef(id: String, path: String, metadata: Map[String, String], contentLength: Option[Long], lastModified: Option[Long], etag: Option[String])

Reference to a document in a source (S3, filesystem, database, etc.)

DocumentRef contains the document's identity and metadata from the source, but not the document content itself. Use a DocumentSource to read the content.

Value parameters

contentLength

Size of the document in bytes, if known

etag

Content hash or version identifier, if available (e.g., S3 ETag)

id

Unique identifier within the source (e.g., S3 object key)

lastModified

Last modification timestamp (epoch ms), if available

metadata

Source-specific metadata (bucket, region, content-type, etc.)

path

Human-readable path or location in the source

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def extension: Option[String]

Get file extension from the path, if available.

Get file extension from the path, if available.

Attributes

def filename: String

Get the filename (last component of the path).

Get the filename (last component of the path).

Attributes

def toVersion: Option[DocumentVersion]

Convert to DocumentVersion for sync/change detection.

Convert to DocumentVersion for sync/change detection.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product