AbstractWritableRagService

Convenience base class for WritableRagService implementations.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val name: String

Name of the RAG service. Should be unique per application instance. User code may use this to select a RAG service.

Functions

Link copied to clipboard
abstract fun findById(id: String): ContentElement?
Link copied to clipboard
abstract fun findChunksById(chunkIds: List<String>): List<Chunk>
Link copied to clipboard
open fun provision()

Provision this rag service if necessary

Link copied to clipboard
abstract fun save(element: ContentElement): ContentElement
Link copied to clipboard
abstract fun search(ragRequest: RagRequest): RagResponse

Make a RAG request

Link copied to clipboard

Will call save on the root and all descendants. The database only needs to store each descendant and link by id, rather than otherwise consider the entire structure.