Class RunStep.Builder
-
- All Implemented Interfaces:
public final class RunStep.Builder
A builder for RunStep.
-
-
Method Summary
Modifier and Type Method Description final RunStep.Builder
id(String id)
The identifier of the run step, which can be referenced in API endpoints. final RunStep.Builder
id(JsonField<String> id)
The identifier of the run step, which can be referenced in API endpoints. final RunStep.Builder
assistantId(String assistantId)
The ID of the assistant associated with the run step. final RunStep.Builder
assistantId(JsonField<String> assistantId)
The ID of the assistant associated with the run step. final RunStep.Builder
cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled. final RunStep.Builder
cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled. final RunStep.Builder
cancelledAt(Optional<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled. final RunStep.Builder
cancelledAt(JsonField<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled. final RunStep.Builder
completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the run step completed. final RunStep.Builder
completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the run step completed. final RunStep.Builder
completedAt(Optional<Long> completedAt)
The Unix timestamp (in seconds) for when the run step completed. final RunStep.Builder
completedAt(JsonField<Long> completedAt)
The Unix timestamp (in seconds) for when the run step completed. final RunStep.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the run step was created. final RunStep.Builder
createdAt(JsonField<Long> createdAt)
The Unix timestamp (in seconds) for when the run step was created. final RunStep.Builder
expiredAt(Long expiredAt)
The Unix timestamp (in seconds) for when the run step expired. final RunStep.Builder
expiredAt(Long expiredAt)
The Unix timestamp (in seconds) for when the run step expired. final RunStep.Builder
expiredAt(Optional<Long> expiredAt)
The Unix timestamp (in seconds) for when the run step expired. final RunStep.Builder
expiredAt(JsonField<Long> expiredAt)
The Unix timestamp (in seconds) for when the run step expired. final RunStep.Builder
failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the run step failed. final RunStep.Builder
failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the run step failed. final RunStep.Builder
failedAt(Optional<Long> failedAt)
The Unix timestamp (in seconds) for when the run step failed. final RunStep.Builder
failedAt(JsonField<Long> failedAt)
The Unix timestamp (in seconds) for when the run step failed. final RunStep.Builder
lastError(RunStep.LastError lastError)
The last error associated with this run step. final RunStep.Builder
lastError(Optional<RunStep.LastError> lastError)
The last error associated with this run step. final RunStep.Builder
lastError(JsonField<RunStep.LastError> lastError)
The last error associated with this run step. final RunStep.Builder
metadata(Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. final RunStep.Builder
metadata(Optional<Metadata> metadata)
Set of 16 key-value pairs that can be attached to an object. final RunStep.Builder
metadata(JsonField<Metadata> metadata)
Set of 16 key-value pairs that can be attached to an object. final RunStep.Builder
object_(JsonValue object_)
The object type, which is always thread.run.step
.final RunStep.Builder
runId(String runId)
The ID of the run that this run step is a part of. final RunStep.Builder
runId(JsonField<String> runId)
The ID of the run that this run step is a part of. final RunStep.Builder
status(RunStep.Status status)
The status of the run step, which can be either in_progress
,cancelled
,failed
,completed
, orexpired
.final RunStep.Builder
status(JsonField<RunStep.Status> status)
The status of the run step, which can be either in_progress
,cancelled
,failed
,completed
, orexpired
.final RunStep.Builder
stepDetails(RunStep.StepDetails stepDetails)
The details of the run step. final RunStep.Builder
stepDetails(JsonField<RunStep.StepDetails> stepDetails)
The details of the run step. final RunStep.Builder
stepDetails(MessageCreationStepDetails messageCreation)
Details of the message creation by the run step. final RunStep.Builder
stepDetails(ToolCallsStepDetails toolCalls)
Details of the tool call. final RunStep.Builder
messageCreationStepDetails(MessageCreationStepDetails.MessageCreation messageCreation)
Details of the message creation by the run step. final RunStep.Builder
toolCallsStepDetails(List<ToolCall> toolCalls)
Details of the tool call. final RunStep.Builder
threadId(String threadId)
The ID of the thread that was run. final RunStep.Builder
threadId(JsonField<String> threadId)
The ID of the thread that was run. final RunStep.Builder
type(RunStep.Type type)
The type of run step, which can be either message_creation
ortool_calls
.final RunStep.Builder
type(JsonField<RunStep.Type> type)
The type of run step, which can be either message_creation
ortool_calls
.final RunStep.Builder
usage(RunStep.Usage usage)
Usage statistics related to the run step. final RunStep.Builder
usage(Optional<RunStep.Usage> usage)
Usage statistics related to the run step. final RunStep.Builder
usage(JsonField<RunStep.Usage> usage)
Usage statistics related to the run step. final RunStep.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final RunStep.Builder
putAdditionalProperty(String key, JsonValue value)
final RunStep.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final RunStep.Builder
removeAdditionalProperty(String key)
final RunStep.Builder
removeAllAdditionalProperties(Set<String> keys)
final RunStep
build()
-
-
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)
The identifier of the run step, which can be referenced in API endpoints.
-
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)
The ID of the assistant associated with the run step.
-
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)
The Unix timestamp (in seconds) for when the run step was cancelled.
-
cancelledAt
final RunStep.Builder cancelledAt(Optional<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled.
-
cancelledAt
final RunStep.Builder cancelledAt(JsonField<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run step was cancelled.
-
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)
The Unix timestamp (in seconds) for when the run step completed.
-
completedAt
final RunStep.Builder completedAt(Optional<Long> completedAt)
The Unix timestamp (in seconds) for when the run step completed.
-
completedAt
final RunStep.Builder completedAt(JsonField<Long> completedAt)
The Unix timestamp (in seconds) for when the run step completed.
-
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)
The Unix timestamp (in seconds) for when the run step was created.
-
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)
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(Optional<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(JsonField<Long> expiredAt)
The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
-
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)
The Unix timestamp (in seconds) for when the run step failed.
-
failedAt
final RunStep.Builder failedAt(Optional<Long> failedAt)
The Unix timestamp (in seconds) for when the run step failed.
-
failedAt
final RunStep.Builder failedAt(JsonField<Long> failedAt)
The Unix timestamp (in seconds) for when the run step failed.
-
lastError
final RunStep.Builder lastError(RunStep.LastError lastError)
The last error associated with this run step. Will be
null
if there are no errors.
-
lastError
final RunStep.Builder lastError(Optional<RunStep.LastError> lastError)
The last error associated with this run step. Will be
null
if there are no errors.
-
lastError
final RunStep.Builder lastError(JsonField<RunStep.LastError> lastError)
The last error associated with this run step. Will be
null
if there are no errors.
-
metadata
final RunStep.Builder metadata(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<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(JsonField<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.
-
object_
final RunStep.Builder object_(JsonValue object_)
The object type, which is always
thread.run.step
.
-
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)
The ID of the run that this run step is a part of.
-
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)
The status of the run step, which can be either
in_progress
,cancelled
,failed
,completed
, orexpired
.
-
stepDetails
final RunStep.Builder stepDetails(RunStep.StepDetails stepDetails)
The details of the run step.
-
stepDetails
final RunStep.Builder stepDetails(JsonField<RunStep.StepDetails> stepDetails)
The details of the run step.
-
stepDetails
final RunStep.Builder stepDetails(MessageCreationStepDetails messageCreation)
Details of the message creation by the run step.
-
stepDetails
final RunStep.Builder stepDetails(ToolCallsStepDetails toolCalls)
Details of the tool call.
-
messageCreationStepDetails
final RunStep.Builder messageCreationStepDetails(MessageCreationStepDetails.MessageCreation messageCreation)
Details of the message creation by the run step.
-
toolCallsStepDetails
final RunStep.Builder toolCallsStepDetails(List<ToolCall> toolCalls)
Details of the tool call.
-
threadId
final RunStep.Builder threadId(String threadId)
The ID of the thread that was run.
-
threadId
final RunStep.Builder threadId(JsonField<String> threadId)
The ID of the thread that was run.
-
type
final RunStep.Builder type(RunStep.Type type)
The type of run step, which can be either
message_creation
ortool_calls
.
-
type
final RunStep.Builder type(JsonField<RunStep.Type> type)
The type of run step, which can be either
message_creation
ortool_calls
.
-
usage
final RunStep.Builder usage(RunStep.Usage usage)
Usage statistics related to the run step. This value will be
null
while the run step's status isin_progress
.
-
usage
final RunStep.Builder usage(Optional<RunStep.Usage> usage)
Usage statistics related to the run step. This value will be
null
while the run step's status isin_progress
.
-
usage
final RunStep.Builder usage(JsonField<RunStep.Usage> usage)
Usage statistics related to the run step. This value will be
null
while the run step's status isin_progress
.
-
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)
-
-
-
-