Share via


CopilotStudioAgent.DeserializeThread Method

Definition

Deserializes an agent thread from its JSON serialized representation.

public override Microsoft.Agents.AI.AgentThread DeserializeThread(System.Text.Json.JsonElement serializedThread, System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = default);
override this.DeserializeThread : System.Text.Json.JsonElement * System.Text.Json.JsonSerializerOptions -> Microsoft.Agents.AI.AgentThread
Public Overrides Function DeserializeThread (serializedThread As JsonElement, Optional jsonSerializerOptions As JsonSerializerOptions = Nothing) As AgentThread

Parameters

serializedThread
JsonElement

A JsonElement containing the serialized thread state.

jsonSerializerOptions
JsonSerializerOptions

Optional settings to customize the deserialization process.

Returns

A restored AgentThread instance with the state from serializedThread.

Applies to