Class ConversationCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class ConversationCreateParams.Body.Builder
A builder for Body.
-
-
Method Summary
Modifier and Type Method Description final ConversationCreateParams.Body.Builder
items(List<ResponseInputItem> items)
Initial items to include in the conversation context. final ConversationCreateParams.Body.Builder
items(Optional<List<ResponseInputItem>> items)
Alias for calling Builder.items with items.orElse(null)
.final ConversationCreateParams.Body.Builder
items(JsonField<List<ResponseInputItem>> items)
Sets Builder.items to an arbitrary JSON value. final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem item)
Adds a single ResponseInputItem to items. final ConversationCreateParams.Body.Builder
addItem(EasyInputMessage easyInputMessage)
Alias for calling addItem with ResponseInputItem.ofEasyInputMessage(easyInputMessage)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.Message message)
Alias for calling addItem with ResponseInputItem.ofMessage(message)
.final ConversationCreateParams.Body.Builder
addItem(ResponseOutputMessage responseOutputMessage)
Alias for calling addItem with ResponseInputItem.ofResponseOutputMessage(responseOutputMessage)
.final ConversationCreateParams.Body.Builder
addItem(ResponseFileSearchToolCall fileSearchCall)
Alias for calling addItem with ResponseInputItem.ofFileSearchCall(fileSearchCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseComputerToolCall computerCall)
Alias for calling addItem with ResponseInputItem.ofComputerCall(computerCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.ComputerCallOutput computerCallOutput)
Alias for calling addItem with ResponseInputItem.ofComputerCallOutput(computerCallOutput)
.final ConversationCreateParams.Body.Builder
addItem(ResponseFunctionWebSearch webSearchCall)
Alias for calling addItem with ResponseInputItem.ofWebSearchCall(webSearchCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseFunctionToolCall functionCall)
Alias for calling addItem with ResponseInputItem.ofFunctionCall(functionCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.FunctionCallOutput functionCallOutput)
Alias for calling addItem with ResponseInputItem.ofFunctionCallOutput(functionCallOutput)
.final ConversationCreateParams.Body.Builder
addItem(ResponseReasoningItem reasoning)
Alias for calling addItem with ResponseInputItem.ofReasoning(reasoning)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.ImageGenerationCall imageGenerationCall)
Alias for calling addItem with ResponseInputItem.ofImageGenerationCall(imageGenerationCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseCodeInterpreterToolCall codeInterpreterCall)
Alias for calling addItem with ResponseInputItem.ofCodeInterpreterCall(codeInterpreterCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.LocalShellCall localShellCall)
Alias for calling addItem with ResponseInputItem.ofLocalShellCall(localShellCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.LocalShellCallOutput localShellCallOutput)
Alias for calling addItem with ResponseInputItem.ofLocalShellCallOutput(localShellCallOutput)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.McpListTools mcpListTools)
Alias for calling addItem with ResponseInputItem.ofMcpListTools(mcpListTools)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.McpApprovalRequest mcpApprovalRequest)
Alias for calling addItem with ResponseInputItem.ofMcpApprovalRequest(mcpApprovalRequest)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.McpApprovalResponse mcpApprovalResponse)
Alias for calling addItem with ResponseInputItem.ofMcpApprovalResponse(mcpApprovalResponse)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.McpCall mcpCall)
Alias for calling addItem with ResponseInputItem.ofMcpCall(mcpCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseCustomToolCallOutput customToolCallOutput)
Alias for calling addItem with ResponseInputItem.ofCustomToolCallOutput(customToolCallOutput)
.final ConversationCreateParams.Body.Builder
addItem(ResponseCustomToolCall customToolCall)
Alias for calling addItem with ResponseInputItem.ofCustomToolCall(customToolCall)
.final ConversationCreateParams.Body.Builder
addItem(ResponseInputItem.ItemReference itemReference)
Alias for calling addItem with ResponseInputItem.ofItemReference(itemReference)
.final ConversationCreateParams.Body.Builder
addItemReferenceItem(String id)
Alias for calling addItem with the following: ResponseInputItem.ItemReference.builder() .type(ResponseInputItem.ItemReference.Type.ITEM_REFERENCE) .id(id) .build()
final ConversationCreateParams.Body.Builder
metadata(ConversationCreateParams.Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. final ConversationCreateParams.Body.Builder
metadata(Optional<ConversationCreateParams.Metadata> metadata)
Alias for calling Builder.metadata with metadata.orElse(null)
.final ConversationCreateParams.Body.Builder
metadata(JsonField<ConversationCreateParams.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value. final ConversationCreateParams.Body.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final ConversationCreateParams.Body.Builder
putAdditionalProperty(String key, JsonValue value)
final ConversationCreateParams.Body.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final ConversationCreateParams.Body.Builder
removeAdditionalProperty(String key)
final ConversationCreateParams.Body.Builder
removeAllAdditionalProperties(Set<String> keys)
final ConversationCreateParams.Body
build()
Returns an immutable instance of Body. -
-
Method Detail
-
items
final ConversationCreateParams.Body.Builder items(List<ResponseInputItem> items)
Initial items to include in the conversation context. You may add up to 20 items at a time.
-
items
final ConversationCreateParams.Body.Builder items(Optional<List<ResponseInputItem>> items)
Alias for calling Builder.items with
items.orElse(null)
.
-
items
final ConversationCreateParams.Body.Builder items(JsonField<List<ResponseInputItem>> items)
Sets Builder.items to an arbitrary JSON value.
You should usually call Builder.items with a well-typed
List<ResponseInputItem>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem item)
Adds a single ResponseInputItem to items.
-
addItem
final ConversationCreateParams.Body.Builder addItem(EasyInputMessage easyInputMessage)
Alias for calling addItem with
ResponseInputItem.ofEasyInputMessage(easyInputMessage)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.Message message)
Alias for calling addItem with
ResponseInputItem.ofMessage(message)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseOutputMessage responseOutputMessage)
Alias for calling addItem with
ResponseInputItem.ofResponseOutputMessage(responseOutputMessage)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseFileSearchToolCall fileSearchCall)
Alias for calling addItem with
ResponseInputItem.ofFileSearchCall(fileSearchCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseComputerToolCall computerCall)
Alias for calling addItem with
ResponseInputItem.ofComputerCall(computerCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.ComputerCallOutput computerCallOutput)
Alias for calling addItem with
ResponseInputItem.ofComputerCallOutput(computerCallOutput)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseFunctionWebSearch webSearchCall)
Alias for calling addItem with
ResponseInputItem.ofWebSearchCall(webSearchCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseFunctionToolCall functionCall)
Alias for calling addItem with
ResponseInputItem.ofFunctionCall(functionCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.FunctionCallOutput functionCallOutput)
Alias for calling addItem with
ResponseInputItem.ofFunctionCallOutput(functionCallOutput)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseReasoningItem reasoning)
Alias for calling addItem with
ResponseInputItem.ofReasoning(reasoning)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.ImageGenerationCall imageGenerationCall)
Alias for calling addItem with
ResponseInputItem.ofImageGenerationCall(imageGenerationCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseCodeInterpreterToolCall codeInterpreterCall)
Alias for calling addItem with
ResponseInputItem.ofCodeInterpreterCall(codeInterpreterCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.LocalShellCall localShellCall)
Alias for calling addItem with
ResponseInputItem.ofLocalShellCall(localShellCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.LocalShellCallOutput localShellCallOutput)
Alias for calling addItem with
ResponseInputItem.ofLocalShellCallOutput(localShellCallOutput)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.McpListTools mcpListTools)
Alias for calling addItem with
ResponseInputItem.ofMcpListTools(mcpListTools)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.McpApprovalRequest mcpApprovalRequest)
Alias for calling addItem with
ResponseInputItem.ofMcpApprovalRequest(mcpApprovalRequest)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.McpApprovalResponse mcpApprovalResponse)
Alias for calling addItem with
ResponseInputItem.ofMcpApprovalResponse(mcpApprovalResponse)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.McpCall mcpCall)
Alias for calling addItem with
ResponseInputItem.ofMcpCall(mcpCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseCustomToolCallOutput customToolCallOutput)
Alias for calling addItem with
ResponseInputItem.ofCustomToolCallOutput(customToolCallOutput)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseCustomToolCall customToolCall)
Alias for calling addItem with
ResponseInputItem.ofCustomToolCall(customToolCall)
.
-
addItem
final ConversationCreateParams.Body.Builder addItem(ResponseInputItem.ItemReference itemReference)
Alias for calling addItem with
ResponseInputItem.ofItemReference(itemReference)
.
-
addItemReferenceItem
final ConversationCreateParams.Body.Builder addItemReferenceItem(String id)
Alias for calling addItem with the following:
ResponseInputItem.ItemReference.builder() .type(ResponseInputItem.ItemReference.Type.ITEM_REFERENCE) .id(id) .build()
-
metadata
final ConversationCreateParams.Body.Builder metadata(ConversationCreateParams.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 ConversationCreateParams.Body.Builder metadata(Optional<ConversationCreateParams.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final ConversationCreateParams.Body.Builder metadata(JsonField<ConversationCreateParams.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.
-
additionalProperties
final ConversationCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ConversationCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ConversationCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ConversationCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ConversationCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ConversationCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-