类 ChatUsage.Builder

java.lang.Object
io.agentscope.core.model.ChatUsage.Builder
封闭类:
ChatUsage

public static class ChatUsage.Builder extends Object
Builder for creating ChatUsage instances.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • inputTokens

      public ChatUsage.Builder inputTokens(int inputTokens)
      Sets the number of input tokens.
      参数:
      inputTokens - the number of tokens used for the input/prompt
      返回:
      this builder instance
    • outputTokens

      public ChatUsage.Builder outputTokens(int outputTokens)
      Sets the number of output tokens.
      参数:
      outputTokens - the number of tokens used for the output/generated response
      返回:
      this builder instance
    • time

      public ChatUsage.Builder time(double time)
      Sets the execution time.
      参数:
      time - the execution time in seconds
      返回:
      this builder instance
    • build

      public ChatUsage build()
      Builds a new ChatUsage instance with the set values.
      返回:
      a new ChatUsage instance