Class KnowledgeSourceQueryEngine
- Namespace
- FoundationaLLM.Context.Services
- Assembly
- FoundationaLLM.ContextEngine.dll
Provides methods for querying knowledge sources.
public class KnowledgeSourceQueryEngine
- Inheritance
-
KnowledgeSourceQueryEngine
- Inherited Members
- Extension Methods
Constructors
KnowledgeSourceQueryEngine(IEnumerable<KnowledgeUnitQueryEngine>, ILogger<KnowledgeSourceQueryEngine>)
Provides methods for querying knowledge sources.
public KnowledgeSourceQueryEngine(IEnumerable<KnowledgeUnitQueryEngine> knowledgeUnitQueryEngines, ILogger<KnowledgeSourceQueryEngine> logger)
Parameters
knowledgeUnitQueryEngines
IEnumerable<KnowledgeUnitQueryEngine>The collection of knowledge unit query engines used to execute queries.
logger
ILogger<KnowledgeSourceQueryEngine>The logger used for logging.
Methods
QueryAsync(ContextKnowledgeSourceQueryRequest)
Executes an asynchronous query against the context knowledge source.
public Task<ContextKnowledgeSourceQueryResponse> QueryAsync(ContextKnowledgeSourceQueryRequest queryRequest)
Parameters
queryRequest
ContextKnowledgeSourceQueryRequestThe request object containing the parameters and criteria for the query. This cannot be null.
Returns
- Task<ContextKnowledgeSourceQueryResponse>
A task that represents the asynchronous operation. The task result contains a ContextKnowledgeSourceQueryResponse object with the results of the query.
Remarks
Use this method to retrieve data from the context knowledge source based on the
specified query parameters. Ensure that the queryRequest
object is properly populated
before calling this method.