Class Run.Builder
-
- All Implemented Interfaces:
public final class Run.BuilderA builder for Run.
-
-
Method Summary
Modifier and Type Method Description final Run.Builderid(String id)The identifier, which can be referenced in API endpoints. final Run.Builderid(JsonField<String> id)The identifier, which can be referenced in API endpoints. final Run.BuilderassistantId(String assistantId)The ID of the assistant used for execution of this run. final Run.BuilderassistantId(JsonField<String> assistantId)The ID of the assistant used for execution of this run. final Run.BuildercancelledAt(Long cancelledAt)The Unix timestamp (in seconds) for when the run was cancelled. final Run.BuildercancelledAt(Long cancelledAt)The Unix timestamp (in seconds) for when the run was cancelled. final Run.BuildercancelledAt(Optional<Long> cancelledAt)The Unix timestamp (in seconds) for when the run was cancelled. final Run.BuildercancelledAt(JsonField<Long> cancelledAt)The Unix timestamp (in seconds) for when the run was cancelled. final Run.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the run was completed. final Run.BuildercompletedAt(Long completedAt)The Unix timestamp (in seconds) for when the run was completed. final Run.BuildercompletedAt(Optional<Long> completedAt)The Unix timestamp (in seconds) for when the run was completed. final Run.BuildercompletedAt(JsonField<Long> completedAt)The Unix timestamp (in seconds) for when the run was completed. final Run.BuildercreatedAt(Long createdAt)The Unix timestamp (in seconds) for when the run was created. final Run.BuildercreatedAt(JsonField<Long> createdAt)The Unix timestamp (in seconds) for when the run was created. final Run.BuilderexpiresAt(Long expiresAt)The Unix timestamp (in seconds) for when the run will expire. final Run.BuilderexpiresAt(Long expiresAt)The Unix timestamp (in seconds) for when the run will expire. final Run.BuilderexpiresAt(Optional<Long> expiresAt)The Unix timestamp (in seconds) for when the run will expire. final Run.BuilderexpiresAt(JsonField<Long> expiresAt)The Unix timestamp (in seconds) for when the run will expire. final Run.BuilderfailedAt(Long failedAt)The Unix timestamp (in seconds) for when the run failed. final Run.BuilderfailedAt(Long failedAt)The Unix timestamp (in seconds) for when the run failed. final Run.BuilderfailedAt(Optional<Long> failedAt)The Unix timestamp (in seconds) for when the run failed. final Run.BuilderfailedAt(JsonField<Long> failedAt)The Unix timestamp (in seconds) for when the run failed. final Run.BuilderincompleteDetails(Run.IncompleteDetails incompleteDetails)Details on why the run is incomplete. final Run.BuilderincompleteDetails(Optional<Run.IncompleteDetails> incompleteDetails)Details on why the run is incomplete. final Run.BuilderincompleteDetails(JsonField<Run.IncompleteDetails> incompleteDetails)Details on why the run is incomplete. final Run.Builderinstructions(String instructions)The instructions that the assistant used for this run. final Run.Builderinstructions(JsonField<String> instructions)The instructions that the assistant used for this run. final Run.BuilderlastError(Run.LastError lastError)The last error associated with this run. final Run.BuilderlastError(Optional<Run.LastError> lastError)The last error associated with this run. final Run.BuilderlastError(JsonField<Run.LastError> lastError)The last error associated with this run. final Run.BuildermaxCompletionTokens(Long maxCompletionTokens)The maximum number of completion tokens specified to have been used over the course of the run. final Run.BuildermaxCompletionTokens(Long maxCompletionTokens)The maximum number of completion tokens specified to have been used over the course of the run. final Run.BuildermaxCompletionTokens(Optional<Long> maxCompletionTokens)The maximum number of completion tokens specified to have been used over the course of the run. final Run.BuildermaxCompletionTokens(JsonField<Long> maxCompletionTokens)The maximum number of completion tokens specified to have been used over the course of the run. final Run.BuildermaxPromptTokens(Long maxPromptTokens)The maximum number of prompt tokens specified to have been used over the course of the run. final Run.BuildermaxPromptTokens(Long maxPromptTokens)The maximum number of prompt tokens specified to have been used over the course of the run. final Run.BuildermaxPromptTokens(Optional<Long> maxPromptTokens)The maximum number of prompt tokens specified to have been used over the course of the run. final Run.BuildermaxPromptTokens(JsonField<Long> maxPromptTokens)The maximum number of prompt tokens specified to have been used over the course of the run. final Run.Buildermetadata(Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final Run.Buildermetadata(Optional<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final Run.Buildermetadata(JsonField<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final Run.Buildermodel(String model)The model that the assistant used for this run. final Run.Buildermodel(JsonField<String> model)The model that the assistant used for this run. final Run.Builderobject_(JsonValue object_)The object type, which is always thread.run.final Run.BuilderparallelToolCalls(Boolean parallelToolCalls)Whether to enable parallel function calling during tool use. final Run.BuilderparallelToolCalls(JsonField<Boolean> parallelToolCalls)Whether to enable parallel function calling during tool use. final Run.BuilderrequiredAction(Run.RequiredAction requiredAction)Details on the action required to continue the run. final Run.BuilderrequiredAction(Optional<Run.RequiredAction> requiredAction)Details on the action required to continue the run. final Run.BuilderrequiredAction(JsonField<Run.RequiredAction> requiredAction)Details on the action required to continue the run. final Run.BuilderresponseFormat(AssistantResponseFormatOption responseFormat)Specifies the format that the model must output. final Run.BuilderresponseFormat(Optional<AssistantResponseFormatOption> responseFormat)Specifies the format that the model must output. final Run.BuilderresponseFormat(JsonField<AssistantResponseFormatOption> responseFormat)Specifies the format that the model must output. final Run.BuilderresponseFormat(ResponseFormatText responseFormatText)Specifies the format that the model must output. final Run.BuilderresponseFormat(ResponseFormatJsonObject responseFormatJsonObject)Specifies the format that the model must output. final Run.BuilderresponseFormat(ResponseFormatJsonSchema responseFormatJsonSchema)Specifies the format that the model must output. final Run.BuilderresponseFormatAuto()autois the default valuefinal Run.BuilderstartedAt(Long startedAt)The Unix timestamp (in seconds) for when the run was started. final Run.BuilderstartedAt(Long startedAt)The Unix timestamp (in seconds) for when the run was started. final Run.BuilderstartedAt(Optional<Long> startedAt)The Unix timestamp (in seconds) for when the run was started. final Run.BuilderstartedAt(JsonField<Long> startedAt)The Unix timestamp (in seconds) for when the run was started. final Run.Builderstatus(RunStatus status)The status of the run, which can be either queued,in_progress,requires_action,cancelling,cancelled,failed,completed,incomplete, orexpired.final Run.Builderstatus(JsonField<RunStatus> status)The status of the run, which can be either queued,in_progress,requires_action,cancelling,cancelled,failed,completed,incomplete, orexpired.final Run.BuilderthreadId(String threadId)The ID of the thread that was executed on as a part of this run. final Run.BuilderthreadId(JsonField<String> threadId)The ID of the thread that was executed on as a part of this run. final Run.BuildertoolChoice(AssistantToolChoiceOption toolChoice)Controls which (if any) tool is called by the model. final Run.BuildertoolChoice(Optional<AssistantToolChoiceOption> toolChoice)Controls which (if any) tool is called by the model. final Run.BuildertoolChoice(JsonField<AssistantToolChoiceOption> toolChoice)Controls which (if any) tool is called by the model. final Run.BuildertoolChoice(AssistantToolChoiceOption.Auto auto)nonemeans the model will not call any tools and instead generates a message.final Run.BuildertoolChoice(AssistantToolChoice assistantToolChoice)Specifies a tool the model should use. final Run.Buildertools(List<AssistantTool> tools)The list of tools that the assistant used for this run. final Run.Buildertools(JsonField<List<AssistantTool>> tools)The list of tools that the assistant used for this run. final Run.BuilderaddTool(AssistantTool tool)The list of tools that the assistant used for this run. final Run.BuilderaddTool(CodeInterpreterTool codeInterpreter)The list of tools that the assistant used for this run. final Run.BuilderaddTool(FileSearchTool fileSearch)The list of tools that the assistant used for this run. final Run.BuilderaddTool(FunctionTool function)The list of tools that the assistant used for this run. final Run.BuilderaddFunctionTool(FunctionDefinition function)The list of tools that the assistant used for this run. final Run.BuildertruncationStrategy(Run.TruncationStrategy truncationStrategy)Controls for how a thread will be truncated prior to the run. final Run.BuildertruncationStrategy(Optional<Run.TruncationStrategy> truncationStrategy)Controls for how a thread will be truncated prior to the run. final Run.BuildertruncationStrategy(JsonField<Run.TruncationStrategy> truncationStrategy)Controls for how a thread will be truncated prior to the run. final Run.Builderusage(Run.Usage usage)Usage statistics related to the run. final Run.Builderusage(Optional<Run.Usage> usage)Usage statistics related to the run. final Run.Builderusage(JsonField<Run.Usage> usage)Usage statistics related to the run. final Run.Buildertemperature(Double temperature)The sampling temperature used for this run. final Run.Buildertemperature(Double temperature)The sampling temperature used for this run. final Run.Buildertemperature(Optional<Double> temperature)The sampling temperature used for this run. final Run.Buildertemperature(JsonField<Double> temperature)The sampling temperature used for this run. final Run.BuildertopP(Double topP)The nucleus sampling value used for this run. final Run.BuildertopP(Double topP)The nucleus sampling value used for this run. final Run.BuildertopP(Optional<Double> topP)The nucleus sampling value used for this run. final Run.BuildertopP(JsonField<Double> topP)The nucleus sampling value used for this run. final Run.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Run.BuilderputAdditionalProperty(String key, JsonValue value)final Run.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Run.BuilderremoveAdditionalProperty(String key)final Run.BuilderremoveAllAdditionalProperties(Set<String> keys)final Runbuild()-
-
Method Detail
-
id
final Run.Builder id(String id)
The identifier, which can be referenced in API endpoints.
-
id
final Run.Builder id(JsonField<String> id)
The identifier, which can be referenced in API endpoints.
-
assistantId
final Run.Builder assistantId(String assistantId)
The ID of the assistant used for execution of this run.
-
assistantId
final Run.Builder assistantId(JsonField<String> assistantId)
The ID of the assistant used for execution of this run.
-
cancelledAt
final Run.Builder cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the run was cancelled.
-
cancelledAt
final Run.Builder cancelledAt(Long cancelledAt)
The Unix timestamp (in seconds) for when the run was cancelled.
-
cancelledAt
final Run.Builder cancelledAt(Optional<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run was cancelled.
-
cancelledAt
final Run.Builder cancelledAt(JsonField<Long> cancelledAt)
The Unix timestamp (in seconds) for when the run was cancelled.
-
completedAt
final Run.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the run was completed.
-
completedAt
final Run.Builder completedAt(Long completedAt)
The Unix timestamp (in seconds) for when the run was completed.
-
completedAt
final Run.Builder completedAt(Optional<Long> completedAt)
The Unix timestamp (in seconds) for when the run was completed.
-
completedAt
final Run.Builder completedAt(JsonField<Long> completedAt)
The Unix timestamp (in seconds) for when the run was completed.
-
createdAt
final Run.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the run was created.
-
createdAt
final Run.Builder createdAt(JsonField<Long> createdAt)
The Unix timestamp (in seconds) for when the run was created.
-
expiresAt
final Run.Builder expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the run will expire.
-
expiresAt
final Run.Builder expiresAt(Long expiresAt)
The Unix timestamp (in seconds) for when the run will expire.
-
expiresAt
final Run.Builder expiresAt(Optional<Long> expiresAt)
The Unix timestamp (in seconds) for when the run will expire.
-
expiresAt
final Run.Builder expiresAt(JsonField<Long> expiresAt)
The Unix timestamp (in seconds) for when the run will expire.
-
failedAt
final Run.Builder failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the run failed.
-
failedAt
final Run.Builder failedAt(Long failedAt)
The Unix timestamp (in seconds) for when the run failed.
-
failedAt
final Run.Builder failedAt(Optional<Long> failedAt)
The Unix timestamp (in seconds) for when the run failed.
-
failedAt
final Run.Builder failedAt(JsonField<Long> failedAt)
The Unix timestamp (in seconds) for when the run failed.
-
incompleteDetails
final Run.Builder incompleteDetails(Run.IncompleteDetails incompleteDetails)
Details on why the run is incomplete. Will be
nullif the run is not incomplete.
-
incompleteDetails
final Run.Builder incompleteDetails(Optional<Run.IncompleteDetails> incompleteDetails)
Details on why the run is incomplete. Will be
nullif the run is not incomplete.
-
incompleteDetails
final Run.Builder incompleteDetails(JsonField<Run.IncompleteDetails> incompleteDetails)
Details on why the run is incomplete. Will be
nullif the run is not incomplete.
-
instructions
final Run.Builder instructions(String instructions)
The instructions that the assistant used for this run.
-
instructions
final Run.Builder instructions(JsonField<String> instructions)
The instructions that the assistant used for this run.
-
lastError
final Run.Builder lastError(Run.LastError lastError)
The last error associated with this run. Will be
nullif there are no errors.
-
lastError
final Run.Builder lastError(Optional<Run.LastError> lastError)
The last error associated with this run. Will be
nullif there are no errors.
-
lastError
final Run.Builder lastError(JsonField<Run.LastError> lastError)
The last error associated with this run. Will be
nullif there are no errors.
-
maxCompletionTokens
final Run.Builder maxCompletionTokens(Long maxCompletionTokens)
The maximum number of completion tokens specified to have been used over the course of the run.
-
maxCompletionTokens
final Run.Builder maxCompletionTokens(Long maxCompletionTokens)
The maximum number of completion tokens specified to have been used over the course of the run.
-
maxCompletionTokens
final Run.Builder maxCompletionTokens(Optional<Long> maxCompletionTokens)
The maximum number of completion tokens specified to have been used over the course of the run.
-
maxCompletionTokens
final Run.Builder maxCompletionTokens(JsonField<Long> maxCompletionTokens)
The maximum number of completion tokens specified to have been used over the course of the run.
-
maxPromptTokens
final Run.Builder maxPromptTokens(Long maxPromptTokens)
The maximum number of prompt tokens specified to have been used over the course of the run.
-
maxPromptTokens
final Run.Builder maxPromptTokens(Long maxPromptTokens)
The maximum number of prompt tokens specified to have been used over the course of the run.
-
maxPromptTokens
final Run.Builder maxPromptTokens(Optional<Long> maxPromptTokens)
The maximum number of prompt tokens specified to have been used over the course of the run.
-
maxPromptTokens
final Run.Builder maxPromptTokens(JsonField<Long> maxPromptTokens)
The maximum number of prompt tokens specified to have been used over the course of the run.
-
metadata
final Run.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 Run.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 Run.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.
-
model
final Run.Builder model(String model)
The model that the assistant used for this run.
-
model
final Run.Builder model(JsonField<String> model)
The model that the assistant used for this run.
-
object_
final Run.Builder object_(JsonValue object_)
The object type, which is always
thread.run.
-
parallelToolCalls
final Run.Builder parallelToolCalls(Boolean parallelToolCalls)
Whether to enable parallel function calling during tool use.
-
parallelToolCalls
final Run.Builder parallelToolCalls(JsonField<Boolean> parallelToolCalls)
Whether to enable parallel function calling during tool use.
-
requiredAction
final Run.Builder requiredAction(Run.RequiredAction requiredAction)
Details on the action required to continue the run. Will be
nullif no action is required.
-
requiredAction
final Run.Builder requiredAction(Optional<Run.RequiredAction> requiredAction)
Details on the action required to continue the run. Will be
nullif no action is required.
-
requiredAction
final Run.Builder requiredAction(JsonField<Run.RequiredAction> requiredAction)
Details on the action required to continue the run. Will be
nullif no action is required.
-
responseFormat
final Run.Builder responseFormat(AssistantResponseFormatOption responseFormat)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormat
final Run.Builder responseFormat(Optional<AssistantResponseFormatOption> responseFormat)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormat
final Run.Builder responseFormat(JsonField<AssistantResponseFormatOption> responseFormat)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormat
final Run.Builder responseFormat(ResponseFormatText responseFormatText)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormat
final Run.Builder responseFormat(ResponseFormatJsonObject responseFormatJsonObject)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormat
final Run.Builder responseFormat(ResponseFormatJsonSchema responseFormatJsonSchema)
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 * Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106.Setting to
{ "type": "json_schema", "json_schema": {...} }enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }enables JSON mode, which ensures the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.
-
responseFormatAuto
final Run.Builder responseFormatAuto()
autois the default value
-
startedAt
final Run.Builder startedAt(Long startedAt)
The Unix timestamp (in seconds) for when the run was started.
-
startedAt
final Run.Builder startedAt(Long startedAt)
The Unix timestamp (in seconds) for when the run was started.
-
startedAt
final Run.Builder startedAt(Optional<Long> startedAt)
The Unix timestamp (in seconds) for when the run was started.
-
startedAt
final Run.Builder startedAt(JsonField<Long> startedAt)
The Unix timestamp (in seconds) for when the run was started.
-
status
final Run.Builder status(RunStatus status)
The status of the run, which can be either
queued,in_progress,requires_action,cancelling,cancelled,failed,completed,incomplete, orexpired.
-
status
final Run.Builder status(JsonField<RunStatus> status)
The status of the run, which can be either
queued,in_progress,requires_action,cancelling,cancelled,failed,completed,incomplete, orexpired.
-
threadId
final Run.Builder threadId(String threadId)
The ID of the thread that was executed on as a part of this run.
-
threadId
final Run.Builder threadId(JsonField<String> threadId)
The ID of the thread that was executed on as a part of this run.
-
toolChoice
final Run.Builder toolChoice(AssistantToolChoiceOption toolChoice)
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tools and instead generates a message.autois the default value and means the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools before responding to the user. Specifying a particular tool like{"type": "file_search"}or{"type": "function", "function": {"name": "my_function"}}forces the model to call that tool.
-
toolChoice
final Run.Builder toolChoice(Optional<AssistantToolChoiceOption> toolChoice)
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tools and instead generates a message.autois the default value and means the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools before responding to the user. Specifying a particular tool like{"type": "file_search"}or{"type": "function", "function": {"name": "my_function"}}forces the model to call that tool.
-
toolChoice
final Run.Builder toolChoice(JsonField<AssistantToolChoiceOption> toolChoice)
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tools and instead generates a message.autois the default value and means the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools before responding to the user. Specifying a particular tool like{"type": "file_search"}or{"type": "function", "function": {"name": "my_function"}}forces the model to call that tool.
-
toolChoice
final Run.Builder toolChoice(AssistantToolChoiceOption.Auto auto)
nonemeans the model will not call any tools and instead generates a message.automeans the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools before responding to the user.
-
toolChoice
final Run.Builder toolChoice(AssistantToolChoice assistantToolChoice)
Specifies a tool the model should use. Use to force the model to call a specific tool.
-
tools
final Run.Builder tools(List<AssistantTool> tools)
The list of tools that the assistant used for this run.
-
tools
final Run.Builder tools(JsonField<List<AssistantTool>> tools)
The list of tools that the assistant used for this run.
-
addTool
final Run.Builder addTool(AssistantTool tool)
The list of tools that the assistant used for this run.
-
addTool
final Run.Builder addTool(CodeInterpreterTool codeInterpreter)
The list of tools that the assistant used for this run.
-
addTool
final Run.Builder addTool(FileSearchTool fileSearch)
The list of tools that the assistant used for this run.
-
addTool
final Run.Builder addTool(FunctionTool function)
The list of tools that the assistant used for this run.
-
addFunctionTool
final Run.Builder addFunctionTool(FunctionDefinition function)
The list of tools that the assistant used for this run.
-
truncationStrategy
final Run.Builder truncationStrategy(Run.TruncationStrategy truncationStrategy)
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
-
truncationStrategy
final Run.Builder truncationStrategy(Optional<Run.TruncationStrategy> truncationStrategy)
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
-
truncationStrategy
final Run.Builder truncationStrategy(JsonField<Run.TruncationStrategy> truncationStrategy)
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
-
usage
final Run.Builder usage(Run.Usage usage)
Usage statistics related to the run. This value will be
nullif the run is not in a terminal state (i.e.in_progress,queued, etc.).
-
usage
final Run.Builder usage(Optional<Run.Usage> usage)
Usage statistics related to the run. This value will be
nullif the run is not in a terminal state (i.e.in_progress,queued, etc.).
-
usage
final Run.Builder usage(JsonField<Run.Usage> usage)
Usage statistics related to the run. This value will be
nullif the run is not in a terminal state (i.e.in_progress,queued, etc.).
-
temperature
final Run.Builder temperature(Double temperature)
The sampling temperature used for this run. If not set, defaults to 1.
-
temperature
final Run.Builder temperature(Double temperature)
The sampling temperature used for this run. If not set, defaults to 1.
-
temperature
final Run.Builder temperature(Optional<Double> temperature)
The sampling temperature used for this run. If not set, defaults to 1.
-
temperature
final Run.Builder temperature(JsonField<Double> temperature)
The sampling temperature used for this run. If not set, defaults to 1.
-
topP
final Run.Builder topP(Double topP)
The nucleus sampling value used for this run. If not set, defaults to 1.
-
topP
final Run.Builder topP(Double topP)
The nucleus sampling value used for this run. If not set, defaults to 1.
-
topP
final Run.Builder topP(Optional<Double> topP)
The nucleus sampling value used for this run. If not set, defaults to 1.
-
topP
final Run.Builder topP(JsonField<Double> topP)
The nucleus sampling value used for this run. If not set, defaults to 1.
-
additionalProperties
final Run.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Run.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Run.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Run.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Run.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-