Request class

Request class internal to TextAi. This class is used to create a request for generating text using the Pollinations API.

Constructors

Request({required String model, required String prompt, String system = "", bool contextual = false, List<Message>? messages, List<Message>? images, dynamic seed = "random", bool private = false, String reasoningEffort = "low", bool jsonMode = false, String referrer = "pollinations.py"})
Constructor for Request class.

Properties

contextual ↔ bool
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
images ↔ List<Message>?
getter/setter pair
jsonMode ↔ bool
getter/setter pair
messages ↔ List<Message>?
getter/setter pair
model ↔ String
getter/setter pair
private ↔ bool
getter/setter pair
prompt ↔ String
getter/setter pair
reasoningEffort ↔ String
getter/setter pair
referrer ↔ String
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seed ↔ dynamic
getter/setter pair
seedValue → int
no setter
system ↔ String
getter/setter pair
timestamp ↔ DateTime
getter/setter pair

Methods

call({bool encode = false}) → Future<String>
Calls the Pollinations API to generate text based on the provided prompt.
computeSeedValue() → int
Compute the seed value based on the provided seed. @return The computed seed value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → String
toString() → String
A string representation of this object.
override

Operators

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