Class HttpKnowledgeSourceLoader
- All Implemented Interfaces:
SourceLoader
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.intelligence.rag.binding.SourceLoader
SourceLoader.LoadedDocument -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.tnsai.annotations.Knowledge.Typehandles()TheKnowledge.Typethis loader handles.load(com.tnsai.rag.KnowledgeSourceConfig source) Loads documents from the given source declaration.List<com.tnsai.intelligence.rag.binding.ChunkingSourceLoader.LoadedChunk> loadChunks(com.tnsai.rag.KnowledgeSourceConfig source) com.tnsai.intelligence.rag.binding.ChunkingSourceLoader.LoadedSourceloadSource(com.tnsai.rag.KnowledgeSourceConfig source) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.intelligence.rag.binding.SourceLoader
metadata
-
Constructor Details
-
HttpKnowledgeSourceLoader
public HttpKnowledgeSourceLoader()
-
-
Method Details
-
handles
public com.tnsai.annotations.Knowledge.Type handles()Description copied from interface:SourceLoaderTheKnowledge.Typethis loader handles.RoleRagBindingroutes each declared source to the loader whosehandles()matches.- Specified by:
handlesin interfaceSourceLoader- Returns:
- the supported type
-
load
Description copied from interface:SourceLoaderLoads documents from the given source declaration.Each returned
SourceLoader.LoadedDocumentcarries anid(used as the entry id in the vector store), the textualcontent, and an optionalsourcelabel for retrieval-time attribution (e.g. the file path, URL, or DB row id).The return type is a list because a loader decides the unit of retrieval: it may split one source into as many documents as it likes, and everything downstream —
topK,minScore,dedupeThreshold,contextWindow— is defined over whatever it returns. The bundledLocalFileSourceLoaderkeeps small files intact and emits stable, format-aware chunks for larger files (TAN-5327).Successfully loaded empty sources return an empty list. The bundled FILE and HTTP loaders throw
RetrievalExceptionwith reasonSOURCE_LOADINGwhen a source cannot be read; they never publish a partial corpus as an empty success. Invalid source configuration and content surface asCONFIGURATIONat the binding boundary.The returned list defines ingest order. Ordered consumers observe documents in exactly this order, so implementations must return a deterministic list for a stable source snapshot.
- Specified by:
loadin interfaceSourceLoader- Parameters:
source- the normalized knowledge-source declaration- Returns:
- loaded documents in deterministic ingest order, or empty when the source was successfully read but contained no documents
-
loadChunks
public List<com.tnsai.intelligence.rag.binding.ChunkingSourceLoader.LoadedChunk> loadChunks(com.tnsai.rag.KnowledgeSourceConfig source) -
loadSource
public com.tnsai.intelligence.rag.binding.ChunkingSourceLoader.LoadedSource loadSource(com.tnsai.rag.KnowledgeSourceConfig source)
-