Class EmbeddingsUsage
java.lang.Object
com.sap.ai.sdk.orchestration.model.EmbeddingsUsage
The usage information for the request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for EmbeddingsUsage. -
Method Summary
Modifier and TypeMethodDescriptionstatic EmbeddingsUsage.Buildercreate()Create a type-safe, fluent-api builder object to construct a newEmbeddingsUsageinstance with all required arguments.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theEmbeddingsUsage.The number of tokens used by the prompt.The total number of tokens used by the request.inthashCode()promptTokens(Integer promptTokens) Set the promptTokens of thisEmbeddingsUsageinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisEmbeddingsUsageinstance.voidsetPromptTokens(Integer promptTokens) Set the promptTokens of thisEmbeddingsUsageinstance.voidsetTotalTokens(Integer totalTokens) Set the totalTokens of thisEmbeddingsUsageinstance.toMap()Get the value of all properties of thisEmbeddingsUsageinstance including unrecognized properties.toString()totalTokens(Integer totalTokens) Set the totalTokens of thisEmbeddingsUsageinstance and return the same instance.
-
Constructor Details
-
EmbeddingsUsage
protected EmbeddingsUsage()Default constructor for EmbeddingsUsage.
-
-
Method Details
-
promptTokens
Set the promptTokens of thisEmbeddingsUsageinstance and return the same instance.- Parameters:
promptTokens- The number of tokens used by the prompt.- Returns:
- The same instance of this
EmbeddingsUsageclass
-
getPromptTokens
The number of tokens used by the prompt.- Returns:
- promptTokens The promptTokens of this
EmbeddingsUsageinstance.
-
setPromptTokens
Set the promptTokens of thisEmbeddingsUsageinstance.- Parameters:
promptTokens- The number of tokens used by the prompt.
-
totalTokens
Set the totalTokens of thisEmbeddingsUsageinstance and return the same instance.- Parameters:
totalTokens- The total number of tokens used by the request.- Returns:
- The same instance of this
EmbeddingsUsageclass
-
getTotalTokens
The total number of tokens used by the request.- Returns:
- totalTokens The totalTokens of this
EmbeddingsUsageinstance.
-
setTotalTokens
Set the totalTokens of thisEmbeddingsUsageinstance.- Parameters:
totalTokens- The total number of tokens used by the request.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theEmbeddingsUsage.- 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 thisEmbeddingsUsageinstance.- 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 thisEmbeddingsUsageinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisEmbeddingsUsageinstance. 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 newEmbeddingsUsageinstance with all required arguments.
-
toMap()instead.