Gen class
The Generation service for Tuul AI.
This class handles both atomic (non-streaming) and streaming requests to the Tuul AI models. It manages its own HttpClient and requires initialization with an API key via initialize.
Properties
- client → HttpClient
-
Internal HTTP client configured for the Tuul Model API.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Returns true if the service has been initialized with an API key.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dryRun(
TuulOptions tuulOptions) → Future< void> -
Validates
tuulOptionswithout performing an actual network request. -
dryStream(
TuulOptions tuulOptions) → Future< void> -
Validates
tuulOptionsfor streaming without performing an actual network request. -
initialize(
String apiKey) → void -
Initializes the service with your
apiKey. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
{required TuulOptions tuulOptions}) → Future< AppResponse< BundleRunResponse> > - Performs a standard non-streaming generation request.
-
runStreamWithCallback(
{required TuulOptions tuulOptions, required void onEvent(SseEvent event), void onDone()?, void onError(Object error, StackTrace stackTrace)?}) → Future< void> - Initiates a streaming request using Server-Sent Events (SSE) and callbacks.
-
stream(
{required TuulOptions tuulOptions}) → Stream< SseEvent> - Initiates a streaming request and returns a Stream of SseEvent.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited