Table of Contents

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 IGatewayCore

The IGatewayCore that provides LLM gateway services.

callContext IOrchestrationContext

The 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 string

The FoundationaLLM instance id.

operationId string

The 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 string

The FoundationaLLM instance id.

completionRequest TextCompletionRequest

The TextCompletionRequest object with the details of the completion request.

Returns

Task<IActionResult>

A TextOperationResult object with the outcome of the operation.