class

Enkaidu::SessionManager

Inherits Reference < Object

Manager a stack of sessions

Constructors

new(session : Session)
Source

Instance methods

ask_forked_session(query : String, keep_history = false, exclude_last_turn = false) : String | Nil

Push a session in current stack, make a query, and then extract the session outline before popping the session. Return the extracted session as a JSON string, or nil on error.

Source
current
Source
deploy_injected_functions(session)
Source
each
Source
global_state

Maintain a global key/value state in memory

Source
goto_session_stack(name : String)
Source
has_session_stack?(name : String)
Source
inject_function(tool : LLM::LocalFunction)

Inject functions / tools that will be available in all sessions

Source
new_session_stack(name : String, model_name : String | Nil, &)

Creates a new named session stack and switches to it

Source