Record Class ClassifierRequest

java.lang.Object
java.lang.Record
com.google.adk.classifiers.ClassifierRequest
Record Components:
input - what the questions are about
questions - each caller-chosen question ID mapped to its question; the ClassifierResponse answers under the same IDs. There is at least one question, and the questions keep the map's iteration order.

@Experimental public record ClassifierRequest(ClassifierInput input, com.google.common.collect.ImmutableMap<String,Question> questions) extends Record
对某个资源的请求…… Classifier 用于回答用户针对输入内容提出的一个或多个问题。
  • 构造函数详细信息

    • ClassifierRequest

      public ClassifierRequest(ClassifierInput input, com.google.common.collect.ImmutableMap<String,Question> questions)
      创建一个……的实例。 ClassifierRequest 记录类(Record Class)。
      Parameters:
      input - the value for the input record component
      questions - the value for the questions record component
    • ClassifierRequest

      public ClassifierRequest(ClassifierInput input, Map<String, ? extends Question> questions)
      创建一个请求,其中包含该请求的副本。 questions.
    • ClassifierRequest

      public ClassifierRequest(String text, Map<String, ? extends Question> questions)
      创建一个用于对普通数据(plain data)进行分类的请求。 text.
    • ClassifierRequest

      public ClassifierRequest(com.google.genai.types.Content content, Map<String, ? extends Question> questions)
      创建一个用于分类数据的请求。 content.
  • 方法详细信息(Method Details)

    • toString

      public final String toString()
      返回该记录类的字符串表示形式。该字符串包含类的名称,以及每个记录组件的名称和对应的值。
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      返回该对象的哈希码值。该哈希码值是由该对象中每个组件的哈希码计算得出的。
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。该记录类中的所有组件都会被逐一进行比较。 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • input

      public ClassifierInput input()
      返回该值的值。 input “record component”(记录组件)。
      Returns:
      the value of the input record component
    • questions

      public com.google.common.collect.ImmutableMap<String,Question> questions()
      返回该值的值。 questions “record component”(记录组件)。
      Returns:
      the value of the questions record component