OpenAI class

Properties

audio → Audio
audio
no setter
editor → Edit
edit prompt
no setter
embed → Embedding
embedding
no setter
file → OpenAIFile
files
no setter
fineTune → FineTuned
fine-tune
no setter
hashCode int
The hash code for this object.
no setterinherited
moderation → Moderation
moderation's
no setter
orgId String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
no setter

Methods

build({String? token, String? orgId, String? apiUrl, HttpSetup? baseOption, bool enableLog = false}) OpenAI
build environment for openai build setup http client setup logger
generateImage(GenerateImage request, {void onCancel(CancelData cancelData)?}) Future<GenImgResponse?>
generate image with prompt
listEngine({void onCancel(CancelData cancelData)?}) Future<EngineModel>
find all list engine ai listEngine
listModel({void onCancel(CancelData cancelData)?}) Future<OpenAiModel>
find all list model ai listModel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChatCompletion({required ChatCompleteText request, void onCancel(CancelData cancelData)?}) Future<ChatCTResponse?>
Given a chat conversation, the model will return a chat completion response.onChatCompletion
onChatCompletionSSE({required ChatCompleteText request, void onCancel(CancelData cancelData)?}) Stream<ChatResponseSSE>
Support Server Sent Event
onCompletion({required CompleteText request, void onCancel(CancelData cancelData)?}) Future<CompleteResponse?>
About Method onCompleteText
onCompletionSSE({required CompleteText request, void onCancel(CancelData cancelData)?}) Stream<CompleteResponse>
Support Server Sent Event
setOrgId(String orgId) → void
set organization id
setToken(String token) → void
set new token
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance OpenAI
instance of openai instance
getter/setter pair