JevRequest

org.llm4s.jev.JevRequest
See theJevRequest companion object
final case class JevRequest

One evaluation: a state and the named questions to ask about it.

val request = JevRequest(
 "Charged twice; please refund",
 Map(
   "route"  -> JevQuestion.choice("Which team should handle this?", "billing" -> "Payments and refunds", "technical" -> "Product issues"),
   "urgent" -> JevQuestion.noul("Does this need immediate human attention?")
 )
)

The answers come back under the same ids as the questions, which the model never sees. All questions are answered against the one state in a single call, so ask everything you might need at once.

Value parameters

headers

extra HTTP headers for this request, sent unchanged on every retry of it; one replaces a configured header of the same name, whatever its case. The client sets the credentials, content type and Accept header itself and refuses to have them replaced.

model

the model to use, or None for the client's configured model (jev-latest by default)

questions

the questions, by the id their answers come back under

state

what to evaluate: a string, or a JSON object or array for structured data

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def withHeader(name: String, value: String): JevRequest

Adds one extra HTTP header, replacing one of the same name in any case (header names are case-insensitive).

Adds one extra HTTP header, replacing one of the same name in any case (header names are case-insensitive).

Attributes

def withHeaders(headers: Map[String, String]): JevRequest

Replaces the extra HTTP headers.

Replaces the extra HTTP headers.

Attributes

def withModel(model: String): JevRequest

Uses model for this request instead of the client's configured model.

Uses model for this request instead of the client's configured model.

Attributes

def withModel(model: Option[String]): JevRequest

Uses model for this request; None uses the client's configured model.

Uses model for this request; None uses the client's configured model.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product