ContextLimits

org.llm4s.llmconnect.config.ContextLimits
See theContextLimits companion object
@Stable
final case class ContextLimits

A model's token limits, as a provider config carries them.

Value parameters

contextWindow

the tokens a prompt and its completion may take together

reserveCompletion

the tokens held back from the prompt for the completion Build one with ContextLimits.apply and change it with the with* setters; the constructor and copy are private, so a further limit never breaks callers.

Attributes

Companion
object
Source
ContextWindowResolver.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withContextWindow(contextWindow: Int): ContextLimits

Sets the tokens a prompt and its completion may take together.

Sets the tokens a prompt and its completion may take together.

Attributes

Source
ContextWindowResolver.scala
def withReserveCompletion(reserveCompletion: Int): ContextLimits

Sets the tokens held back from the prompt for the completion.

Sets the tokens held back from the prompt for the completion.

Attributes

Source
ContextWindowResolver.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product