GptClient class

Constructors

GptClient({required String apiKey, required String organizationId, String baseUrl = "api.openai.com"})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createChatCompletion({String? apiKey, String? organizationId, required GptChatCompletionRequest request}) Future<GptCompletion>
Creates a model response for the given chat conversation.
createCompletion({String? apiKey, String? organizationId, required GptCompletionRequest request}) Future<GptCompletion>
Creates a completion for the provided prompt and parameters.
createImage({String? apiKey, String? organizationId, required ImageCreateRequest request}) Future<List<GptImage>>
// Images
getModelById({String? apiKey, String? organizationId, required String modelId}) Future<GptModelDto>
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
getModels({String? apiKey, String? organizationId}) Future<List<GptModelDto>>
Lists the currently available models, and provides basic information about each one such as the owner and availability.
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