Class OutputTextContent.Builder
-
- All Implemented Interfaces:
public final class OutputTextContent.Builder
A builder for OutputTextContent.
-
-
Method Summary
-
-
Method Detail
-
annotations
final OutputTextContent.Builder annotations(List<OutputTextContent.Annotation> annotations)
The annotations of the text output.
-
annotations
final OutputTextContent.Builder annotations(JsonField<List<OutputTextContent.Annotation>> annotations)
Sets Builder.annotations to an arbitrary JSON value.
You should usually call Builder.annotations with a well-typed
List<Annotation>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAnnotation
final OutputTextContent.Builder addAnnotation(OutputTextContent.Annotation annotation)
Adds a single Annotation to annotations.
-
addAnnotation
final OutputTextContent.Builder addAnnotation(FileCitationBody fileCitation)
Alias for calling addAnnotation with
Annotation.ofFileCitation(fileCitation)
.
-
addAnnotation
final OutputTextContent.Builder addAnnotation(UrlCitationBody urlCitation)
Alias for calling addAnnotation with
Annotation.ofUrlCitation(urlCitation)
.
-
addAnnotation
final OutputTextContent.Builder addAnnotation(ContainerFileCitationBody containerFileCitation)
Alias for calling addAnnotation with
Annotation.ofContainerFileCitation(containerFileCitation)
.
-
text
final OutputTextContent.Builder text(String text)
The text output from the model.
-
text
final OutputTextContent.Builder text(JsonField<String> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final OutputTextContent.Builder type(JsonValue type)
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("output_text")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
logprobs
final OutputTextContent.Builder logprobs(List<LobProb> logprobs)
-
logprobs
final OutputTextContent.Builder logprobs(JsonField<List<LobProb>> logprobs)
Sets Builder.logprobs to an arbitrary JSON value.
You should usually call Builder.logprobs with a well-typed
List<LobProb>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addLogprob
final OutputTextContent.Builder addLogprob(LobProb logprob)
-
additionalProperties
final OutputTextContent.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final OutputTextContent.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final OutputTextContent.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final OutputTextContent.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final OutputTextContent.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final OutputTextContent build()
Returns an immutable instance of OutputTextContent.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.annotations() .text()
-
-
-
-