OpenaiClient class

Available Extensions

Constructors

OpenaiClient({required OpenaiConfig config, Client? httpClient})

Properties

client → Client
no setter
config OpenaiConfig
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get(String endpoint, {bool isBeta = false, CancellationToken? cancellationToken}) Future
handleException(Response response) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
proxyClient(String proxy) → IOClient
sendFormRequest(MultipartRequest request, {bool isBeta = false, CancellationToken? cancellationToken}) Future
sendRequest(String endpoint, dynamic body, {bool isBeta = false, CancellationToken? cancellationToken}) Future
sendRequestRaw(String endpoint, dynamic body, {bool isBeta = false, CancellationToken? cancellationToken}) Future
sendStreamRequest(String endpoint, dynamic body, {bool isBeta = false, dynamic onSuccess(dynamic)?, CancellationToken? cancellationToken}) Future
toString() String
A string representation of this object.
inherited
updateConfig(OpenaiConfig config) → void

Operators

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

Constants

kFormTypeHeader → const Map<String, String>
kJsonTypeHeader → const Map<String, String>