ChatGpt class
Represents the main class for interacting with the ChatGPT API.
Constructors
Properties
- apiKey → String
-
final
- connectTimeout → Duration?
-
final
- dio → Dio
-
Returns a Dio instance with the base options set.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- multipartDataDio → Dio
-
Returns a Dio instance with headers set for multipart data.
no setter
- receiveTimeout → Duration?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendTimeout → Duration?
-
final
Methods
-
createChatCompletion(
ChatCompletionRequest request) → Future< AsyncCompletionResponse?> -
Creates a chat completion using the provided
request. -
createChatCompletionStream(
ChatCompletionRequest request) → Future< Stream< StreamCompletionResponse> ?> -
Creates a chat completion stream using the provided
request. -
createCompletionStream(
CompletionRequest request) → Future< Stream< CompletionResponse> ?> -
Creates a completion stream using the provided
request. -
createImage(
CreateImageRequest request) → Future< ImageResponse?> -
Creates an image using the provided
request. -
createImageVariation(
ImageVariationRequest request) → Future< ImageResponse?> -
Creates an image variation using the provided
request. -
createTranscription(
TranscriptionRequest request) → Future< TranscriptionResponse?> -
Creates a transcription using the provided
request. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited