Class AssistantUpdateParams.Builder
-
- All Implemented Interfaces:
public final class AssistantUpdateParams.Builder
A builder for AssistantUpdateParams.
-
-
Method Summary
-
-
Method Detail
-
assistantId
final AssistantUpdateParams.Builder assistantId(String assistantId)
-
description
final AssistantUpdateParams.Builder description(String description)
The description of the assistant. The maximum length is 512 characters.
-
description
final AssistantUpdateParams.Builder description(Optional<String> description)
The description of the assistant. The maximum length is 512 characters.
-
description
final AssistantUpdateParams.Builder description(JsonField<String> description)
The description of the assistant. The maximum length is 512 characters.
-
instructions
final AssistantUpdateParams.Builder instructions(String instructions)
The system instructions that the assistant uses. The maximum length is 256,000 characters.
-
instructions
final AssistantUpdateParams.Builder instructions(Optional<String> instructions)
The system instructions that the assistant uses. The maximum length is 256,000 characters.
-
instructions
final AssistantUpdateParams.Builder instructions(JsonField<String> instructions)
The system instructions that the assistant uses. The maximum length is 256,000 characters.
-
metadata
final AssistantUpdateParams.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 AssistantUpdateParams.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 AssistantUpdateParams.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 AssistantUpdateParams.Builder model(AssistantUpdateParams.Model model)
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
-
model
final AssistantUpdateParams.Builder model(JsonField<AssistantUpdateParams.Model> model)
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
-
model
final AssistantUpdateParams.Builder model(String value)
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
-
name
final AssistantUpdateParams.Builder name(String name)
The name of the assistant. The maximum length is 256 characters.
-
name
final AssistantUpdateParams.Builder name(Optional<String> name)
The name of the assistant. The maximum length is 256 characters.
-
name
final AssistantUpdateParams.Builder name(JsonField<String> name)
The name of the assistant. The maximum length is 256 characters.
-
reasoningEffort
final AssistantUpdateParams.Builder reasoningEffort(ReasoningEffort reasoningEffort)
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
-
reasoningEffort
final AssistantUpdateParams.Builder reasoningEffort(Optional<ReasoningEffort> reasoningEffort)
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
-
reasoningEffort
final AssistantUpdateParams.Builder reasoningEffort(JsonField<ReasoningEffort> reasoningEffort)
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
-
responseFormat
final AssistantUpdateParams.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_tokens
or the conversation exceeded the max context length.
-
responseFormat
final AssistantUpdateParams.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_tokens
or the conversation exceeded the max context length.
-
responseFormat
final AssistantUpdateParams.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_tokens
or the conversation exceeded the max context length.
-
responseFormat
final AssistantUpdateParams.Builder responseFormat(ResponseFormatText responseFormatText)
Default response format. Used to generate text responses.
-
responseFormat
final AssistantUpdateParams.Builder responseFormat(ResponseFormatJsonObject responseFormatJsonObject)
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
-
responseFormat
final AssistantUpdateParams.Builder responseFormat(ResponseFormatJsonSchema responseFormatJsonSchema)
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
responseFormatJsonValue
final AssistantUpdateParams.Builder responseFormatJsonValue()
auto
is the default value
-
temperature
final AssistantUpdateParams.Builder temperature(Double temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
-
temperature
final AssistantUpdateParams.Builder temperature(Double temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
-
temperature
final AssistantUpdateParams.Builder temperature(Optional<Double> temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
-
temperature
final AssistantUpdateParams.Builder temperature(JsonField<Double> temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
-
toolResources
final AssistantUpdateParams.Builder toolResources(AssistantUpdateParams.ToolResources toolResources)
A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the
code_interpreter
tool requires a list of file IDs, while thefile_search
tool requires a list of vector store IDs.
-
toolResources
final AssistantUpdateParams.Builder toolResources(Optional<AssistantUpdateParams.ToolResources> toolResources)
A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the
code_interpreter
tool requires a list of file IDs, while thefile_search
tool requires a list of vector store IDs.
-
toolResources
final AssistantUpdateParams.Builder toolResources(JsonField<AssistantUpdateParams.ToolResources> toolResources)
A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the
code_interpreter
tool requires a list of file IDs, while thefile_search
tool requires a list of vector store IDs.
-
tools
final AssistantUpdateParams.Builder tools(List<AssistantTool> tools)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
tools
final AssistantUpdateParams.Builder tools(JsonField<List<AssistantTool>> tools)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
addTool
final AssistantUpdateParams.Builder addTool(AssistantTool tool)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
addTool
final AssistantUpdateParams.Builder addTool(CodeInterpreterTool codeInterpreter)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
addTool
final AssistantUpdateParams.Builder addTool(FileSearchTool fileSearch)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
addTool
final AssistantUpdateParams.Builder addTool(FunctionTool function)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
addFunctionTool
final AssistantUpdateParams.Builder addFunctionTool(FunctionDefinition function)
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types
code_interpreter
,file_search
, orfunction
.
-
topP
final AssistantUpdateParams.Builder topP(Double topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
-
topP
final AssistantUpdateParams.Builder topP(Double topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
-
topP
final AssistantUpdateParams.Builder topP(Optional<Double> topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
-
topP
final AssistantUpdateParams.Builder topP(JsonField<Double> topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
-
additionalBodyProperties
final AssistantUpdateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final AssistantUpdateParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final AssistantUpdateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final AssistantUpdateParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final AssistantUpdateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final AssistantUpdateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final AssistantUpdateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final AssistantUpdateParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final AssistantUpdateParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final AssistantUpdateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final AssistantUpdateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final AssistantUpdateParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final AssistantUpdateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final AssistantUpdateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final AssistantUpdateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final AssistantUpdateParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final AssistantUpdateParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final AssistantUpdateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final AssistantUpdateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final AssistantUpdateParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final AssistantUpdateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final AssistantUpdateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final AssistantUpdateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final AssistantUpdateParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final AssistantUpdateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final AssistantUpdateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final AssistantUpdateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final AssistantUpdateParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final AssistantUpdateParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final AssistantUpdateParams build()
-
-
-
-