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
stringThe FoundationaLLM instance identifier.
agentName
stringThe name of the agent.
conversationId
stringThe conversation identifier.
context
stringThe context within the conversation in which the code session must be created (e.g., an agent tool name).
endpointProvider
stringThe name of the code session endpoint provider.
language
stringThe 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
stringThe FoundationaLLM instance identifier.
conversationId
stringThe conversation identifier.
fileName
stringThe name of the file to be created.
fileContentType
stringThe content type of the file to be created.
fileContent
StreamThe 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
stringThe FoundationaLLM instance identifier.
fileId
stringThe 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
stringThe FoundationaLLM instance identifier.
fileId
stringThe unique identifier of the file.
Returns
- Task<ContextServiceResponse<ContextFileRecord>>
A ContextServiceResponse<T> instance where
T
is of type ContextFileRecord.