Class InputTokenCountParams.Body.Builder
-
- All Implemented Interfaces:
public final class InputTokenCountParams.Body.BuilderA builder for Body.
-
-
Method Summary
Modifier and Type Method Description final InputTokenCountParams.Body.Builderconversation(InputTokenCountParams.Conversation conversation)The conversation that this response belongs to. final InputTokenCountParams.Body.Builderconversation(Optional<InputTokenCountParams.Conversation> conversation)Alias for calling Builder.conversation with conversation.orElse(null).final InputTokenCountParams.Body.Builderconversation(JsonField<InputTokenCountParams.Conversation> conversation)Sets Builder.conversation to an arbitrary JSON value. final InputTokenCountParams.Body.Builderconversation(String id)Alias for calling conversation with Conversation.ofId(id).final InputTokenCountParams.Body.Builderconversation(BetaResponseConversationParam betaResponseConversationParam)Alias for calling conversation with Conversation.ofBetaResponseConversationParam(betaResponseConversationParam).final InputTokenCountParams.Body.Builderinput(InputTokenCountParams.Input input)Text, image, or file inputs to the model, used to generate a response final InputTokenCountParams.Body.Builderinput(Optional<InputTokenCountParams.Input> input)Alias for calling Builder.input with input.orElse(null).final InputTokenCountParams.Body.Builderinput(JsonField<InputTokenCountParams.Input> input)Sets Builder.input to an arbitrary JSON value. final InputTokenCountParams.Body.Builderinput(String string)Alias for calling input with Input.ofString(string).final InputTokenCountParams.Body.BuilderinputOfBetaResponseInputItems(List<BetaResponseInputItem> betaResponseInputItems)Alias for calling input with Input.ofBetaResponseInputItems(betaResponseInputItems).final InputTokenCountParams.Body.Builderinstructions(String instructions)A system (or developer) message inserted into the model's context. final InputTokenCountParams.Body.Builderinstructions(Optional<String> instructions)Alias for calling Builder.instructions with instructions.orElse(null).final InputTokenCountParams.Body.Builderinstructions(JsonField<String> instructions)Sets Builder.instructions to an arbitrary JSON value. final InputTokenCountParams.Body.Buildermodel(String model)Model ID used to generate the response, like gpt-4ooro3.final InputTokenCountParams.Body.Buildermodel(Optional<String> model)Alias for calling Builder.model with model.orElse(null).final InputTokenCountParams.Body.Buildermodel(JsonField<String> model)Sets Builder.model to an arbitrary JSON value. final InputTokenCountParams.Body.BuilderparallelToolCalls(Boolean parallelToolCalls)Whether to allow the model to run tool calls in parallel. final InputTokenCountParams.Body.BuilderparallelToolCalls(Boolean parallelToolCalls)Alias for Builder.parallelToolCalls. final InputTokenCountParams.Body.BuilderparallelToolCalls(Optional<Boolean> parallelToolCalls)Alias for calling Builder.parallelToolCalls with parallelToolCalls.orElse(null).final InputTokenCountParams.Body.BuilderparallelToolCalls(JsonField<Boolean> parallelToolCalls)Sets Builder.parallelToolCalls to an arbitrary JSON value. final InputTokenCountParams.Body.Builderpersonality(InputTokenCountParams.Personality personality)A model-owned style preset to apply to this request. final InputTokenCountParams.Body.Builderpersonality(JsonField<InputTokenCountParams.Personality> personality)Sets Builder.personality to an arbitrary JSON value. final InputTokenCountParams.Body.Builderpersonality(String value)Sets personality to an arbitrary String. final InputTokenCountParams.Body.BuilderpreviousResponseId(String previousResponseId)The unique ID of the previous response to the model. final InputTokenCountParams.Body.BuilderpreviousResponseId(Optional<String> previousResponseId)Alias for calling Builder.previousResponseId with previousResponseId.orElse(null).final InputTokenCountParams.Body.BuilderpreviousResponseId(JsonField<String> previousResponseId)Sets Builder.previousResponseId to an arbitrary JSON value. final InputTokenCountParams.Body.Builderreasoning(InputTokenCountParams.Reasoning reasoning)gpt-5 and o-series models only Configuration options for reasoning models. final InputTokenCountParams.Body.Builderreasoning(Optional<InputTokenCountParams.Reasoning> reasoning)Alias for calling Builder.reasoning with reasoning.orElse(null).final InputTokenCountParams.Body.Builderreasoning(JsonField<InputTokenCountParams.Reasoning> reasoning)Sets Builder.reasoning to an arbitrary JSON value. final InputTokenCountParams.Body.Buildertext(InputTokenCountParams.Text text)Configuration options for a text response from the model. final InputTokenCountParams.Body.Buildertext(Optional<InputTokenCountParams.Text> text)Alias for calling Builder.text with text.orElse(null).final InputTokenCountParams.Body.Buildertext(JsonField<InputTokenCountParams.Text> text)Sets Builder.text to an arbitrary JSON value. final InputTokenCountParams.Body.BuildertoolChoice(InputTokenCountParams.ToolChoice toolChoice)Controls which tool the model should use, if any. final InputTokenCountParams.Body.BuildertoolChoice(Optional<InputTokenCountParams.ToolChoice> toolChoice)Alias for calling Builder.toolChoice with toolChoice.orElse(null).final InputTokenCountParams.Body.BuildertoolChoice(JsonField<InputTokenCountParams.ToolChoice> toolChoice)Sets Builder.toolChoice to an arbitrary JSON value. final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceOptions betaToolChoiceOptions)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceOptions(betaToolChoiceOptions).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceAllowed betaToolChoiceAllowed)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceAllowed(betaToolChoiceAllowed).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceTypes betaToolChoiceTypes)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceTypes(betaToolChoiceTypes).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceFunction betaToolChoiceFunction)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceFunction(betaToolChoiceFunction).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceMcp betaToolChoiceMcp)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceMcp(betaToolChoiceMcp).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceCustom betaToolChoiceCustom)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceCustom(betaToolChoiceCustom).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceApplyPatch betaToolChoiceApplyPatch)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceApplyPatch(betaToolChoiceApplyPatch).final InputTokenCountParams.Body.BuildertoolChoice(BetaToolChoiceShell betaToolChoiceShell)Alias for calling toolChoice with ToolChoice.ofBetaToolChoiceShell(betaToolChoiceShell).final InputTokenCountParams.Body.BuildertoolChoiceBetaSpecificProgrammaticToolCallingParam()Alias for calling toolChoice with ToolChoice.ofBetaSpecificProgrammaticToolCallingParam().final InputTokenCountParams.Body.Buildertools(List<BetaTool> tools)An array of tools the model may call while generating a response. final InputTokenCountParams.Body.Buildertools(Optional<List<BetaTool>> tools)Alias for calling Builder.tools with tools.orElse(null).final InputTokenCountParams.Body.Buildertools(JsonField<List<BetaTool>> tools)Sets Builder.tools to an arbitrary JSON value. final InputTokenCountParams.Body.BuilderaddTool(BetaTool tool)Adds a single BetaTool to tools. final InputTokenCountParams.Body.BuilderaddTool(BetaFunctionTool function)Alias for calling addTool with BetaTool.ofFunction(function).final InputTokenCountParams.Body.BuilderaddTool(BetaFileSearchTool fileSearch)Alias for calling addTool with BetaTool.ofFileSearch(fileSearch).final InputTokenCountParams.Body.BuilderaddTool(BetaComputerTool computer)Alias for calling addTool with BetaTool.ofComputer(computer).final InputTokenCountParams.Body.BuilderaddTool(BetaComputerUsePreviewTool computerUsePreview)Alias for calling addTool with BetaTool.ofComputerUsePreview(computerUsePreview).final InputTokenCountParams.Body.BuilderaddTool(BetaWebSearchTool webSearch)Alias for calling addTool with BetaTool.ofWebSearch(webSearch).final InputTokenCountParams.Body.BuilderaddTool(BetaTool.Mcp mcp)Alias for calling addTool with BetaTool.ofMcp(mcp).final InputTokenCountParams.Body.BuilderaddTool(BetaTool.CodeInterpreter codeInterpreter)Alias for calling addTool with BetaTool.ofCodeInterpreter(codeInterpreter).final InputTokenCountParams.Body.BuilderaddTool(BetaTool.ImageGeneration imageGeneration)Alias for calling addTool with BetaTool.ofImageGeneration(imageGeneration).final InputTokenCountParams.Body.BuilderaddTool(BetaFunctionShellTool shell)Alias for calling addTool with BetaTool.ofShell(shell).final InputTokenCountParams.Body.BuilderaddTool(BetaCustomTool custom)Alias for calling addTool with BetaTool.ofCustom(custom).final InputTokenCountParams.Body.BuilderaddTool(BetaNamespaceTool namespace)Alias for calling addTool with BetaTool.ofNamespace(namespace).final InputTokenCountParams.Body.BuilderaddTool(BetaToolSearchTool toolSearch)Alias for calling addTool with BetaTool.ofToolSearch(toolSearch).final InputTokenCountParams.Body.BuilderaddTool(BetaWebSearchPreviewTool webSearchPreview)Alias for calling addTool with BetaTool.ofWebSearchPreview(webSearchPreview).final InputTokenCountParams.Body.BuilderaddTool(BetaApplyPatchTool applyPatch)Alias for calling addTool with BetaTool.ofApplyPatch(applyPatch).final InputTokenCountParams.Body.BuilderaddFileSearchTool(List<String> vectorStoreIds)Alias for calling addTool with the following: BetaFileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()final InputTokenCountParams.Body.BuilderaddMcpTool(String serverLabel)Alias for calling addTool with the following: BetaTool.Mcp.builder() .serverLabel(serverLabel) .build()final InputTokenCountParams.Body.BuilderaddCodeInterpreterTool(BetaTool.CodeInterpreter.Container container)Alias for calling addTool with the following: BetaTool.CodeInterpreter.builder() .container(container) .build()final InputTokenCountParams.Body.BuilderaddCodeInterpreterTool(String string)Alias for calling addCodeInterpreterTool with BetaTool.CodeInterpreter.Container.ofString(string).final InputTokenCountParams.Body.BuilderaddCodeInterpreterTool(BetaTool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)Alias for calling addCodeInterpreterTool with BetaTool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).final InputTokenCountParams.Body.BuilderaddToolProgrammaticToolCalling()Alias for calling addTool with BetaTool.ofProgrammaticToolCalling().final InputTokenCountParams.Body.BuilderaddToolLocalShell()Alias for calling addTool with BetaTool.ofLocalShell().final InputTokenCountParams.Body.BuilderaddCustomTool(String name)Alias for calling addTool with the following: BetaCustomTool.builder() .name(name) .build()final InputTokenCountParams.Body.Buildertruncation(InputTokenCountParams.Truncation truncation)The truncation strategy to use for the model response. final InputTokenCountParams.Body.Buildertruncation(JsonField<InputTokenCountParams.Truncation> truncation)Sets Builder.truncation to an arbitrary JSON value. final InputTokenCountParams.Body.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final InputTokenCountParams.Body.BuilderputAdditionalProperty(String key, JsonValue value)final InputTokenCountParams.Body.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final InputTokenCountParams.Body.BuilderremoveAdditionalProperty(String key)final InputTokenCountParams.Body.BuilderremoveAllAdditionalProperties(Set<String> keys)final InputTokenCountParams.Bodybuild()Returns an immutable instance of Body. -
-
Method Detail
-
conversation
final InputTokenCountParams.Body.Builder conversation(InputTokenCountParams.Conversation conversation)
The conversation that this response belongs to. Items from this conversation are prepended to
input_itemsfor this response request. Input items and output items from this response are automatically added to this conversation after this response completes.
-
conversation
final InputTokenCountParams.Body.Builder conversation(Optional<InputTokenCountParams.Conversation> conversation)
Alias for calling Builder.conversation with
conversation.orElse(null).
-
conversation
final InputTokenCountParams.Body.Builder conversation(JsonField<InputTokenCountParams.Conversation> conversation)
Sets Builder.conversation to an arbitrary JSON value.
You should usually call Builder.conversation with a well-typed Conversation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
conversation
final InputTokenCountParams.Body.Builder conversation(String id)
Alias for calling conversation with
Conversation.ofId(id).
-
conversation
final InputTokenCountParams.Body.Builder conversation(BetaResponseConversationParam betaResponseConversationParam)
Alias for calling conversation with
Conversation.ofBetaResponseConversationParam(betaResponseConversationParam).
-
input
final InputTokenCountParams.Body.Builder input(InputTokenCountParams.Input input)
Text, image, or file inputs to the model, used to generate a response
-
input
final InputTokenCountParams.Body.Builder input(Optional<InputTokenCountParams.Input> input)
Alias for calling Builder.input with
input.orElse(null).
-
input
final InputTokenCountParams.Body.Builder input(JsonField<InputTokenCountParams.Input> input)
Sets Builder.input to an arbitrary JSON value.
You should usually call Builder.input with a well-typed Input value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
input
final InputTokenCountParams.Body.Builder input(String string)
Alias for calling input with
Input.ofString(string).
-
inputOfBetaResponseInputItems
final InputTokenCountParams.Body.Builder inputOfBetaResponseInputItems(List<BetaResponseInputItem> betaResponseInputItems)
Alias for calling input with
Input.ofBetaResponseInputItems(betaResponseInputItems).
-
instructions
final InputTokenCountParams.Body.Builder instructions(String instructions)
A system (or developer) message inserted into the model's context. When used along with
previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
-
instructions
final InputTokenCountParams.Body.Builder instructions(Optional<String> instructions)
Alias for calling Builder.instructions with
instructions.orElse(null).
-
instructions
final InputTokenCountParams.Body.Builder instructions(JsonField<String> instructions)
Sets Builder.instructions to an arbitrary JSON value.
You should usually call Builder.instructions with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final InputTokenCountParams.Body.Builder model(String model)
Model ID used to generate the response, like
gpt-4ooro3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.
-
model
final InputTokenCountParams.Body.Builder model(Optional<String> model)
Alias for calling Builder.model with
model.orElse(null).
-
model
final InputTokenCountParams.Body.Builder model(JsonField<String> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
parallelToolCalls
final InputTokenCountParams.Body.Builder parallelToolCalls(Boolean parallelToolCalls)
Whether to allow the model to run tool calls in parallel.
-
parallelToolCalls
final InputTokenCountParams.Body.Builder parallelToolCalls(Boolean parallelToolCalls)
Alias for Builder.parallelToolCalls.
This unboxed primitive overload exists for backwards compatibility.
-
parallelToolCalls
final InputTokenCountParams.Body.Builder parallelToolCalls(Optional<Boolean> parallelToolCalls)
Alias for calling Builder.parallelToolCalls with
parallelToolCalls.orElse(null).
-
parallelToolCalls
final InputTokenCountParams.Body.Builder parallelToolCalls(JsonField<Boolean> parallelToolCalls)
Sets Builder.parallelToolCalls to an arbitrary JSON value.
You should usually call Builder.parallelToolCalls with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
personality
final InputTokenCountParams.Body.Builder personality(InputTokenCountParams.Personality personality)
A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters.
-
personality
final InputTokenCountParams.Body.Builder personality(JsonField<InputTokenCountParams.Personality> personality)
Sets Builder.personality to an arbitrary JSON value.
You should usually call Builder.personality with a well-typed Personality value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
personality
final InputTokenCountParams.Body.Builder personality(String value)
Sets personality to an arbitrary String.
You should usually call personality with a well-typed Personality constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
previousResponseId
final InputTokenCountParams.Body.Builder previousResponseId(String previousResponseId)
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state. Cannot be used in conjunction with
conversation.
-
previousResponseId
final InputTokenCountParams.Body.Builder previousResponseId(Optional<String> previousResponseId)
Alias for calling Builder.previousResponseId with
previousResponseId.orElse(null).
-
previousResponseId
final InputTokenCountParams.Body.Builder previousResponseId(JsonField<String> previousResponseId)
Sets Builder.previousResponseId to an arbitrary JSON value.
You should usually call Builder.previousResponseId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
reasoning
final InputTokenCountParams.Body.Builder reasoning(InputTokenCountParams.Reasoning reasoning)
gpt-5 and o-series models only Configuration options for reasoning models.
-
reasoning
final InputTokenCountParams.Body.Builder reasoning(Optional<InputTokenCountParams.Reasoning> reasoning)
Alias for calling Builder.reasoning with
reasoning.orElse(null).
-
reasoning
final InputTokenCountParams.Body.Builder reasoning(JsonField<InputTokenCountParams.Reasoning> reasoning)
Sets Builder.reasoning to an arbitrary JSON value.
You should usually call Builder.reasoning with a well-typed Reasoning value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
text
final InputTokenCountParams.Body.Builder text(InputTokenCountParams.Text text)
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
text
final InputTokenCountParams.Body.Builder text(Optional<InputTokenCountParams.Text> text)
Alias for calling Builder.text with
text.orElse(null).
-
text
final InputTokenCountParams.Body.Builder text(JsonField<InputTokenCountParams.Text> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed Text value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(InputTokenCountParams.ToolChoice toolChoice)
Controls which tool the model should use, if any.
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(Optional<InputTokenCountParams.ToolChoice> toolChoice)
Alias for calling Builder.toolChoice with
toolChoice.orElse(null).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(JsonField<InputTokenCountParams.ToolChoice> toolChoice)
Sets Builder.toolChoice to an arbitrary JSON value.
You should usually call Builder.toolChoice with a well-typed ToolChoice value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceOptions betaToolChoiceOptions)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceOptions(betaToolChoiceOptions).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceAllowed betaToolChoiceAllowed)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceAllowed(betaToolChoiceAllowed).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceTypes betaToolChoiceTypes)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceTypes(betaToolChoiceTypes).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceFunction betaToolChoiceFunction)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceFunction(betaToolChoiceFunction).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceMcp betaToolChoiceMcp)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceMcp(betaToolChoiceMcp).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceCustom betaToolChoiceCustom)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceCustom(betaToolChoiceCustom).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceApplyPatch betaToolChoiceApplyPatch)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceApplyPatch(betaToolChoiceApplyPatch).
-
toolChoice
final InputTokenCountParams.Body.Builder toolChoice(BetaToolChoiceShell betaToolChoiceShell)
Alias for calling toolChoice with
ToolChoice.ofBetaToolChoiceShell(betaToolChoiceShell).
-
toolChoiceBetaSpecificProgrammaticToolCallingParam
final InputTokenCountParams.Body.Builder toolChoiceBetaSpecificProgrammaticToolCallingParam()
Alias for calling toolChoice with
ToolChoice.ofBetaSpecificProgrammaticToolCallingParam().
-
tools
final InputTokenCountParams.Body.Builder tools(List<BetaTool> tools)
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.
-
tools
final InputTokenCountParams.Body.Builder tools(Optional<List<BetaTool>> tools)
Alias for calling Builder.tools with
tools.orElse(null).
-
tools
final InputTokenCountParams.Body.Builder tools(JsonField<List<BetaTool>> tools)
Sets Builder.tools to an arbitrary JSON value.
You should usually call Builder.tools with a well-typed
List<BetaTool>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaTool tool)
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaFunctionTool function)
Alias for calling addTool with
BetaTool.ofFunction(function).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaFileSearchTool fileSearch)
Alias for calling addTool with
BetaTool.ofFileSearch(fileSearch).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaComputerTool computer)
Alias for calling addTool with
BetaTool.ofComputer(computer).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaComputerUsePreviewTool computerUsePreview)
Alias for calling addTool with
BetaTool.ofComputerUsePreview(computerUsePreview).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaWebSearchTool webSearch)
Alias for calling addTool with
BetaTool.ofWebSearch(webSearch).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaTool.Mcp mcp)
Alias for calling addTool with
BetaTool.ofMcp(mcp).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaTool.CodeInterpreter codeInterpreter)
Alias for calling addTool with
BetaTool.ofCodeInterpreter(codeInterpreter).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaTool.ImageGeneration imageGeneration)
Alias for calling addTool with
BetaTool.ofImageGeneration(imageGeneration).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaFunctionShellTool shell)
Alias for calling addTool with
BetaTool.ofShell(shell).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaCustomTool custom)
Alias for calling addTool with
BetaTool.ofCustom(custom).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaNamespaceTool namespace)
Alias for calling addTool with
BetaTool.ofNamespace(namespace).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaToolSearchTool toolSearch)
Alias for calling addTool with
BetaTool.ofToolSearch(toolSearch).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaWebSearchPreviewTool webSearchPreview)
Alias for calling addTool with
BetaTool.ofWebSearchPreview(webSearchPreview).
-
addTool
final InputTokenCountParams.Body.Builder addTool(BetaApplyPatchTool applyPatch)
Alias for calling addTool with
BetaTool.ofApplyPatch(applyPatch).
-
addFileSearchTool
final InputTokenCountParams.Body.Builder addFileSearchTool(List<String> vectorStoreIds)
Alias for calling addTool with the following:
BetaFileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()
-
addMcpTool
final InputTokenCountParams.Body.Builder addMcpTool(String serverLabel)
Alias for calling addTool with the following:
BetaTool.Mcp.builder() .serverLabel(serverLabel) .build()
-
addCodeInterpreterTool
final InputTokenCountParams.Body.Builder addCodeInterpreterTool(BetaTool.CodeInterpreter.Container container)
Alias for calling addTool with the following:
BetaTool.CodeInterpreter.builder() .container(container) .build()
-
addCodeInterpreterTool
final InputTokenCountParams.Body.Builder addCodeInterpreterTool(String string)
Alias for calling addCodeInterpreterTool with
BetaTool.CodeInterpreter.Container.ofString(string).
-
addCodeInterpreterTool
final InputTokenCountParams.Body.Builder addCodeInterpreterTool(BetaTool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)
Alias for calling addCodeInterpreterTool with
BetaTool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).
-
addToolProgrammaticToolCalling
final InputTokenCountParams.Body.Builder addToolProgrammaticToolCalling()
Alias for calling addTool with
BetaTool.ofProgrammaticToolCalling().
-
addToolLocalShell
final InputTokenCountParams.Body.Builder addToolLocalShell()
Alias for calling addTool with
BetaTool.ofLocalShell().
-
addCustomTool
final InputTokenCountParams.Body.Builder addCustomTool(String name)
Alias for calling addTool with the following:
BetaCustomTool.builder() .name(name) .build()
-
truncation
@Deprecated(message = "deprecated") final InputTokenCountParams.Body.Builder truncation(InputTokenCountParams.Truncation truncation)
The truncation strategy to use for the model response. -
auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. -disabled(default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
-
truncation
@Deprecated(message = "deprecated") final InputTokenCountParams.Body.Builder truncation(JsonField<InputTokenCountParams.Truncation> truncation)
Sets Builder.truncation to an arbitrary JSON value.
You should usually call Builder.truncation with a well-typed Truncation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final InputTokenCountParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final InputTokenCountParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final InputTokenCountParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final InputTokenCountParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final InputTokenCountParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final InputTokenCountParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-