Class EmbeddingsResponse
java.lang.Object
com.sap.ai.sdk.orchestration.model.EmbeddingsResponse
The response from request to embedding model following OpenAI specification.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class.static interfaceBuilder helper class.static enumThe object type, which is always \"list\". -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for EmbeddingsResponse. -
Method Summary
Modifier and TypeMethodDescription_object(EmbeddingsResponse.ObjectEnum _object) Set the _object of thisEmbeddingsResponseinstance and return the same instance.addDataItem(EmbeddingResult dataItem) Add one data instance to thisEmbeddingsResponse.static EmbeddingsResponse.Buildercreate()Create a type-safe, fluent-api builder object to construct a newEmbeddingsResponseinstance with all required arguments.data(List<EmbeddingResult> data) Set the data of thisEmbeddingsResponseinstance and return the same instance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theEmbeddingsResponse.getData()The list of embeddings generated by the model.getModel()The name of the model used to generate the embedding.The object type, which is always \"list\".getUsage()Get usageinthashCode()Set the model of thisEmbeddingsResponseinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisEmbeddingsResponseinstance.voidsetData(List<EmbeddingResult> data) Set the data of thisEmbeddingsResponseinstance.voidSet the model of thisEmbeddingsResponseinstance.voidsetObject(EmbeddingsResponse.ObjectEnum _object) Set the _object of thisEmbeddingsResponseinstance.voidsetUsage(EmbeddingsUsage usage) Set the usage of thisEmbeddingsResponseinstance.toMap()Get the value of all properties of thisEmbeddingsResponseinstance including unrecognized properties.toString()usage(EmbeddingsUsage usage) Set the usage of thisEmbeddingsResponseinstance and return the same instance.
-
Constructor Details
-
EmbeddingsResponse
protected EmbeddingsResponse()Default constructor for EmbeddingsResponse.
-
-
Method Details
-
_object
Set the _object of thisEmbeddingsResponseinstance and return the same instance.- Parameters:
_object- The object type, which is always \"list\".- Returns:
- The same instance of this
EmbeddingsResponseclass
-
getObject
The object type, which is always \"list\".- Returns:
- _object The _object of this
EmbeddingsResponseinstance.
-
setObject
Set the _object of thisEmbeddingsResponseinstance.- Parameters:
_object- The object type, which is always \"list\".
-
data
Set the data of thisEmbeddingsResponseinstance and return the same instance.- Parameters:
data- The list of embeddings generated by the model.- Returns:
- The same instance of this
EmbeddingsResponseclass
-
addDataItem
Add one data instance to thisEmbeddingsResponse.- Parameters:
dataItem- The data that should be added- Returns:
- The same instance of type
EmbeddingsResponse
-
getData
The list of embeddings generated by the model.- Returns:
- data The data of this
EmbeddingsResponseinstance.
-
setData
Set the data of thisEmbeddingsResponseinstance.- Parameters:
data- The list of embeddings generated by the model.
-
model
Set the model of thisEmbeddingsResponseinstance and return the same instance.- Parameters:
model- The name of the model used to generate the embedding.- Returns:
- The same instance of this
EmbeddingsResponseclass
-
getModel
The name of the model used to generate the embedding.- Returns:
- model The model of this
EmbeddingsResponseinstance.
-
setModel
Set the model of thisEmbeddingsResponseinstance.- Parameters:
model- The name of the model used to generate the embedding.
-
usage
Set the usage of thisEmbeddingsResponseinstance and return the same instance.- Parameters:
usage- The usage of thisEmbeddingsResponse- Returns:
- The same instance of this
EmbeddingsResponseclass
-
getUsage
Get usage- Returns:
- usage The usage of this
EmbeddingsResponseinstance.
-
setUsage
Set the usage of thisEmbeddingsResponseinstance.- Parameters:
usage- The usage of thisEmbeddingsResponse
-
getCustomFieldNames
Get the names of the unrecognizable properties of theEmbeddingsResponse.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisEmbeddingsResponseinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisEmbeddingsResponseinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisEmbeddingsResponseinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newEmbeddingsResponseinstance with all required arguments.
-
toMap()instead.