类 ChatUsage.Builder
java.lang.Object
io.agentscope.core.model.ChatUsage.Builder
- 封闭类:
ChatUsage
Builder for creating ChatUsage instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a new ChatUsage instance with the set values.cachedTokens(int cachedTokens) Sets the number of cached input tokens.inputTokens(int inputTokens) Sets the number of input tokens.outputTokens(int outputTokens) Sets the number of output tokens.time(double time) Sets the execution time.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
inputTokens
Sets the number of input tokens.- 参数:
inputTokens- the number of tokens used for the input/prompt- 返回:
- this builder instance
-
outputTokens
Sets the number of output tokens.- 参数:
outputTokens- the number of tokens used for the output/generated response- 返回:
- this builder instance
-
cachedTokens
Sets the number of cached input tokens.- 参数:
cachedTokens- the number of input tokens served from the prompt cache (a subset ofinputTokens)- 返回:
- this builder instance
-
time
Sets the execution time.- 参数:
time- the execution time in seconds- 返回:
- this builder instance
-
build
Builds a new ChatUsage instance with the set values.- 返回:
- a new ChatUsage instance
-