InMemoryAiChat class

Inheritance

Constructors

InMemoryAiChat({required String chatId, required String userId, required AiCompletions aiCompletions, required AiCompletions summaryCompletions, required String instructions(), required ExtendedLogger logger, CompactionSetup compactionSetup = defaultCompactionSetup, String summaryInstructions()?, bool isTimeAware = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startedStream Stream<AiChatState>
no setterinherited
state AiChatState
no setterinherited
stream Stream<AiChatState>
no setterinherited

Methods

addContext({required String text}) → void
Added to conversation as a <context> -tagged user message.
inherited
addTurnManually({required String? prompt, required String? answer}) Future<void>
inherited
clear() Future<void>
inherited
createAiRequest({required String prompt, Map<String, dynamic>? responseFormat}) → AiRequest
inherited
dispose() → void
inherited
disposeAndClearLocalStorage() → void
inherited
getResponse({required String prompt, Map<String, dynamic>? responseFormat}) Future<String>
inherited
getStructuredResponse<T>({required String prompt, required Map<String, dynamic> responseFormat, required T fromJson(Map<String, dynamic> json)}) Future<T>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
streamResponse({required String prompt, Map<String, dynamic>? responseFormat}) Stream<String>
inherited
toString() String
A string representation of this object.
inherited

Operators

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