Class CompletionsController
- Namespace
- FoundationaLLM.Gateway.API.Controllers
- Assembly
- FoundationaLLM.Gateway.API.dll
Methods for managing embedding requests.
[ApiController]
[APIKeyAuthentication]
[Route("instances/{instanceId}/[controller]")]
public class CompletionsController
- Inheritance
-
CompletionsController
- Inherited Members
- Extension Methods
Constructors
CompletionsController(IGatewayCore, IOrchestrationContext)
Methods for managing embedding requests.
public CompletionsController(IGatewayCore gatewayCore, IOrchestrationContext callContext)
Parameters
gatewayCore
IGatewayCoreThe IGatewayCore that provides LLM gateway services.
callContext
IOrchestrationContextThe IOrchestrationContext call context of the request being handled.
Methods
GetCompletionOperationResult(string, string)
Retrieves the outcome of a text embedding operation.
[HttpGet]
public Task<IActionResult> GetCompletionOperationResult(string instanceId, string operationId)
Parameters
instanceId
stringThe FoundationaLLM instance id.
operationId
stringThe unique identifier of the text completion operation.
Returns
- Task<IActionResult>
A TextOperationResult object with the outcome of the operation.
StartCompletionOperation(string, TextCompletionRequest)
Handles an incoming text completion request by starting a new completion operation.
[HttpPost]
public Task<IActionResult> StartCompletionOperation(string instanceId, TextCompletionRequest completionRequest)
Parameters
instanceId
stringThe FoundationaLLM instance id.
completionRequest
TextCompletionRequestThe TextCompletionRequest object with the details of the completion request.
Returns
- Task<IActionResult>
A TextOperationResult object with the outcome of the operation.