Skip to main content

is_session_document

Function is_session_document 

Source
pub fn is_session_document(document: &Value) -> bool
Expand description

Whether a JSON document looks like a Gemini chat session.

The messages array is the load-bearing field — without it there is nothing to read — so it is also the marker. sessionId is corroborating but not required: a session file is recognised by what it has to offer.