SessionState
Namespace: LLama
The state of a chat session in-memory.
1 | |
Inheritance Object → SessionState
Implements IEquatable<SessionState>
Attributes NullableContextAttribute, NullableAttribute
Properties
EqualityContract
1 | |
Property Value
ExecutorState
Saved executor state for the session in JSON format.
1 | |
Property Value
ContextState
Saved context state (KV cache) for the session.
1 | |
Property Value
InputTransformPipeline
The input transform pipeline used in this session.
1 | |
Property Value
OutputTransform
The output transform used in this session.
1 | |
Property Value
HistoryTransform
The history transform used in this session.
1 | |
Property Value
History
The chat history messages for this session.
1 | |
Property Value
Constructors
SessionState(State, ExecutorBaseState, ChatHistory, List<ITextTransform>, ITextStreamTransform, IHistoryTransform)
Create a new session state.
1 | |
Parameters
contextState State
executorState ExecutorBaseState
history ChatHistory
inputTransformPipeline List<ITextTransform>
outputTransform ITextStreamTransform
historyTransform IHistoryTransform
SessionState(SessionState)
1 | |
Parameters
original SessionState
Methods
Save(String)
Save the session state to folder.
1 | |
Parameters
path String
Load(String)
Load the session state from folder.
1 | |
Parameters
path String
Returns
Exceptions
ArgumentException
Throws when session state is incorrect
ToString()
1 | |
Returns
PrintMembers(StringBuilder)
1 | |
Parameters
builder StringBuilder
Returns
GetHashCode()
1 | |
Returns
Equals(Object)
1 | |
Parameters
obj Object
Returns
Equals(SessionState)
1 | |
Parameters
other SessionState
Returns
<Clone>$()
1 | |