Interface ClassifierContent
- All Superinterfaces:
ClassifierInput
- All Known Implementing Classes:
ClassifierContent.JsonArray, ClassifierContent.JsonObject, ClassifierContent.Text
@Experimental
public sealed interface ClassifierContent
extends ClassifierInput
permits ClassifierContent.Text, ClassifierContent.JsonObject, ClassifierContent.JsonArray
Text or structured data that a
Classifier reads as the input or as a question's
instructions or criteria: plain ClassifierContent.Text, or a ClassifierContent.JsonObject or ClassifierContent.JsonArray. It
mirrors Python ADK's JSONContent.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA JSON array.static final recordA JSON object.static final recordPlain text.Nested classes/interfaces inherited from interface ClassifierInput
ClassifierInput.Content -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ClassifierContentReturnstextas plain-text content.static ClassifierContentParsesjson, the text of a JSON object or array, into aClassifierContent.JsonObjector aClassifierContent.JsonArray.
-
Method Details
-
of
Returnstextas plain-text content. -
parse
Parsesjson, the text of a JSON object or array, into aClassifierContent.JsonObjector aClassifierContent.JsonArray.- Throws:
IllegalArgumentException- ifjsonis not a JSON object or array, or fails the checks of theClassifierContent.JsonObjectorClassifierContent.JsonArrayit would create
-