Table of Contents

Class FilesController

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

Provdes methods for managing files.

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

Constructors

FilesController(IFileService, IOrchestrationContext, ILogger<FilesController>)

Provdes methods for managing files.

public FilesController(IFileService fileService, IOrchestrationContext callContext, ILogger<FilesController> logger)

Parameters

fileService IFileService

The IFileService file service.

callContext IOrchestrationContext

The IOrchestrationContext call context associated with the current request.

logger ILogger<FilesController>

The ILogger used for logging.

Methods

DownloadFile(string, string)

Downloads a file.

[HttpGet("files/{fileId}")]
public Task<IActionResult> DownloadFile(string instanceId, string fileId)

Parameters

instanceId string

The FoundationaLLM instance identifier.

fileId string

The identifier of the file to be downloaded.

Returns

Task<IActionResult>

GetFileRecord(string, string)

Retrieves a file record.

[HttpGet("fileRecords/{fileId}")]
public Task<IActionResult> GetFileRecord(string instanceId, string fileId)

Parameters

instanceId string

The FoundationaLLM instance identifier.

fileId string

The identifier of the file to be retrieved.

Returns

Task<IActionResult>

UploadFile(string, string)

Uploads a file to a conversation.

[HttpPost("conversations/{conversationId}/files")]
public Task<IActionResult> UploadFile(string instanceId, string conversationId)

Parameters

instanceId string

The FoundationaLLM instance identifier.

conversationId string

The conversation identifier.

Returns

Task<IActionResult>