Table of Contents

Interface IContextServiceClient

Namespace
FoundationaLLM.Common.Interfaces
Assembly
FoundationaLLM.Common.dll

Provides methods to call the FoundationaLLM Context API service.

public interface IContextServiceClient
Extension Methods

Methods

CreateCodeSession(string, string, string, string, string, string)

Calls the Context API service to create a code session.

Task<ContextServiceResponse<CreateCodeSessionResponse>> CreateCodeSession(string instanceId, string agentName, string conversationId, string context, string endpointProvider, string language)

Parameters

instanceId string

The FoundationaLLM instance identifier.

agentName string

The name of the agent.

conversationId string

The conversation identifier.

context string

The context within the conversation in which the code session must be created (e.g., an agent tool name).

endpointProvider string

The name of the code session endpoint provider.

language string

The programming language of the code session.

Returns

Task<ContextServiceResponse<CreateCodeSessionResponse>>

A ContextServiceResponse<T> instance where T is of type CreateCodeSessionResponse.

CreateFile(string, string, string, string, Stream)

Calls the Context API service to create a file.

Task<ContextServiceResponse<ContextFileRecord>> CreateFile(string instanceId, string conversationId, string fileName, string fileContentType, Stream fileContent)

Parameters

instanceId string

The FoundationaLLM instance identifier.

conversationId string

The conversation identifier.

fileName string

The name of the file to be created.

fileContentType string

The content type of the file to be created.

fileContent Stream

The binary content of the file.

Returns

Task<ContextServiceResponse<ContextFileRecord>>

A ContextServiceResponse<T> instance where T is of type ContextFileRecord.

GetFileContent(string, string)

Calls the Context API service to get the content of a file.

Task<ContextServiceResponse<ContextFileContent>> GetFileContent(string instanceId, string fileId)

Parameters

instanceId string

The FoundationaLLM instance identifier.

fileId string

The unique identifier of the file.

Returns

Task<ContextServiceResponse<ContextFileContent>>

A ContextServiceResponse<T> instance where T is of type ContextFileContent.

GetFileRecord(string, string)

Calls the Context API service to get a file record.

Task<ContextServiceResponse<ContextFileRecord>> GetFileRecord(string instanceId, string fileId)

Parameters

instanceId string

The FoundationaLLM instance identifier.

fileId string

The unique identifier of the file.

Returns

Task<ContextServiceResponse<ContextFileRecord>>

A ContextServiceResponse<T> instance where T is of type ContextFileRecord.