BaseFutureClassifier

Java-friendly base for implementing a Classifier: a Java subclass overrides classifyAsync to return a CompletableFuture, which classify awaits. Canceling the calling coroutine cancels the future from classifyAsync; fail the future rather than cancel it when classification fails, since a canceled future raises CancellationException in classify.

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard
override val name: String

The provider's model name, such as "jev-latest" or "gemini-3.8-flash".

Functions

Link copied to clipboard
suspend override fun classify(request: ClassifierRequest): ClassifierResponse

Answers every question in request against its input and returns one Answer per question ID.