NoOpDecisionService

@ApiStatus.Experimental
class NoOpDecisionService constructor(val name: String = "none") : DecisionService, QuestionSetExecution, RatingAssessment

A decision service for disabled configuration. Every operation returns an FailureReason.UNAVAILABLE failure and makes no provider call.

It accepts every question kind and answers a whole request in one question-set call, so a request reaches it and comes back as a request failure. A failure is never a judgment about the input, so callers can tell a disabled service from a false, no-match or inconclusive answer. Construction logs one INFO line, and each failed request logs the usual WARN line.

Parameters

name

the service name, none by default

Constructors

Link copied to clipboard
constructor(name: String = "none")

Properties

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val provider: String

Name of the provider, such as "OpenAI"

Link copied to clipboard
open override val type: ModelType

Family remains DECISION even when this service is used only for classification.

Functions

Link copied to clipboard

Answers a request.

open fun ask(input: String, spec: DecisionSpec): DecisionResponse

Answers the questions of a spec against the given input. It behaves as ask with a request.

Link copied to clipboard
open override fun askQuestionSet(request: DecisionRequest): DecisionResponse

Answers every question of the request in one provider operation.

Link copied to clipboard
open override fun assess(request: PropositionRequest): PropositionResult

Assess the proposition; a false answer is successful evidence, not an operational failure.

Link copied to clipboard
open override fun capabilities(): DecisionCapabilities

Returns what this service can accept.

Link copied to clipboard

Classifies text with a spec. Same as calling classify with ClassificationRequest.of(input, spec).

Classify text using only the request's category domain, returning evidence rather than routing policy.

Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
open override fun metadata(): DecisionServiceMetadata

Pure DECISION metadata snapshot; never serialize a live service in place of this value.

Link copied to clipboard
open override fun rate(input: String, question: RatingQuestionSpec): RatingResult

Rates the input against one rating question in its own provider call. The caller validates the outcome against the question's levels.

Link copied to clipboard
open override fun toString(): String