Class ChatCompletionToolMessageParam.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionToolMessageParam.Builder
A builder for ChatCompletionToolMessageParam.
-
-
Method Summary
-
-
Method Detail
-
content
final ChatCompletionToolMessageParam.Builder content(ChatCompletionToolMessageParam.Content content)
The contents of the tool message.
-
content
final ChatCompletionToolMessageParam.Builder content(JsonField<ChatCompletionToolMessageParam.Content> content)
Sets Builder.content to an arbitrary JSON value.
You should usually call Builder.content with a well-typed Content value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
content
final ChatCompletionToolMessageParam.Builder content(String text)
Alias for calling content with
Content.ofText(text)
.
-
contentAsJson
final ChatCompletionToolMessageParam.Builder contentAsJson(Object functionResult)
Sets the content to text representing the JSON serialized form of a given object. This is useful when passing data that is the result of a function call.
-
contentOfArrayOfContentParts
final ChatCompletionToolMessageParam.Builder contentOfArrayOfContentParts(List<ChatCompletionContentPartText> arrayOfContentParts)
Alias for calling content with
Content.ofArrayOfContentParts(arrayOfContentParts)
.
-
role
final ChatCompletionToolMessageParam.Builder role(JsonValue role)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("tool")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolCallId
final ChatCompletionToolMessageParam.Builder toolCallId(String toolCallId)
Tool call that this message is responding to.
-
toolCallId
final ChatCompletionToolMessageParam.Builder toolCallId(JsonField<String> toolCallId)
Sets Builder.toolCallId to an arbitrary JSON value.
You should usually call Builder.toolCallId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ChatCompletionToolMessageParam.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionToolMessageParam.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionToolMessageParam.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionToolMessageParam.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionToolMessageParam.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionToolMessageParam build()
Returns an immutable instance of ChatCompletionToolMessageParam.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.content() .toolCallId()
-
-
-
-