Session


Object Hierarchy:

Object hierarchy for Session

Description:

public class Session : SessionBase

Session is a wrapper around Call.Chat that provides history persistence.

It uses SQ (SQLite) for database storage of metadata, and JSON files for complete session data including all messages. Properties are wrappers Messages come from session.messages. Model and other properties are on Session (Chat is created per request by AgentHandler) with a flag to include extra info during JSON encoding.

Example

// Create session from chat call
var call = new Call.Chat(client, "llama3.2");
var session = new History.Session(call, db);

// Save session to disk and database
yield session.save();

// Load session later
var loaded = History.Session.load(id, db, client, config);

Session requires a Call.Chat object in its constructor.


Namespace: OLLMchat.History
Package: ollmchat

Content:

Properties:

Static methods:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object
All known members inherited from interface Json.Serializable