Table of Contents

Class VectorizationRequest

Namespace
FoundationaLLM.Common.Models.ResourceProviders.Vectorization
Assembly
FoundationaLLM.Common.dll

Represents a vectorization request.

public class VectorizationRequest : ResourceBase
Inheritance
VectorizationRequest
Inherited Members
Extension Methods

Constructors

VectorizationRequest()

Set default property values.

public VectorizationRequest()

Properties

Complete

Indicates whether the vectorization process is complete or not.

[JsonIgnore]
public bool Complete { get; }

Property Value

bool

CompletedSteps

The ordered list of the names of the vectorization steps that were already completed.

[JsonPropertyOrder(201)]
[JsonPropertyName("completed_steps")]
public List<string> CompletedSteps { get; set; }

Property Value

List<string>

ContentIdentifier

The ContentIdentifier object identifying the content being vectorized.

[JsonPropertyOrder(2)]
[JsonPropertyName("content_identifier")]
public required ContentIdentifier ContentIdentifier { get; set; }

Property Value

ContentIdentifier

CurrentStep

The current step of the vectorization request.

[JsonPropertyOrder(203)]
[JsonPropertyName("current_step")]
public string? CurrentStep { get; }

Property Value

string

ErrorCount

The number of times the processing of the current step resulted in an error.

[JsonPropertyOrder(204)]
[JsonPropertyName("error_count")]
public int ErrorCount { get; set; }

Property Value

int

ErrorMessages

Error messages that occurred during the processing of the vectorization request.

[JsonPropertyOrder(103)]
[JsonPropertyName("error_messages")]
public List<string> ErrorMessages { get; set; }

Property Value

List<string>

ExecutionEnd

The time when the vectorization request finished being processed.

[JsonPropertyOrder(102)]
[JsonPropertyName("execution_end")]
public DateTime? ExecutionEnd { get; set; }

Property Value

DateTime?

ExecutionStart

The time when the vectorization request started being processed.

[JsonPropertyOrder(101)]
[JsonPropertyName("execution_start")]
public DateTime? ExecutionStart { get; set; }

Property Value

DateTime?

Expired

Identifies whether the request is expired or not. Vectorization requests that had no successful step executions in the last 10 days are considered expired.

public bool Expired { get; }

Property Value

bool

this[string]

Gets the vectorization pipeline step that has a specific identifier.

public VectorizationStep? this[string step] { get; }

Parameters

step string

The identifier of the vectorization pipeline step.

Property Value

VectorizationStep

An instances of the VectorizationStep class with the details required by the step handler.

LastSuccessfulStepTime

The time of the last successful processing of a step.

[JsonPropertyOrder(206)]
[JsonPropertyName("last_successful_step_time")]
public DateTime LastSuccessfulStepTime { get; set; }

Property Value

DateTime

PipelineExecutionId

If run in the context of a pipeline, the unique identifier of the pipeline execution.

[JsonPropertyOrder(52)]
[JsonPropertyName("pipeline_execution_id")]
public string? PipelineExecutionId { get; set; }

Property Value

string

PipelineName

If run in the context of a pipeline, the name of the pipeline resource being executed.

[JsonPropertyOrder(51)]
[JsonPropertyName("pipeline_name")]
public string? PipelineName { get; set; }

Property Value

string

PipelineObjectId

If run in the context of a pipeline, the object id of the pipeline resource being executed.

[JsonPropertyOrder(50)]
[JsonPropertyName("pipeline_object_id")]
public string? PipelineObjectId { get; set; }

Property Value

string

ProcessingState

The VectorizationProcessingState indicating the current state of the vectorization request.

[JsonPropertyOrder(100)]
[JsonPropertyName("processing_state")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public VectorizationProcessingState ProcessingState { get; set; }

Property Value

VectorizationProcessingState

ProcessingType

The VectorizationProcessingType indicating how should the request be processed.

[JsonPropertyOrder(3)]
[JsonPropertyName("processing_type")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public required VectorizationProcessingType ProcessingType { get; set; }

Property Value

VectorizationProcessingType

RemainingSteps

The ordered list of the names of the vectorization steps that still need to be executed.

[JsonPropertyOrder(202)]
[JsonPropertyName("remaining_steps")]
public List<string> RemainingSteps { get; set; }

Property Value

List<string>

ResourceFilePath

Path to the vectorization request resource file.

[JsonPropertyOrder(1)]
[JsonPropertyName("resource_filepath")]
public string? ResourceFilePath { get; set; }

Property Value

string

RunningOperations

A dictionary of running operation identifiers indexed by step name. Some steps can be executed via long-running operations that required the persistence of operation identifiers.

[JsonPropertyOrder(205)]
[JsonPropertyName("running_operations")]
public Dictionary<string, VectorizationLongRunningOperation> RunningOperations { get; set; }

Property Value

Dictionary<string, VectorizationLongRunningOperation>

Steps

The list of vectorization steps requested by the vectorization request. Vectorization steps are identified by unique names like "extract", "partition", "embed", "index", etc.

[JsonPropertyOrder(200)]
[JsonPropertyName("steps")]
public required List<VectorizationStep> Steps { get; set; }

Property Value

List<VectorizationStep>

Methods

MoveToNextStep()

Advances the vectorization pipeline to the next step. The newly set current step is used to choose the next request source to which the vectorization request will be added.

public (string PreviousStep, string? CurrentStep) MoveToNextStep()

Returns

(string PreviousStep, string CurrentStep)

A tuple containing the name of the previous step and the name of the next step to execute if there are steps left to execute or null if the processing of the vectorization request is complete.