JContextWindow

org.llm4s.javaapi.JContextWindow
See theJContextWindow companion class

Attributes

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

Members list

Value members

Concrete methods

def lastMessages(messages: Int): JContextWindow

Sends the model at most messages messages of the conversation, the most recent, dropping the oldest first. The system prompt is always sent first and is not counted. The current turn - from the latest query on - is always sent whole, so a call may exceed the limit when the turn alone is longer; a tool call is never sent without its result, nor a result without its call; and what is sent starts with a query.

Sends the model at most messages messages of the conversation, the most recent, dropping the oldest first. The system prompt is always sent first and is not counted. The current turn - from the latest query on - is always sent whole, so a call may exceed the limit when the turn alone is longer; a tool call is never sent without its result, nor a result without its call; and what is sent starts with a query.

Does not throw: messages below 1 gives a window that the agent's build() refuses with a failed result.

Attributes