Class KnowledgeController
- Namespace
- FoundationaLLM.Context.API.Controllers
- Assembly
- FoundationaLLM.Context.API.dll
Provdes methods for managing files.
[ApiController]
[APIKeyAuthentication]
[Route("instances/{instanceId}")]
public class KnowledgeController : ControllerBase
- Inheritance
-
KnowledgeController
- Inherited Members
- Extension Methods
Constructors
KnowledgeController(IKnowledgeService, IOrchestrationContext, ILogger<KnowledgeController>)
Provdes methods for managing files.
public KnowledgeController(IKnowledgeService knowledgeService, IOrchestrationContext callContext, ILogger<KnowledgeController> logger)
Parameters
knowledgeService
IKnowledgeServiceThe IKnowledgeService knowledge service.
callContext
IOrchestrationContextThe IOrchestrationContext call context associated with the current request.
logger
ILogger<KnowledgeController>The ILogger used for logging.
Methods
GetKnowledgeSources(string, ContextKnowledgeSourceListRequest)
Retrieves the list of knowledge sources.
[HttpPost("knowledgeSources/list")]
public Task<IActionResult> GetKnowledgeSources(string instanceId, ContextKnowledgeSourceListRequest listRequest)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
listRequest
ContextKnowledgeSourceListRequestThe request containing the information used to filter the knowledge sources.
Returns
QueryKnowledgeSource(string, string, ContextKnowledgeSourceQueryRequest)
Queries a knowledge graph.
[HttpPost("knowledgeSources/{knowledgeSourceId}/query")]
public Task<IActionResult> QueryKnowledgeSource(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceQueryRequest queryRequest)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
knowledgeSourceId
stringqueryRequest
ContextKnowledgeSourceQueryRequest
Returns
RenderKnowledgeSourceGraph(string, string, ContextKnowledgeSourceQueryRequest?)
Retrieves the knowledge graph in a format suitable for rendering.
[HttpPost("knowledgeSources/{knowledgeSourceId}/render-graph")]
public Task<IActionResult> RenderKnowledgeSourceGraph(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceQueryRequest? queryRequest)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
knowledgeSourceId
stringqueryRequest
ContextKnowledgeSourceQueryRequest
Returns
UpdateKnowledgeSource(string, string, ContextKnowledgeSourceUpdateRequest)
Updates a knowledge source.
[HttpPost("knowledgeSources/{knowledgeSourceId}")]
public Task<IActionResult> UpdateKnowledgeSource(string instanceId, string knowledgeSourceId, ContextKnowledgeSourceUpdateRequest updateRequest)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
knowledgeSourceId
stringThe knowledge source identifier.
updateRequest
ContextKnowledgeSourceUpdateRequestThe request containing the information used to update the knowledge source.