Record Class ClassifierRequest
java.lang.Object
java.lang.Record
com.google.adk.classifiers.ClassifierRequest
- Record Components:
input- what the questions are aboutquestions- each caller-chosen question ID mapped to its question; theClassifierResponseanswers 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
A request to a
Classifier to answer one or more typed questions about an input.-
Constructor Summary
ConstructorsConstructorDescriptionClassifierRequest(ClassifierInput input, com.google.common.collect.ImmutableMap<String, Question> questions) Creates an instance of aClassifierRequestrecord class.ClassifierRequest(ClassifierInput input, Map<String, ? extends Question> questions) Creates a request with a copy ofquestions.ClassifierRequest(com.google.genai.types.Content content, Map<String, ? extends Question> questions) Creates a request that classifiescontent.ClassifierRequest(String text, Map<String, ? extends Question> questions) Creates a request that classifies plaintext. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.Returns the value of thequestionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassifierRequest
public ClassifierRequest(ClassifierInput input, com.google.common.collect.ImmutableMap<String, Question> questions) Creates an instance of aClassifierRequestrecord class. -
ClassifierRequest
Creates a request with a copy ofquestions. -
ClassifierRequest
-
ClassifierRequest
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
input
-
questions
-