Documentation
¶
Overview ¶
Package jevrouter adapts Typesafe System One decisions to Mecatl's delegated-model router.
Index ¶
Constants ¶
View Source
const ( // DefaultModel is the pinned Jev classifier model used when no model is configured. DefaultModel = "jev-1.13.0" // DefaultMaximumInputBytes is the rendered-request limit used when no limit is configured. DefaultMaximumInputBytes = 16 * 1024 // HardMaximumInputBytes is the immutable defense-in-depth request ceiling. HardMaximumInputBytes = 64 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MissKind ¶
type MissKind uint8
MissKind is the adapter-local mechanism result for a failed classification. Composition translates every nonzero value to the engine's common router outcome taxonomy.
const ( // MissClassifierError identifies an unclassified transport or SDK failure. MissClassifierError MissKind // MissBadVerdict identifies an invalid response protocol. MissBadVerdict // MissUnknownCategory identifies a structured offered-set violation. MissUnknownCategory // MissLowConfidence identifies a valid choice below the configured threshold. MissLowConfidence // MissInputOverLimit identifies a locally rejected input bound. MissInputOverLimit // MissCapacityTimeout identifies an expired queue wait while the caller remained active. MissCapacityTimeout // MissCancelled identifies observed caller cancellation. MissCancelled // MissTimeout identifies an observed caller, request, or SDK deadline. MissTimeout )
type Options ¶
type Options struct {
APIKey string
Model string
BaseURL string
DefaultCategory string
MinimumConfidence float64
MaximumInputBytes int
HTTPClient *http.Client
}
Options configures one Build-owned Jev router.
type Result ¶
type Result struct {
Category string
Confidence *float64
Usage session.Usage
Miss MissKind
OK bool
}
Result is one adapter-local classification outcome. A validated category and confidence remain present when the configured confidence threshold rejects the candidate.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router owns one concurrent-safe SDK client and one bounded request semaphore.
Click to show internal directories.
Click to hide internal directories.