OpenAIAssistantAgentThread 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.
Represents a conversation thread for an Open AI Assistant agent.
public sealed class OpenAIAssistantAgentThread : Microsoft.SemanticKernel.Agents.AgentThread
type OpenAIAssistantAgentThread = class
inherit AgentThread
Public NotInheritable Class OpenAIAssistantAgentThread
Inherits AgentThread
- Inheritance
Constructors
OpenAIAssistantAgentThread(AssistantClient, IEnumerable<ChatMessageContent>, IReadOnlyList<String>, String, IReadOnlyDictionary<String,String>) |
Initializes a new instance of the OpenAIAssistantAgentThread class. |
OpenAIAssistantAgentThread(AssistantClient, String) |
Initializes a new instance of the OpenAIAssistantAgentThread class that resumes an existing thread. |
OpenAIAssistantAgentThread(AssistantClient, ThreadCreationOptions) |
Initializes a new instance of the OpenAIAssistantAgentThread class. |
OpenAIAssistantAgentThread(AssistantClient) |
Initializes a new instance of the OpenAIAssistantAgentThread class. |
Properties
Id |
Gets the id of the current thread. (Inherited from AgentThread) |
IsDeleted |
Gets a value indicating whether the thread has been deleted. (Inherited from AgentThread) |
Methods
CreateAsync(CancellationToken) |
Creates the thread and returns the thread id. |
CreateInternalAsync(CancellationToken) |
Creates the thread and returns the thread id. Checks have already been completed in the CreateAsync(CancellationToken) method to ensure that the thread can be created. (Inherited from AgentThread) |
DeleteAsync(CancellationToken) |
Deletes the current thread. (Inherited from AgentThread) |
DeleteInternalAsync(CancellationToken) |
Deletes the current thread. Checks have already been completed in the DeleteAsync(CancellationToken) method to ensure that the thread can be deleted. (Inherited from AgentThread) |
GetMessagesAsync(Nullable<MessageCollectionOrder>, CancellationToken) |
Asynchronously retrieves all messages in the thread. |
OnNewMessageInternalAsync(ChatMessageContent, CancellationToken) |
This method is called when a new message has been contributed to the chat by any participant. Checks have already been completed in the Microsoft.SemanticKernel.Agents.AgentThread.OnNewMessageAsync(Microsoft.SemanticKernel.ChatMessageContent,System.Threading.CancellationToken) method to ensure that the thread can be updated. (Inherited from AgentThread) |