Constructor AgentKnowledge
AgentKnowledge(IKnowledgeRetriever, KnowledgeRetrievalMode)
Creates knowledge backed by any retriever.
public AgentKnowledge(IKnowledgeRetriever retriever, KnowledgeRetrievalMode mode = KnowledgeRetrievalMode.Always)
Parameters
retrieverIKnowledgeRetrieverThe source of passages. It decides what the current caller may read.
modeKnowledgeRetrievalModeWhen the source is searched. Fixed for the lifetime of the instance.
Exceptions
- ArgumentNullException
Thrown when
retrieveris null.
AgentKnowledge(RagEngine, KnowledgeRetrievalMode)
Creates knowledge backed by a RagEngine (or a DocumentRag).
public AgentKnowledge(RagEngine engine, KnowledgeRetrievalMode mode = KnowledgeRetrievalMode.Always)
Parameters
engineRagEngineThe engine whose data sources are searched.
modeKnowledgeRetrievalModeWhen the source is searched. Fixed for the lifetime of the instance.
Exceptions
- ArgumentNullException
Thrown when
engineis null.