Class ModelContext
- Namespace
- FoundationaLLM.Gateway.Services
- Assembly
- FoundationaLLM.Gateway.dll
Provides context associated with an embedding model.
public class ModelContext
- Inheritance
-
ModelContext
- Inherited Members
- Extension Methods
Constructors
ModelContext(ConcurrentDictionary<string, TextOperationContext>, ILogger<ModelContext>)
Provides context associated with an embedding model.
public ModelContext(ConcurrentDictionary<string, TextOperationContext> textOperationContexts, ILogger<ModelContext> logger)
Parameters
textOperationContexts
ConcurrentDictionary<string, TextOperationContext>The global dictionary of TextOperationContext objects indexed by operation identifier.
logger
ILogger<ModelContext>The ILogger used for logging.
Properties
DeploymentContexts
A list of ModelDeploymentContext objects providing contexts for the available deployments for the model.
public List<ModelDeploymentContext> DeploymentContexts { get; set; }
Property Value
ModelName
The name of the embedding model.
public required string ModelName { get; set; }
Property Value
Methods
AddTextOperationContext(TextOperationContext)
public void AddTextOperationContext(TextOperationContext textOperationContext)
Parameters
textOperationContext
TextOperationContext
ProcessTextOperations(CancellationToken)
Processes text operations in a continuous loop.
public Task ProcessTextOperations(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenNotifies that the processing loop must be cancelled.