JevClient

com.softinio.verdict4s.JevClient
final class JevClient[F[_]] extends Verdict4sClient[F], ModelCatalog[F]

A client for TypeSafe AI's Jev: the shared surface, plus ModelCatalog.

Built with Verdict4sClient.jev. Its copy methods return a JevClient, so withConfig never loses the model catalog.

Attributes

Graph
Supertypes
trait ModelCatalog[F]
trait Verdict4sClient[F]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ask[Q <: Tuple, S : Encoder](questions: Ask[Q], state: S): F[Answers[Q]]

Ask a set of questions and get back exactly typed answers.

Ask a set of questions and get back exactly typed answers.

val (urgent, dept, mood) = client.ask(Ask(q1, q2, q3), state)

Fails with Verdict4sError.Refused if the vendor declines a question that was not built with orRefused.

Attributes

The settings this client applies to every request.

The settings this client applies to every request.

Attributes

Evaluate a request built by hand.

Evaluate a request built by hand.

The escape hatch: answers come back in the map-based algebra.Evaluation, keyed by whatever question names you chose. Use ask when the questions are known statically. The request is checked against the vendor's own limits before it is sent.

Attributes

def models: F[List[ModelCard]]

The models available to this account.

The models available to this account.

Attributes

def vendor: Vendor

The vendor this client speaks to.

The vendor this client speaks to.

Attributes

A copy with different settings.

A copy with different settings.

Attributes

def withJitter(j: Jitter[F]): JevClient[F]

A copy drawing retry jitter differently. Mostly useful in tests.

A copy drawing retry jitter differently. Mostly useful in tests.

Attributes