ConversationSessionSerializer Class

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.

Inheritance

Object

ConversationSessionSerializer

Namespace: Radzen

Assembly: Radzen.Blazor.dll

Syntax

public static class ConversationSessionSerializer

Methods

DeserializeLink to this section

Deserializes a session from JSON produced by ConversationSession).

Declaration
public static ConversationSession Deserialize(string json)
Parameters
Type Name Description
string json The JSON.
Returns
Type Description
ConversationSession

SerializeLink to this section

Serializes a session to JSON.

Declaration
public static string Serialize(ConversationSession session)
Parameters
Type Name Description
ConversationSession session The session.
Returns
Type Description
string
In This Article
An error has occurred. This app may no longer respond until reloaded. Reload 🗙