Interface IKnowledgeService
- Namespace
 - FoundationaLLM.Context.Interfaces
 
- Assembly
 - FoundationaLLM.ContextEngine.dll
 
Defines the service interface for the FoundationaLLM Knowledge Graph service.
public interface IKnowledgeService
  - Extension Methods
 
Methods
GetKnowledgeSource(string, string, string?, UnifiedUserIdentity)
Retrieves a specified knowledge source.
Task<ContextServiceResponse<ResourceProviderGetResult<KnowledgeSource>>> GetKnowledgeSource(string instanceId, string knowledgeSourceId, string? agentName, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeSourceIdstringThe knowledge source identifier.
agentNamestringThe agent name if the request is being made on behalf of an agent.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
GetKnowledgeSources(string, ContextKnowledgeResourceListRequest, UnifiedUserIdentity)
Retrieves the list of knowledge sources.
Task<ContextServiceResponse<IEnumerable<ResourceProviderGetResult<KnowledgeSource>>>> GetKnowledgeSources(string instanceId, ContextKnowledgeResourceListRequest listRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
listRequestContextKnowledgeResourceListRequestThe request containing the information used to filter the knowledge resources.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
GetKnowledgeUnit(string, string, string?, UnifiedUserIdentity)
Retrieves a specified knowledge unit.
Task<ContextServiceResponse<ResourceProviderGetResult<KnowledgeUnit>>> GetKnowledgeUnit(string instanceId, string knowledgeUnitId, string? agentName, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeUnitIdstringThe knowledge unit identifier.
agentNamestringThe agent name if the request is being made on behalf of an agent.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
GetKnowledgeUnits(string, ContextKnowledgeResourceListRequest, UnifiedUserIdentity)
Retrieves the list of knowledge units.
Task<ContextServiceResponse<IEnumerable<ResourceProviderGetResult<KnowledgeUnit>>>> GetKnowledgeUnits(string instanceId, ContextKnowledgeResourceListRequest listRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
listRequestContextKnowledgeResourceListRequestThe request containing the information used to filter the knowledge resources.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
QueryKnowledgeSource(string, string, ContextKnowledgeSourceQueryRequest, UnifiedUserIdentity)
Queries a knowledge source.
Task<ContextKnowledgeSourceQueryResponse> QueryKnowledgeSource(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceQueryRequest queryRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeSourceIdstringThe knowledge source identifier.
queryRequestContextKnowledgeSourceQueryRequestThe request containing the details of the query.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
RenderKnowledgeUnitGraph(string, string, ContextKnowledgeSourceQueryRequest?, UnifiedUserIdentity)
Retrieves the knowledge unit's knowledge graph in a format suitable for visualization or further processing.
Task<ContextKnowledgeUnitRenderGraphResponse> RenderKnowledgeUnitGraph(string instanceId, string knowledgeUnitId, ContextKnowledgeSourceQueryRequest? queryRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeUnitIdstringThe knowledge unit identifier.
queryRequestContextKnowledgeSourceQueryRequestThe request containing the details of the query.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
SetKnowledgeUnitGraph(string, string, ContextKnowledgeUnitSetGraphRequest, UnifiedUserIdentity)
Sets the knowledge graph associated with a knowledge unit.
Task<ContextServiceResponse<ResourceProviderActionResult>> SetKnowledgeUnitGraph(string instanceId, string knowledgeUnitId, ContextKnowledgeUnitSetGraphRequest setGraphRequest, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeUnitIdstringThe knowledge unit identifier.
setGraphRequestContextKnowledgeUnitSetGraphRequestThe request containing the knowledge graph details.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
UpsertKnowledgeSource(string, KnowledgeSource, UnifiedUserIdentity)
Creates or updates a knowledge source in the context service.
Task<ContextServiceResponse<ResourceProviderUpsertResult<KnowledgeSource>>> UpsertKnowledgeSource(string instanceId, KnowledgeSource knowledgeSource, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeSourceKnowledgeSourceThe knowledge source to be created or updated.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.
Returns
UpsertKnowledgeUnit(string, KnowledgeUnit, UnifiedUserIdentity)
Creates or updates a knowledge unit in the context service.
Task<ContextServiceResponse<ResourceProviderUpsertResult<KnowledgeUnit>>> UpsertKnowledgeUnit(string instanceId, KnowledgeUnit knowledgeUnit, UnifiedUserIdentity userIdentity)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
knowledgeUnitKnowledgeUnitThe knowledge unit to be created or updated.
userIdentityUnifiedUserIdentityThe identity of the security principal submitting the request.