Class EmbedTextDetails
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.generativeaiinference.model.EmbedTextDetails
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20231130") public final class EmbedTextDetails extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModelDetails for the request to embed texts.
Note: Objects should always be created or deserialized using theEmbedTextDetails.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theEmbedTextDetails.Builder, which maintain a set of all explicitly set fields calledEmbedTextDetails.Builder.__explicitlySet__. ThehashCode()andequals(Object)methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEmbedTextDetails.Builderstatic classEmbedTextDetails.InputTypeSpecifies the input type.static classEmbedTextDetails.TruncateFor an input that’s longer than the maximum token length, specifies which part of the input text will be truncated.
-
Constructor Summary
Constructors Constructor Description EmbedTextDetails(List<String> inputs, ServingMode servingMode, String compartmentId, Boolean isEcho, EmbedTextDetails.Truncate truncate, EmbedTextDetails.InputType inputType)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EmbedTextDetails.Builderbuilder()Create a new builder.booleanequals(Object o)StringgetCompartmentId()The OCID of compartment in which to call the Generative AI service to create text embeddings.List<String>getInputs()Provide a list of strings or one base64 encoded image with input_type setting to IMAGE.EmbedTextDetails.InputTypegetInputType()Specifies the input type.BooleangetIsEcho()Whether or not to include the original inputs in the response.ServingModegetServingMode()EmbedTextDetails.TruncategetTruncate()For an input that’s longer than the maximum token length, specifies which part of the input text will be truncated.inthashCode()EmbedTextDetails.BuildertoBuilder()StringtoString()StringtoString(boolean includeByteArrayContents)Return a string representation of the object.
-
-
-
Constructor Detail
-
EmbedTextDetails
@Deprecated @ConstructorProperties({"inputs","servingMode","compartmentId","isEcho","truncate","inputType"}) public EmbedTextDetails(List<String> inputs, ServingMode servingMode, String compartmentId, Boolean isEcho, EmbedTextDetails.Truncate truncate, EmbedTextDetails.InputType inputType)
Deprecated.
-
-
Method Detail
-
builder
public static EmbedTextDetails.Builder builder()
Create a new builder.
-
toBuilder
public EmbedTextDetails.Builder toBuilder()
-
getInputs
public List<String> getInputs()
Provide a list of strings or one base64 encoded image with input_type setting to IMAGE.If text embedding, each string can be words, a phrase, or a paragraph. The maximum length of each string entry in the list is 512 tokens.
- Returns:
- the value
-
getServingMode
public ServingMode getServingMode()
-
getCompartmentId
public String getCompartmentId()
The OCID of compartment in which to call the Generative AI service to create text embeddings.- Returns:
- the value
-
getIsEcho
public Boolean getIsEcho()
Whether or not to include the original inputs in the response.Results are index-based.
- Returns:
- the value
-
getTruncate
public EmbedTextDetails.Truncate getTruncate()
For an input that’s longer than the maximum token length, specifies which part of the input text will be truncated.- Returns:
- the value
-
getInputType
public EmbedTextDetails.InputType getInputType()
Specifies the input type.- Returns:
- the value
-
toString
public String toString()
- Overrides:
toStringin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCodein classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-