Promptable

org.llm4s.prompt.Promptable
See thePromptable companion trait
object Promptable

The instances for the standard types, and derives Promptable for case classes and enums.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Promptable.type

Members list

Type members

Classlikes

object given_Promptable_String extends Promptable[String]

Attributes

Supertypes
trait Promptable[String]
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def apply[A](using p: Promptable[A]): Promptable[A]

The instance in scope for A.

The instance in scope for A.

Attributes

inline def derived[A](using m: Of[A]): Promptable[A]

The instance of a case class or enum: derives Promptable.

The instance of a case class or enum: derives Promptable.

A case class renders as Name(field: value, ...), its fields by their own Promptable (each field's type needs one, or this does not compile); a case without fields, such as an enum's singleton case, as its name. An enum or sealed trait renders each value as its case does; the cases are derived with it.

Attributes

def instance[A](f: A => String): Promptable[A]

An instance that renders with f, on its own and nested alike.

An instance that renders with f, on its own and nested alike.

Attributes

Givens

Givens

ISO-8601, in UTC: 2026-11-05T10:15:30Z.

ISO-8601, in UTC: 2026-11-05T10:15:30Z.

Attributes

ISO-8601: 2026-11-05.

ISO-8601: 2026-11-05.

Attributes

given given_Promptable_Map[K, V](using k: Promptable[K], v: Promptable[V]): Promptable[Map[K, V]]

The entries sorted by their rendered key: {a: 1, b: 2}.

The entries sorted by their rendered key: {a: 1, b: 2}.

Attributes

given given_Promptable_Option[A](using p: Promptable[A]): Promptable[Option[A]]

A Some is its value, None is (none).

A Some is its value, None is (none).

Attributes

given given_Promptable_Seq[A](using p: Promptable[A]): Promptable[Seq[A]]

The elements in order: [a, b, c].

The elements in order: [a, b, c].

Attributes

given given_Promptable_Set[A](using p: Promptable[A]): Promptable[Set[A]]

The elements sorted by their rendering, so that the prompt does not depend on the set's iteration order.

The elements sorted by their rendering, so that the prompt does not depend on the set's iteration order.

Attributes