CompletableFutureClassifier
Java-friendly wrapper around a Classifier that it owns: classify calls Classifier.classify in the caller's OpenTelemetry context and the passed coroutineContext, returning a CompletableFuture of the result. Canceling a future cancels its call, and a Job in coroutineContext is ignored.
Functions
Link copied to clipboard
The wrapped classifier, for code that has dropped into Kotlin.
Link copied to clipboard
fun classify(request: ClassifierRequest, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<ClassifierResponse>
Calls Classifier.classify.
Link copied to clipboard
Cancels calls in flight, then closes the classifier if it is AutoCloseable. Every later call returns a canceled future.