FakeContentGenerator class
A fake ContentGenerator for use in tests.
- Implemented types
Constructors
Properties
-
a2uiMessageStream
→ Stream<
A2uiMessage> -
A stream of A2UI messages produced by the generator.
no setteroverride
-
errorStream
→ Stream<
ContentGeneratorError> -
A stream of errors from the agent.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isProcessing
→ ValueListenable<
bool> -
Whether the content generator is currently processing a request.
no setteroverride
- lastClientCapabilities ↔ A2UiClientCapabilities?
-
The last client capabilities passed to sendRequest.
getter/setter pair
-
lastHistory
↔ Iterable<
ChatMessage> ? -
The last history passed to sendRequest.
getter/setter pair
- lastMessage ↔ ChatMessage?
-
The last message passed to sendRequest.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendRequestCallCount ↔ int
-
The number of times sendRequest has been called.
getter/setter pair
-
sendRequestCompleter
↔ Completer<
void> ? -
A completer that can be used to pause sendRequest.
getter/setter pair
-
textResponseStream
→ Stream<
String> -
A stream of text responses from the agent.
no setteroverride
Methods
-
addA2uiMessage(
A2uiMessage message) → void - Adds an A2UI message to the stream.
-
addTextResponse(
String response) → void - Adds a text response to the stream.
-
dispose(
) → void -
Disposes of the resources used by this generator.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendRequest(
ChatMessage message, {Iterable< ChatMessage> ? history, A2UiClientCapabilities? clientCapabilities}) → Future<void> -
Sends a message to the content source to generate a response, optionally
including the previous conversation history.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited