Class VectorizationState
- Namespace
- FoundationaLLM.Vectorization.Models
- Assembly
- FoundationaLLM.Vectorization.Engine.dll
Holds the state associated with each step of the vectorization pipeline for a specified content item (i.e., document).
public class VectorizationState
- Inheritance
-
VectorizationState
- Inherited Members
- Extension Methods
Fields
LoadedArtifactTypes
Indicates which types of artifacts have already been loaded into the state.
[JsonIgnore]
public List<VectorizationArtifactType> LoadedArtifactTypes
Field Value
Properties
Artifacts
The vectorization artifacts associated with the vectorization state.
[JsonPropertyOrder(2)]
[JsonPropertyName("artifacts")]
public List<VectorizationArtifact> Artifacts { get; set; }
Property Value
ContentIdentifier
The ContentIdentifier object identifying the content being vectorized.
[JsonPropertyOrder(1)]
[JsonPropertyName("content_identifier")]
public required ContentIdentifier ContentIdentifier { get; set; }
Property Value
CurrentRequestId
The unique identifier of the current vectorization request. Subsequent vectorization requests referring to the same content will have different unique identifiers.
[JsonPropertyOrder(0)]
[JsonPropertyName("request_id")]
public required string CurrentRequestId { get; set; }
Property Value
IndexReferences
The vector index references associated with the vectorization state.
[JsonPropertyOrder(3)]
[JsonPropertyName("index_references")]
public List<VectorizationIndexReference> IndexReferences { get; set; }
Property Value
LogEntries
The list of log entries associated with actions executed by the vectorization pipeline.
[JsonPropertyOrder(20)]
[JsonPropertyName("log")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<VectorizationLogEntry> LogEntries { get; set; }
Property Value
PipelineName
The resource name of the vectorization pipeline that generated the request.
[JsonPropertyOrder(17)]
[JsonPropertyName("pipeline_name")]
public string? PipelineName { get; set; }
Property Value
PipelineObjectId
The resource object id of the vectorization pipeline that generated the request.
[JsonPropertyOrder(18)]
[JsonPropertyName("pipeline_object_id")]
public string? PipelineObjectId { get; set; }
Property Value
Requests
The list of vectorization requests associated with the content identified by ContentIdentifier.
[JsonPropertyOrder(19)]
[JsonPropertyName("requests")]
public List<VectorizationRequest> Requests { get; set; }
Property Value
Methods
AddOrReplaceArtifact(VectorizationArtifact)
Adds or replaces a vectorization artifact associated with the vectorization state.
public void AddOrReplaceArtifact(VectorizationArtifact artifact)
Parameters
artifact
VectorizationArtifactThe VectorizationArtifact to be added or replaced.
AddOrReplaceIndexReferences(IList<string>)
Adds or replaces the list of vector index references associated with the vectorization state.
public void AddOrReplaceIndexReferences(IList<string> indexEntryIds)
Parameters
FromRequest(VectorizationRequest)
Creates a new VectorizationState instance based on a specified vectorization request.
public static VectorizationState FromRequest(VectorizationRequest request)
Parameters
request
VectorizationRequestThe VectorizationRequest instance for which the state is created.
Returns
- VectorizationState
The VectorizationState created from the request.
Log(IVectorizationStepHandler, string, string, string)
Adds a new generic log entry.
public void Log(IVectorizationStepHandler handler, string requestId, string messageId, string text)
Parameters
handler
IVectorizationStepHandlerThe vectorization step handler executing the action.
requestId
stringThe identifier of the vectorization request.
messageId
stringThe identifier of underlying message retrieved from the request source.
text
stringThe string content of the log entry.
LogHandlerEnd(IVectorizationStepHandler, string, string)
Adds a log entry marking the completion of handling.
public void LogHandlerEnd(IVectorizationStepHandler handler, string requestId, string messageId)
Parameters
handler
IVectorizationStepHandlerThe vectorization step handler executing the action.
requestId
stringThe identifier of the vectorization request.
messageId
stringThe identifier of underlying message retrieved from the request source.
LogHandlerError(IVectorizationStepHandler, string, string, Exception)
Adds a log entry for a handling exception.
public void LogHandlerError(IVectorizationStepHandler handler, string requestId, string messageId, Exception ex)
Parameters
handler
IVectorizationStepHandlerThe vectorization step handler executing the action.
requestId
stringThe identifier of the vectorization request.
messageId
stringThe identifier of underlying message retrieved from the request source.
ex
ExceptionThe exception being logged.
LogHandlerStart(IVectorizationStepHandler, string, string)
Adds a log entry marking the start of handling.
public void LogHandlerStart(IVectorizationStepHandler handler, string requestId, string messageId)
Parameters
handler
IVectorizationStepHandlerThe vectorization step handler executing the action.
requestId
stringThe identifier of the vectorization request.
messageId
stringThe identifier of underlying message retrieved from the request source.
UpdateRequest(VectorizationRequest)
Adds a vectorization request to the list of requests if it is not already there.
public void UpdateRequest(VectorizationRequest request)
Parameters
request
VectorizationRequestThe VectorizationRequest being added.