DocumentSource

org.llm4s.rag.loader.DocumentSource
See theDocumentSource companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def fromIterator(desc: String, documents: => Iterator[Result[DocumentRef]], readFn: DocumentRef => Result[RawDocument]): DocumentSource

Create a simple DocumentSource from an Iterator of DocumentRefs and a read function.

Create a simple DocumentSource from an Iterator of DocumentRefs and a read function.

Useful for wrapping simple data sources or testing.

Value parameters

desc

Description for logging

documents

Iterator of document references

readFn

Function to read document content by ref

Attributes