Class TokenUsagePromptTokensDetails
java.lang.Object
com.sap.ai.sdk.orchestration.model.TokenUsagePromptTokensDetails
Details of the prompt tokens.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for TokenUsagePromptTokensDetails. -
Method Summary
Modifier and TypeMethodDescriptionaudioTokens(Integer audioTokens) Set the audioTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.cacheCreationTokenDetails(CacheCreationTokenDetails cacheCreationTokenDetails) Set the cacheCreationTokenDetails of thisTokenUsagePromptTokensDetailsinstance and return the same instance.cacheCreationTokens(Integer cacheCreationTokens) Set the cacheCreationTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.cachedTokens(Integer cachedTokens) Set the cachedTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.create()Create a newTokenUsagePromptTokensDetailsinstance.booleanAudio input tokens present in the prompt.Get cacheCreationTokenDetailsNumber of tokens written to the cache (Anthropic only).Cached tokens present in the prompt.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theTokenUsagePromptTokensDetails.inthashCode()voidsetAudioTokens(Integer audioTokens) Set the audioTokens of thisTokenUsagePromptTokensDetailsinstance.voidsetCacheCreationTokenDetails(CacheCreationTokenDetails cacheCreationTokenDetails) Set the cacheCreationTokenDetails of thisTokenUsagePromptTokensDetailsinstance.voidsetCacheCreationTokens(Integer cacheCreationTokens) Set the cacheCreationTokens of thisTokenUsagePromptTokensDetailsinstance.voidsetCachedTokens(Integer cachedTokens) Set the cachedTokens of thisTokenUsagePromptTokensDetailsinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisTokenUsagePromptTokensDetailsinstance.toMap()Get the value of all properties of thisTokenUsagePromptTokensDetailsinstance including unrecognized properties.toString()
-
Constructor Details
-
TokenUsagePromptTokensDetails
protected TokenUsagePromptTokensDetails()Default constructor for TokenUsagePromptTokensDetails.
-
-
Method Details
-
audioTokens
Set the audioTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.- Parameters:
audioTokens- Audio input tokens present in the prompt.- Returns:
- The same instance of this
TokenUsagePromptTokensDetailsclass
-
getAudioTokens
Audio input tokens present in the prompt.- Returns:
- audioTokens The audioTokens of this
TokenUsagePromptTokensDetailsinstance.
-
setAudioTokens
Set the audioTokens of thisTokenUsagePromptTokensDetailsinstance.- Parameters:
audioTokens- Audio input tokens present in the prompt.
-
cachedTokens
Set the cachedTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.- Parameters:
cachedTokens- Cached tokens present in the prompt.- Returns:
- The same instance of this
TokenUsagePromptTokensDetailsclass
-
getCachedTokens
Cached tokens present in the prompt.- Returns:
- cachedTokens The cachedTokens of this
TokenUsagePromptTokensDetailsinstance.
-
setCachedTokens
Set the cachedTokens of thisTokenUsagePromptTokensDetailsinstance.- Parameters:
cachedTokens- Cached tokens present in the prompt.
-
cacheCreationTokens
@Nonnull public TokenUsagePromptTokensDetails cacheCreationTokens(@Nullable Integer cacheCreationTokens) Set the cacheCreationTokens of thisTokenUsagePromptTokensDetailsinstance and return the same instance.- Parameters:
cacheCreationTokens- Number of tokens written to the cache (Anthropic only).- Returns:
- The same instance of this
TokenUsagePromptTokensDetailsclass
-
getCacheCreationTokens
Number of tokens written to the cache (Anthropic only).- Returns:
- cacheCreationTokens The cacheCreationTokens of this
TokenUsagePromptTokensDetailsinstance.
-
setCacheCreationTokens
Set the cacheCreationTokens of thisTokenUsagePromptTokensDetailsinstance.- Parameters:
cacheCreationTokens- Number of tokens written to the cache (Anthropic only).
-
cacheCreationTokenDetails
@Nonnull public TokenUsagePromptTokensDetails cacheCreationTokenDetails(@Nullable CacheCreationTokenDetails cacheCreationTokenDetails) Set the cacheCreationTokenDetails of thisTokenUsagePromptTokensDetailsinstance and return the same instance.- Parameters:
cacheCreationTokenDetails- The cacheCreationTokenDetails of thisTokenUsagePromptTokensDetails- Returns:
- The same instance of this
TokenUsagePromptTokensDetailsclass
-
getCacheCreationTokenDetails
Get cacheCreationTokenDetails- Returns:
- cacheCreationTokenDetails The cacheCreationTokenDetails of this
TokenUsagePromptTokensDetailsinstance.
-
setCacheCreationTokenDetails
public void setCacheCreationTokenDetails(@Nullable CacheCreationTokenDetails cacheCreationTokenDetails) Set the cacheCreationTokenDetails of thisTokenUsagePromptTokensDetailsinstance.- Parameters:
cacheCreationTokenDetails- The cacheCreationTokenDetails of thisTokenUsagePromptTokensDetails
-
getCustomFieldNames
Get the names of the unrecognizable properties of theTokenUsagePromptTokensDetails.- 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 thisTokenUsagePromptTokensDetailsinstance.- 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 thisTokenUsagePromptTokensDetailsinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisTokenUsagePromptTokensDetailsinstance. 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 newTokenUsagePromptTokensDetailsinstance. No arguments are required.
-
toMap()instead.