Enkaidu::Session
Inherits Enkaidu::Session::Macros < Enkaidu::Session::McpServers < Enkaidu::Session::SystemPrompts < Enkaidu::Session::Prompts < Enkaidu::Session::AutoLoad < Enkaidu::Session::Lifecycle < Enkaidu::Session::Toolsets < Reference < Object
The Session class manages connection setup, logging, and the processing of different types of events for user queries via the command line app
Constructors
new(renderer : Enkaidu::SessionRenderer, opts : Enkaidu::SessionOptions, unique_model_name : String | Nil = nil)
Sourcenew(fork_from : Session, keep_tools = true, keep_prompts = true, keep_history = true, system_prompt_name = nil, exclude_last_turn = false)
Create a new session "forked" from a given Session to create a duplicate session.
Instance methods
ask(query, attach : LLM::ChatInclusions | Nil = nil, response_json_schema : LLM::ResponseSchema | Nil = nil, render_query = false)
Query LLM using a prompt and optional attachments
debug?(*args, **options)
Sourcedebug?(*args, **options, &)
Sourceid
Sourcequeue_query(query)
Sourcereadonly?(*args, **options)
Sourcereadonly?(*args, **options, &)
Sourcerecorder
Sourcerenderer
Sourcestreaming?(*args, **options)
Sourcestreaming?(*args, **options, &)
Sourcetake_pending_queries
Sourcetransfer_tail_chats(to : Session, num = 1, filter_by_role : String | Nil = nil)
Sourceusage(*args, **options)
Sourceusage(*args, **options, &)
Source