Class RunStep.Builder
-
- All Implemented Interfaces:
public final class RunStep.BuilderA builder for RunStep.
-
-
Method Summary
Modifier and Type Method Description final RunStep.Builderid(String id)The identifier of the run step, which can be referenced in API endpoints. final RunStep.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final RunStep.BuilderassistantId(String assistantId)The ID of the assistant associated with the run step. final RunStep.BuilderassistantId(JsonField<String> assistantId)Sets Builder.assistantId to an arbitrary JSON value. final RunStep.BuildercancelledAt(Long cancelledAt)The Unix timestamp (in seconds) for when the run step was cancelled. final RunStep.BuildercancelledAt(Long cancelledAt)Alias for Builder.cancelledAt. final RunStep.BuildercancelledAt(Optional<Long> cancelledAt)Alias for calling Builder.cancelledAt with cancelledAt.orElse(null).final RunStep.BuildercancelledAt(JsonField<Long> cancelledAt)Sets Builder.cancelledAt to an arbitrary JSON value. final RunStep.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the run step completed. final RunStep.BuildercompletedAt(Long completedAt)Alias for Builder.completedAt. final RunStep.BuildercompletedAt(Optional<Long> completedAt)Alias for calling Builder.completedAt with completedAt.orElse(null).final RunStep.BuildercompletedAt(JsonField<Long> completedAt)Sets Builder.completedAt to an arbitrary JSON value. final RunStep.BuildercreatedAt(Long createdAt)The Unix timestamp (in seconds) for when the run step was created. final RunStep.BuildercreatedAt(JsonField<Long> createdAt)Sets Builder.createdAt to an arbitrary JSON value. final RunStep.BuilderexpiredAt(Long expiredAt)The Unix timestamp (in seconds) for when the run step expired. final RunStep.BuilderexpiredAt(Long expiredAt)Alias for Builder.expiredAt. final RunStep.BuilderexpiredAt(Optional<Long> expiredAt)Alias for calling Builder.expiredAt with expiredAt.orElse(null).final RunStep.BuilderexpiredAt(JsonField<Long> expiredAt)Sets Builder.expiredAt to an arbitrary JSON value. final RunStep.BuilderfailedAt(Long failedAt)The Unix timestamp (in seconds) for when the run step failed. final RunStep.BuilderfailedAt(Long failedAt)Alias for Builder.failedAt. final RunStep.BuilderfailedAt(Optional<Long> failedAt)Alias for calling Builder.failedAt with failedAt.orElse(null).final RunStep.BuilderfailedAt(JsonField<Long> failedAt)Sets Builder.failedAt to an arbitrary JSON value. final RunStep.BuilderlastError(RunStep.LastError lastError)The last error associated with this run step. final RunStep.BuilderlastError(Optional<RunStep.LastError> lastError)Alias for calling Builder.lastError with lastError.orElse(null).final RunStep.BuilderlastError(JsonField<RunStep.LastError> lastError)Sets Builder.lastError to an arbitrary JSON value. final RunStep.Buildermetadata(RunStep.Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final RunStep.Buildermetadata(Optional<RunStep.Metadata> metadata)Alias for calling Builder.metadata with metadata.orElse(null).final RunStep.Buildermetadata(JsonField<RunStep.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final RunStep.Builderobject_(JsonValue object_)Sets the field to an arbitrary JSON value. final RunStep.BuilderrunId(String runId)The ID of the run that this run step is a part of. final RunStep.BuilderrunId(JsonField<String> runId)Sets Builder.runId to an arbitrary JSON value. final RunStep.Builderstatus(RunStep.Status status)The status of the run step, which can be either in_progress,cancelled,failed,completed, orexpired.final RunStep.Builderstatus(JsonField<RunStep.Status> status)Sets Builder.status to an arbitrary JSON value. final RunStep.BuilderstepDetails(RunStep.StepDetails stepDetails)The details of the run step. final RunStep.BuilderstepDetails(JsonField<RunStep.StepDetails> stepDetails)Sets Builder.stepDetails to an arbitrary JSON value. final RunStep.BuilderstepDetails(MessageCreationStepDetails messageCreation)Alias for calling stepDetails with StepDetails.ofMessageCreation(messageCreation).final RunStep.BuilderstepDetails(ToolCallsStepDetails toolCalls)Alias for calling stepDetails with StepDetails.ofToolCalls(toolCalls).final RunStep.BuildermessageCreationStepDetails(MessageCreationStepDetails.MessageCreation messageCreation)Alias for calling stepDetails with the following: MessageCreationStepDetails.builder() .messageCreation(messageCreation) .build()final RunStep.BuildertoolCallsStepDetails(List<ToolCall> toolCalls)Alias for calling stepDetails with the following: ToolCallsStepDetails.builder() .toolCalls(toolCalls) .build()final RunStep.BuilderthreadId(String threadId)The ID of the thread that was run. final RunStep.BuilderthreadId(JsonField<String> threadId)Sets Builder.threadId to an arbitrary JSON value. final RunStep.Buildertype(RunStep.Type type)The type of run step, which can be either message_creationortool_calls.final RunStep.Buildertype(JsonField<RunStep.Type> type)Sets Builder.type to an arbitrary JSON value. final RunStep.Builderusage(RunStep.Usage usage)Usage statistics related to the run step. final RunStep.Builderusage(Optional<RunStep.Usage> usage)Alias for calling Builder.usage with usage.orElse(null).final RunStep.Builderusage(JsonField<RunStep.Usage> usage)Sets Builder.usage to an arbitrary JSON value. final RunStep.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final RunStep.BuilderputAdditionalProperty(String key, JsonValue value)final RunStep.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final RunStep.BuilderremoveAdditionalProperty(String key)final RunStep.BuilderremoveAllAdditionalProperties(Set<String> keys)final RunStepbuild()Returns an immutable instance of RunStep. -
-
Method Detail
-
id
final RunStep.Builder id(String id)
The identifier of the run step, which can be referenced in API endpoints.
-
id
final RunStep.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
assistantId
final RunStep.Builder assistantId(String assistantId)
The ID of the assistant associated with the run step.
-
assistantId
final RunStep.Builder assistantId(JsonField<String> assistantId)
Sets Builder.assistantId to an arbitrary JSON value.
You should usually call Builder.assistantId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cancelledAt
final RunStep.Builder cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled.
-
cancelledAt
final RunStep.Builder cancelledAt(Long cancelledAt)
Alias for Builder.cancelledAt.
This unboxed primitive overload exists for backwards compatibility.
-
cancelledAt
final RunStep.Builder cancelledAt(Optional<Long> cancelledAt)
Alias for calling Builder.cancelledAt with
cancelledAt.orElse(null).
-
cancelledAt
final RunStep.Builder cancelledAt(JsonField<Long> cancelledAt)
Sets Builder.cancelledAt to an arbitrary JSON value.
You should usually call Builder.cancelledAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
completedAt
final RunStep.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the run step completed.
-
completedAt
final RunStep.Builder completedAt(Long completedAt)
Alias for Builder.completedAt.
This unboxed primitive overload exists for backwards compatibility.
-
completedAt
final RunStep.Builder completedAt(Optional<Long> completedAt)
Alias for calling Builder.completedAt with
completedAt.orElse(null).
-
completedAt
final RunStep.Builder completedAt(JsonField<Long> completedAt)
Sets Builder.completedAt to an arbitrary JSON value.
You should usually call Builder.completedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final RunStep.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the run step was created.
-
createdAt
final RunStep.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expiredAt
final RunStep.Builder expiredAt(Long expiredAt)
The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
-
expiredAt
final RunStep.Builder expiredAt(Long expiredAt)
Alias for Builder.expiredAt.
This unboxed primitive overload exists for backwards compatibility.
-
expiredAt
final RunStep.Builder expiredAt(Optional<Long> expiredAt)
Alias for calling Builder.expiredAt with
expiredAt.orElse(null).
-
expiredAt
final RunStep.Builder expiredAt(JsonField<Long> expiredAt)
Sets Builder.expiredAt to an arbitrary JSON value.
You should usually call Builder.expiredAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
failedAt
final RunStep.Builder failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the run step failed.
-
failedAt
final RunStep.Builder failedAt(Long failedAt)
Alias for Builder.failedAt.
This unboxed primitive overload exists for backwards compatibility.
-
failedAt
final RunStep.Builder failedAt(Optional<Long> failedAt)
Alias for calling Builder.failedAt with
failedAt.orElse(null).
-
failedAt
final RunStep.Builder failedAt(JsonField<Long> failedAt)
Sets Builder.failedAt to an arbitrary JSON value.
You should usually call Builder.failedAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
lastError
final RunStep.Builder lastError(RunStep.LastError lastError)
The last error associated with this run step. Will be
nullif there are no errors.
-
lastError
final RunStep.Builder lastError(Optional<RunStep.LastError> lastError)
Alias for calling Builder.lastError with
lastError.orElse(null).
-
lastError
final RunStep.Builder lastError(JsonField<RunStep.LastError> lastError)
Sets Builder.lastError to an arbitrary JSON value.
You should usually call Builder.lastError with a well-typed LastError value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
metadata
final RunStep.Builder metadata(RunStep.Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final RunStep.Builder metadata(Optional<RunStep.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null).
-
metadata
final RunStep.Builder metadata(JsonField<RunStep.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final RunStep.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("thread.run.step")This method is primarily for setting the field to an undocumented or not yet supported value.
-
runId
final RunStep.Builder runId(String runId)
The ID of the run that this run step is a part of.
-
runId
final RunStep.Builder runId(JsonField<String> runId)
Sets Builder.runId to an arbitrary JSON value.
You should usually call Builder.runId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final RunStep.Builder status(RunStep.Status status)
The status of the run step, which can be either
in_progress,cancelled,failed,completed, orexpired.
-
status
final RunStep.Builder status(JsonField<RunStep.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
stepDetails
final RunStep.Builder stepDetails(RunStep.StepDetails stepDetails)
The details of the run step.
-
stepDetails
final RunStep.Builder stepDetails(JsonField<RunStep.StepDetails> stepDetails)
Sets Builder.stepDetails to an arbitrary JSON value.
You should usually call Builder.stepDetails with a well-typed StepDetails value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
stepDetails
final RunStep.Builder stepDetails(MessageCreationStepDetails messageCreation)
Alias for calling stepDetails with
StepDetails.ofMessageCreation(messageCreation).
-
stepDetails
final RunStep.Builder stepDetails(ToolCallsStepDetails toolCalls)
Alias for calling stepDetails with
StepDetails.ofToolCalls(toolCalls).
-
messageCreationStepDetails
final RunStep.Builder messageCreationStepDetails(MessageCreationStepDetails.MessageCreation messageCreation)
Alias for calling stepDetails with the following:
MessageCreationStepDetails.builder() .messageCreation(messageCreation) .build()
-
toolCallsStepDetails
final RunStep.Builder toolCallsStepDetails(List<ToolCall> toolCalls)
Alias for calling stepDetails with the following:
ToolCallsStepDetails.builder() .toolCalls(toolCalls) .build()
-
threadId
final RunStep.Builder threadId(String threadId)
The ID of the thread that was run.
-
threadId
final RunStep.Builder threadId(JsonField<String> threadId)
Sets Builder.threadId to an arbitrary JSON value.
You should usually call Builder.threadId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final RunStep.Builder type(RunStep.Type type)
The type of run step, which can be either
message_creationortool_calls.
-
type
final RunStep.Builder type(JsonField<RunStep.Type> type)
Sets Builder.type to an arbitrary JSON value.
You should usually call Builder.type with a well-typed Type value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
usage
final RunStep.Builder usage(RunStep.Usage usage)
Usage statistics related to the run step. This value will be
nullwhile the run step's status isin_progress.
-
usage
final RunStep.Builder usage(Optional<RunStep.Usage> usage)
Alias for calling Builder.usage with
usage.orElse(null).
-
usage
final RunStep.Builder usage(JsonField<RunStep.Usage> usage)
Sets Builder.usage to an arbitrary JSON value.
You should usually call Builder.usage with a well-typed Usage value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RunStep.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RunStep.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RunStep.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RunStep.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RunStep.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RunStep build()
Returns an immutable instance of RunStep.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .assistantId() .cancelledAt() .completedAt() .createdAt() .expiredAt() .failedAt() .lastError() .metadata() .runId() .status() .stepDetails() .threadId() .type() .usage()
-
-
-
-