Interface IStateServiceClient
- Namespace
 - FoundationaLLM.Common.Interfaces
 
- Assembly
 - FoundationaLLM.Common.dll
 
Represents a client for interacting with the FoundationaLLM State API service.
public interface IStateServiceClient
  - Extension Methods
 
Methods
CreateOperation(string, string, UnifiedUserIdentity, CancellationToken)
Creates a new long-running operation in the state service.
Task<ClientResult<LongRunningOperation>> CreateOperation(string instanceId, string operationId, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken = default)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
operationIdstringThe unique identifier of the operation.
userIdentityUnifiedUserIdentityThe identity of the user running the operation.
cancellationTokenCancellationTokenThe cancellation token notifiying a request to cancel the operation creation.
Returns
- Task<ClientResult<LongRunningOperation>>
 
UpdateOperation(string, string, OperationStatus, string, UnifiedUserIdentity, CancellationToken)
Updates the status of an existing long-running operation in the state service.
Task<ClientResult<LongRunningOperation>> UpdateOperation(string instanceId, string operationId, OperationStatus status, string statusMessage, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken = default)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
operationIdstringThe unique identifier of the operation.
statusOperationStatusThe status of the operation.
statusMessagestringThe message describing the status of the operation.
userIdentityUnifiedUserIdentityThe identity of the user running the operation.
cancellationTokenCancellationTokenThe cancellation token notifiying a request to cancel the operation status update.
Returns
- Task<ClientResult<LongRunningOperation>>
 
UpdateOperationResult(string, string, CompletionResponse, CancellationToken)
Updates the current result of a long-running operation in the state service.
Task UpdateOperationResult(string instanceId, string operationId, CompletionResponse completionResponse, CancellationToken cancellationToken = default)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
operationIdstringThe unique identifier of the operation.
completionResponseCompletionResponseThe completion response that is the current result of the operation.
cancellationTokenCancellationTokenThe cancellation token notifiying a request to cancel the operation result update.
Returns
UpdateOperationWithTextResult(string, string, OperationStatus, string, string, UnifiedUserIdentity, CancellationToken)
Updates the status and the current result of an existing long-running operation in the state service.
Task<ClientResult<LongRunningOperation>> UpdateOperationWithTextResult(string instanceId, string operationId, OperationStatus status, string statusMessage, string resultMessage, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken = default)
  Parameters
instanceIdstringThe FoundationaLLM instance identifier.
operationIdstringThe unique identifier of the operation.
statusOperationStatusThe status of the operation.
statusMessagestringThe message describing the status of the operation.
resultMessagestringThe message describing the current result of the operation.
userIdentityUnifiedUserIdentityThe identity of the user running the operation.
cancellationTokenCancellationTokenThe cancellation token notifiying a request to cancel the operation status update.
Returns
- Task<ClientResult<LongRunningOperation>>