Table of Contents

Class CodeSessionsController

Namespace
FoundationaLLM.Context.API.Controllers
Assembly
FoundationaLLM.Context.API.dll

Provdes methods for managing code sessions.

[ApiController]
[APIKeyAuthentication]
[Route("instances/{instanceId}/[controller]")]
public class CodeSessionsController : ControllerBase
Inheritance
CodeSessionsController
Inherited Members
Extension Methods

Constructors

CodeSessionsController(ICodeSessionService, IOrchestrationContext, ILogger<CodeSessionsController>)

Provdes methods for managing code sessions.

public CodeSessionsController(ICodeSessionService codeSessionService, IOrchestrationContext callContext, ILogger<CodeSessionsController> logger)

Parameters

codeSessionService ICodeSessionService

The ICodeSessionService providing code sessions services.

callContext IOrchestrationContext

The IOrchestrationContext call context associated with the current request.

logger ILogger<CodeSessionsController>

The ILogger used for logging.

Methods

CreateCodeSessions(string, CreateCodeSessionRequest)

Creates a new code session.

[HttpPost]
public Task<IActionResult> CreateCodeSessions(string instanceId, CreateCodeSessionRequest request)

Parameters

instanceId string

The FoundationaLLM instance identifier.

request CreateCodeSessionRequest

The CreateCodeSessionRequest providing the details of the request.

Returns

Task<IActionResult>

An OkObjectResult containing the CreateCodeSessionResponse response.

DownloadFilesFromCodeSession(string, string, CodeSessionFileDownloadRequest)

Downloads files from a code session.

[HttpPost("{sessionId}/downloadFiles")]
public Task<IActionResult> DownloadFilesFromCodeSession(string instanceId, string sessionId, CodeSessionFileDownloadRequest request)

Parameters

instanceId string

The FoundationaLLM instance identifier.

sessionId string

The identifier of the code session from where the files must be downloaded.

request CodeSessionFileDownloadRequest

The CodeSessionFileDownloadRequest providing the details of the request.

Returns

Task<IActionResult>

UploadFilesToCodeSession(string, string, CodeSessionFileUploadRequest)

Uploads files to a code session.

[HttpPost("{sessionId}/uploadFiles")]
public Task<IActionResult> UploadFilesToCodeSession(string instanceId, string sessionId, CodeSessionFileUploadRequest request)

Parameters

instanceId string

The FoundationaLLM instance identifier.

sessionId string

The identifier of the code session where the files must be uploaded.

request CodeSessionFileUploadRequest

The CodeSessionFileUploadRequest providing the details of the request.

Returns

Task<IActionResult>