Table of Contents

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

GetKnowledgeSources(string, ContextKnowledgeSourceListRequest, UnifiedUserIdentity)

Retrieves the list of knowledge sources.

Task<IEnumerable<KnowledgeSource>> GetKnowledgeSources(string instanceId, ContextKnowledgeSourceListRequest listRequest, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance identifier.

listRequest ContextKnowledgeSourceListRequest

The request containing the information used to filter the knowledge sources.

userIdentity UnifiedUserIdentity

The identity of the security principal submitting the request.

Returns

Task<IEnumerable<KnowledgeSource>>

QueryKnowledgeSource(string, string, ContextKnowledgeSourceQueryRequest, UnifiedUserIdentity)

Queries a knowledge source.

Task<ContextKnowledgeSourceQueryResponse> QueryKnowledgeSource(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceQueryRequest queryRequest, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance identifier.

knowledgeSourceId string

The knowledge source identifier.

queryRequest ContextKnowledgeSourceQueryRequest

The request containing the details of the query.

userIdentity UnifiedUserIdentity

The identity of the security principal submitting the request.

Returns

Task<ContextKnowledgeSourceQueryResponse>

RenderKnowledgeSourceGraph(string, string, ContextKnowledgeSourceQueryRequest?, UnifiedUserIdentity)

Retrieves the knowledge source's knowledge graph in a format suitable for visualization or further processing.

Task<ContextKnowledgeSourceRenderGraphResponse> RenderKnowledgeSourceGraph(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceQueryRequest? queryRequest, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance identifier.

knowledgeSourceId string

The knowledge source identifier.

queryRequest ContextKnowledgeSourceQueryRequest

The request containing the details of the query.

userIdentity UnifiedUserIdentity

The identity of the security principal submitting the request.

Returns

Task<ContextKnowledgeSourceRenderGraphResponse>

UpdateKnowledgeSource(string, string, ContextKnowledgeSourceUpdateRequest, UnifiedUserIdentity)

Updates a knowledge source.

Task UpdateKnowledgeSource(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceUpdateRequest updateRequest, UnifiedUserIdentity userIdentity)

Parameters

instanceId string

The FoundationaLLM instance identifier.

knowledgeSourceId string

The knowledge source+ identifier.

updateRequest ContextKnowledgeSourceUpdateRequest

The request containing the information to update the knowledge source.

userIdentity UnifiedUserIdentity

The identity of the security principal submitting the request.

Returns

Task