Serializes ConversationSession instances to JSON and back, including the model history with tool calls, results and attachments. Use it in IConversationStore implementations that keep conversations as text.
Object
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public static class ConversationSessionSerializerDeserializes a session from JSON produced by ConversationSession).
public static ConversationSession Deserialize(string json)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON. |
| Type | Description |
|---|---|
| ConversationSession |
Serializes a session to JSON.
public static string Serialize(ConversationSession session)
| Type | Name | Description |
|---|---|---|
| ConversationSession | session | The session. |
| Type | Description |
|---|---|
| string |