JevClient

A Jev client over Ktor (CIO). Configure it inline, or rely on TYPESAFE_API_KEY:

JevClient().use { jev ->
val result = jev.ask(Triage, state = ticket)
}

Failed requests are retried per JevConfig.retry; errors surface as JevException subclasses. Close the client when done.

Constructors

Link copied to clipboard
constructor(config: JevConfig)
constructor(block: JevConfigBuilder.() -> Unit = {})

Properties

Link copied to clipboard

The same API, blocking the calling thread. Don't call it from inside a coroutine.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend override fun evaluate(state: JsonElement, questions: QuestionSet, model: String? = null): JevResult

Asks questions about state (POST /v1/systemone), using the default model unless model is given.

Link copied to clipboard
open suspend override fun models(): List<ModelInfo>

The model names this account can use (GET /v1/models).