TextDocument

interface TextDocument(source)

A document with textual content, an optional identifier, and optional metadata.

This interface is the common abstraction for any text-bearing document that can be stored in or retrieved from a ai.koog.rag.base.storage.SearchStorage or ai.koog.rag.base.storage.WriteStorage.

Properties

Link copied to clipboard
abstract val content: String

The main textual content of the document.

Link copied to clipboard
abstract val id: String?

Optional unique identifier for the document.

Link copied to clipboard
abstract val metadata: Map<String, Any>

Optional key-value metadata associated with the document.