Thinking

org.llm4s.llmconnect.model.Thinking
See theThinking companion trait
object Thinking

Attributes

Companion
trait
Source
Thinking.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Thinking.type

Members list

Type members

Classlikes

case object Adaptive extends Thinking

Let the model decide whether and how much to think.

Let the model decide whether and how much to think.

Attributes

Source
Thinking.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Thinking
class Object
trait Matchable
class Any
Show all
Self type
Adaptive.type
final case class Budget extends Thinking

Think within a budget of tokens. Made only by Thinking.budget, so tokens is always positive: Off and Adaptive already say what 0 and -1 mean to the providers that use them.

Think within a budget of tokens. Made only by Thinking.budget, so tokens is always positive: Off and Adaptive already say what 0 and -1 mean to the providers that use them.

Attributes

Source
Thinking.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Thinking
class Object
trait Matchable
class Any
Show all
case object Off extends Thinking

Do not think.

Do not think.

Attributes

Source
Thinking.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Thinking
class Object
trait Matchable
class Any
Show all
Self type
Off.type

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def budget(tokens: Int): Result[Thinking]

A thinking budget of tokens. Fails with a org.llm4s.error.ValidationError for tokens <= 0, which mean different things to different providers (on Gemini 0 turns thinking off and -1 makes it dynamic); use Off or Adaptive for those.

A thinking budget of tokens. Fails with a org.llm4s.error.ValidationError for tokens <= 0, which mean different things to different providers (on Gemini 0 turns thinking off and -1 makes it dynamic); use Off or Adaptive for those.

Attributes

Source
Thinking.scala

Implicits

Implicits

implicit val rw: ReadWriter[Thinking]

Written as "off", "adaptive" or {"budget": n}. A stored budget is read through budget, so one that is not positive fails to read.

Written as "off", "adaptive" or {"budget": n}. A stored budget is read through budget, so one that is not positive fails to read.

Attributes

Source
Thinking.scala