Method SaveSession
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
SaveSession()
Save the current session state (messages + runtime state) to bytes.
Use together with the MultiTurnConversation(LM, byte[]) constructor to restore later.
public byte[] SaveSession()
Returns
- byte[]
Serialized session data.
Exceptions
- InvalidOperationException
If there is no conversation history to save.
SaveSession(string)
Save the current session state to a file on disk.
Use together with the MultiTurnConversation(LM, string) constructor to restore later.
public void SaveSession(string path)
Parameters
path
stringDestination file path.
Exceptions
- InvalidOperationException
If there is no conversation history to save.