Table of Contents

Constructor AgentKnowledge

Namespace
LMKit.Agents
Assembly
LM-Kit.NET.dll

AgentKnowledge(IKnowledgeRetriever, KnowledgeRetrievalMode)

Creates knowledge backed by any retriever.

public AgentKnowledge(IKnowledgeRetriever retriever, KnowledgeRetrievalMode mode = KnowledgeRetrievalMode.Always)

Parameters

retriever IKnowledgeRetriever

The source of passages. It decides what the current caller may read.

mode KnowledgeRetrievalMode

When the source is searched. Fixed for the lifetime of the instance.

Exceptions

ArgumentNullException

Thrown when retriever is null.

AgentKnowledge(RagEngine, KnowledgeRetrievalMode)

Creates knowledge backed by a RagEngine (or a DocumentRag).

public AgentKnowledge(RagEngine engine, KnowledgeRetrievalMode mode = KnowledgeRetrievalMode.Always)

Parameters

engine RagEngine

The engine whose data sources are searched.

mode KnowledgeRetrievalMode

When the source is searched. Fixed for the lifetime of the instance.

Exceptions

ArgumentNullException

Thrown when engine is null.

Share