ChatHistory
Namespace: LLama.Common
The chat history class
1 |
|
Inheritance Object → ChatHistory
Properties
Messages
List of messages in the chat
1 |
|
Property Value
Constructors
ChatHistory()
Create a new instance of the chat content class
1 |
|
ChatHistory(Message[])
Create a new instance of the chat history from array of messages
1 |
|
Parameters
messageHistory
Message[]
Methods
AddMessage(AuthorRole, String)
Add a message to the chat history
1 |
|
Parameters
authorRole
AuthorRole
Role of the message author
content
String
Message content
ToJson()
Serialize the chat history to JSON
1 |
|
Returns
FromJson(String)
Deserialize a chat history from JSON
1 |
|
Parameters
json
String