Class ThreadCreateAndRunParams.Thread.Builder
-
- All Implemented Interfaces:
public final class ThreadCreateAndRunParams.Thread.Builder
A builder for Thread.
-
-
Method Summary
-
-
Method Detail
-
messages
final ThreadCreateAndRunParams.Thread.Builder messages(List<ThreadCreateAndRunParams.Thread.Message> messages)
A list of messages to start the thread with.
-
messages
final ThreadCreateAndRunParams.Thread.Builder messages(JsonField<List<ThreadCreateAndRunParams.Thread.Message>> messages)
Sets Builder.messages to an arbitrary JSON value.
You should usually call Builder.messages with a well-typed
List<Message>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addMessage
final ThreadCreateAndRunParams.Thread.Builder addMessage(ThreadCreateAndRunParams.Thread.Message message)
-
metadata
final ThreadCreateAndRunParams.Thread.Builder metadata(ThreadCreateAndRunParams.Thread.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 ThreadCreateAndRunParams.Thread.Builder metadata(Optional<ThreadCreateAndRunParams.Thread.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null)
.
-
metadata
final ThreadCreateAndRunParams.Thread.Builder metadata(JsonField<ThreadCreateAndRunParams.Thread.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.
-
toolResources
final ThreadCreateAndRunParams.Thread.Builder toolResources(ThreadCreateAndRunParams.Thread.ToolResources toolResources)
A set of resources that are made available to the assistant's tools in this thread. 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 ThreadCreateAndRunParams.Thread.Builder toolResources(Optional<ThreadCreateAndRunParams.Thread.ToolResources> toolResources)
Alias for calling Builder.toolResources with
toolResources.orElse(null)
.
-
toolResources
final ThreadCreateAndRunParams.Thread.Builder toolResources(JsonField<ThreadCreateAndRunParams.Thread.ToolResources> toolResources)
Sets Builder.toolResources to an arbitrary JSON value.
You should usually call Builder.toolResources with a well-typed ToolResources value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ThreadCreateAndRunParams.Thread.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ThreadCreateAndRunParams.Thread.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ThreadCreateAndRunParams.Thread.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ThreadCreateAndRunParams.Thread.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ThreadCreateAndRunParams.Thread.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ThreadCreateAndRunParams.Thread build()
Returns an immutable instance of Thread.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-