@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TokenUsage extends Object implements Serializable, Cloneable, StructuredPojo
The tokens used in a message API inference call.
Constructor and Description |
---|
TokenUsage() |
Modifier and Type | Method and Description |
---|---|
TokenUsage |
clone() |
boolean |
equals(Object obj) |
Integer |
getInputTokens()
The number of tokens sent in the request to the model.
|
Integer |
getOutputTokens()
The number of tokens that the model generated for the request.
|
Integer |
getTotalTokens()
The total of input tokens and tokens generated by the model.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setInputTokens(Integer inputTokens)
The number of tokens sent in the request to the model.
|
void |
setOutputTokens(Integer outputTokens)
The number of tokens that the model generated for the request.
|
void |
setTotalTokens(Integer totalTokens)
The total of input tokens and tokens generated by the model.
|
String |
toString()
Returns a string representation of this object.
|
TokenUsage |
withInputTokens(Integer inputTokens)
The number of tokens sent in the request to the model.
|
TokenUsage |
withOutputTokens(Integer outputTokens)
The number of tokens that the model generated for the request.
|
TokenUsage |
withTotalTokens(Integer totalTokens)
The total of input tokens and tokens generated by the model.
|
public void setInputTokens(Integer inputTokens)
The number of tokens sent in the request to the model.
inputTokens
- The number of tokens sent in the request to the model.public Integer getInputTokens()
The number of tokens sent in the request to the model.
public TokenUsage withInputTokens(Integer inputTokens)
The number of tokens sent in the request to the model.
inputTokens
- The number of tokens sent in the request to the model.public void setOutputTokens(Integer outputTokens)
The number of tokens that the model generated for the request.
outputTokens
- The number of tokens that the model generated for the request.public Integer getOutputTokens()
The number of tokens that the model generated for the request.
public TokenUsage withOutputTokens(Integer outputTokens)
The number of tokens that the model generated for the request.
outputTokens
- The number of tokens that the model generated for the request.public void setTotalTokens(Integer totalTokens)
The total of input tokens and tokens generated by the model.
totalTokens
- The total of input tokens and tokens generated by the model.public Integer getTotalTokens()
The total of input tokens and tokens generated by the model.
public TokenUsage withTotalTokens(Integer totalTokens)
The total of input tokens and tokens generated by the model.
totalTokens
- The total of input tokens and tokens generated by the model.public String toString()
toString
in class Object
Object.toString()
public TokenUsage clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.