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(string, IEnumerable<KnowledgeUnitQueryEngine>, ILogger<KnowledgeSourceQueryEngine>)
Provides methods for querying knowledge sources.
public KnowledgeSourceQueryEngine(string knowledgeSourceId, IEnumerable<KnowledgeUnitQueryEngine> knowledgeUnitQueryEngines, ILogger<KnowledgeSourceQueryEngine> logger)
  Parameters
knowledgeSourceIdstringThe identifier of the knowldege source.
knowledgeUnitQueryEnginesIEnumerable<KnowledgeUnitQueryEngine>The collection of knowledge unit query engines used to execute queries.
loggerILogger<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
queryRequestContextKnowledgeSourceQueryRequestThe 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.