JevApi

interface JevApi(source)

The Jev API. evaluate is the only call that sends questions; query and ask are conveniences on top of it, so application code that depends on JevApi can be tested with a fake or mock.

Inheritors

Functions

Link copied to clipboard
inline suspend fun <T : Any> JevApi.ask(query: JevQuery, state: T, model: String? = null): JevResult

Asks a JevQuery's questions about a @Serializable state.

suspend fun JevApi.ask(query: JevQuery, state: String, model: String? = null): JevResult

Asks a JevQuery's questions about a text state.

suspend fun JevApi.ask(query: JevQuery, state: JsonElement, model: String? = null): JevResult

Asks a JevQuery's questions about a JSON state.

Link copied to clipboard
abstract suspend 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
abstract suspend fun models(): List<ModelInfo>

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

Link copied to clipboard
inline suspend fun <T : Any> JevApi.query(state: T, model: String? = null, noinline block: QueryBuilder.() -> Unit): JevResult

Asks inline questions about a @Serializable state.

suspend fun JevApi.query(state: String, model: String? = null, block: QueryBuilder.() -> Unit): JevResult

Asks inline questions about a text state.

suspend fun JevApi.query(state: JsonElement, model: String? = null, block: QueryBuilder.() -> Unit): JevResult

Asks inline questions about a JSON state.