ChatGPTClient class

Constructors

ChatGPTClient({required String apiKey, String model = "gpt-4", String systemPrompt = "You are a helpful assistant", double temperature = 0.5, int maxTokens = 1500})

Properties

apiKey String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maxTokens int
final
model String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
systemPrompt String
getter/setter pair
temperature double
getter/setter pair
url Uri
final

Methods

clearHistoryList() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(String text) Future<String>
sendMessageNonStreaming(String text) Future<Map<String, dynamic>>
sendMessageStream(String text) Stream<Map<String, dynamic>>
toString() String
A string representation of this object.
inherited

Operators

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