ServiceIdAgentThread Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a base class for agent threads that store conversation state remotely in a service and maintain only an identifier reference locally.
public abstract class ServiceIdAgentThread : Microsoft.Agents.AI.AgentThread
type ServiceIdAgentThread = class
inherit AgentThread
Public MustInherit Class ServiceIdAgentThread
Inherits AgentThread
- Inheritance
- Derived
Remarks
This class is designed for scenarios where conversation state is managed by an external service (such as a cloud-based AI service) rather than being stored locally. The thread maintains only the service identifier needed to reference the remote conversation state.
Constructors
| ServiceIdAgentThread() |
Initializes a new instance of the ServiceIdAgentThread class without a service thread identifier. |
| ServiceIdAgentThread(JsonElement, JsonSerializerOptions) |
Initializes a new instance of the ServiceIdAgentThread class from previously serialized state. |
| ServiceIdAgentThread(String) |
Initializes a new instance of the ServiceIdAgentThread class with the specified service thread identifier. |
Properties
| ServiceThreadId |
Gets or sets the unique identifier that references the conversation state stored in the remote service. |
Methods
| GetService(Type, Object) |
Asks the AgentThread for an object of the specified type |
| GetService<TService>(Object) |
Asks the AgentThread for an object of type |
| MessagesReceivedAsync(IEnumerable<ChatMessage>, CancellationToken) |
This method is called when new messages have been contributed to the chat by any participant. (Inherited from AgentThread) |
| Serialize(JsonSerializerOptions) |
Serializes the current object's state to a JsonElement using the specified serialization options. |