Class EmbeddingContentObjectContents.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<EmbeddingContentObjectContents.Builder>
co.elastic.clients.elasticsearch.inference.EmbeddingContentObjectContents.Builder
- All Implemented Interfaces:
WithJson<EmbeddingContentObjectContents.Builder>,ObjectBuilder<EmbeddingContentObjectContents>
- Enclosing class:
- EmbeddingContentObjectContents
public static class EmbeddingContentObjectContents.Builder
extends WithJsonObjectBuilderBase<EmbeddingContentObjectContents.Builder>
implements ObjectBuilder<EmbeddingContentObjectContents>
Builder for
EmbeddingContentObjectContents.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aEmbeddingContentObjectContents.format(EmbeddingContentFormat value) The format of the input.protected EmbeddingContentObjectContents.Builderself()type(EmbeddingContentType value) Required - The type of input to embed.Required - The value of the input to embed.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Required - The type of input to embed.API name:
type -
format
The format of the input. For thetexttype this must betext. For theimagetype, this must bebase64. If not specified, this will default totextfor thetexttype andbase64for theimagetype.API name:
format -
value
Required - The value of the input to embed. For images, this must be a base64-encoded data URI, i.e. "data:content/type;base64,..."API name:
value -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<EmbeddingContentObjectContents.Builder>
-
build
Builds aEmbeddingContentObjectContents.- Specified by:
buildin interfaceObjectBuilder<EmbeddingContentObjectContents>- Throws:
NullPointerException- if some of the required fields are null.
-