History

org.llm4s.repl.History
@Experimental
final class History

The conversation a session has had so far, as ask and chat() recorded it: each question, each answer, and the tool calls and results in between. A REPL prints it as a transcript, one message per line:

user: What is the weather in Paris?
assistant: -> get_weather({"city":"Paris"})
tool: <- {"temperature":21}
assistant: It is 21 degrees in Paris.

Value parameters

messages

the messages, oldest first; the session's system prompt is not among them

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

The messages as a org.llm4s.llmconnect.model.Conversation, to pass to an LLMClient or an agent.

The messages as a org.llm4s.llmconnect.model.Conversation, to pass to an LLMClient or an agent.

Attributes

def show: Unit

Prints the transcript to the session's output.

Prints the transcript to the session's output.

Attributes

def size: Int

The number of messages.

The number of messages.

Attributes

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

Concrete fields

val messages: Seq[Message]