Interface ICodeSessionProviderService
- Namespace
- FoundationaLLM.Context.Interfaces
- Assembly
- FoundationaLLM.ContextEngine.dll
Defines the interface for code session provider services.
public interface ICodeSessionProviderService- Extension Methods
Properties
ProviderName
Gets the name of the code session provider.
string ProviderName { get; }Property Value
Methods
CreateCodeSession(string, string, string, string, string, UnifiedUserIdentity)
Creates a new code session.
Task<CreateCodeSessionResponse> CreateCodeSession(string instanceId, string agentName, string conversationId, string context, string language, UnifiedUserIdentity userIdentity)Parameters
- instanceIdstring
- The unique identifier of the FoundationaLLM instance. 
- agentNamestring
- The name of the agent for which the code execution session is created. 
- conversationIdstring
- The unique identifier of the conversation. 
- contextstring
- The context in which the code execution session is created. This is usually the name of the agent tool, but it is not limited to that. 
- languagestring
- The code session programing language. 
- userIdentityUnifiedUserIdentity
- The UnifiedUserIdentity providing the user identity information. 
Returns
- Task<CreateCodeSessionResponse>
- A CreateCodeSessionResponse object with the properties of the code execution session. 
DeleteCodeSessionFileStoreItems(string, string)
Deletes all files from a code session.
Task DeleteCodeSessionFileStoreItems(string codeSessionId, string endpoint)Parameters
- codeSessionIdstring
- The identifier of the code session. 
- endpointstring
- The endpoint of the code session service. 
Returns
DownloadFileFromCodeSession(string, string, string, string)
Downloads a file from a code session.
Task<Stream?> DownloadFileFromCodeSession(string codeSessionId, string endpoint, string fileName, string filePath)Parameters
- codeSessionIdstring
- The identifier of the code session. 
- endpointstring
- The endpoint of the code session service. 
- fileNamestring
- The name of the file to download. 
- filePathstring
- The path to the file to download. 
Returns
ExecuteCodeInCodeSession(string, string, string)
Executes code in a code session.
Task<CodeSessionCodeExecuteResponse> ExecuteCodeInCodeSession(string codeSessionId, string endpoint, string codeToExecute)Parameters
- codeSessionIdstring
- The identifier of the code session. 
- endpointstring
- The endpoint of the code session service. 
- codeToExecutestring
- The code to execute. 
Returns
- Task<CodeSessionCodeExecuteResponse>
- The result of the code execution including standard and error outputs. 
GetCodeSessionFileStoreItems(string, string)
Lists files from a code session.
Task<List<CodeSessionFileStoreItem>> GetCodeSessionFileStoreItems(string codeSessionId, string endpoint)Parameters
- codeSessionIdstring
- The identifier of the code session. 
- endpointstring
- The endpoint of the code session service. 
Returns
- Task<List<CodeSessionFileStoreItem>>
- The list of file paths from the code session. 
UploadFileToCodeSession(string, string, string, Stream)
Uploads a file to a code execution session.
Task<bool> UploadFileToCodeSession(string codeSessionId, string endpoint, string fileName, Stream fileContent)Parameters
- codeSessionIdstring
- The identifier of the code session. 
- endpointstring
- The endpoint of the code session service. 
- fileNamestring
- The name of the file to upload. 
- fileContentStream
- The stream containing the binary content of the file to upload.