AssistantConversation class

Helper for managing a single conversation with an assistant.

Constructors

AssistantConversation({required GptClient client, required String assistantId, Duration statusCheckPeriod = const Duration(seconds: 2)})

Properties

assistantId String
getter/setter pair
client GptClient
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runId String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCheckPeriod Duration
getter/setter pair
threadId String?
getter/setter pair

Methods

cancelLastMessage() Future<bool>
Request a cancel for the last conversation message submitted. Returns true if the cancel was requested, false otherwise. A cancel will not be sent if there is no active run.
getProgress() Stream<AssistantConversationProgress>
Notifies the progress of the conversation.
isBusy() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postMessage({required String content, List<String> fileIds = const []}) Future<List<GptAssistantMessage>>
Sends a message to the assistant. This will take care of creating the conversation thread as well as the run for each of the messages sent. It will also handle the periodic checks on the progress of the assistant and return when the assistant has completed. When done it returns all the messages in the assistant conversation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited