chat_gpt_sdk library

Classes

Assistant
AssistantData
AssistantFileData
AssistantModel
AssistantModelFromValue
AudioRequest
AudioResponse
Babbage002Model
CancelData
Categories
CategoryScores
ChatCompleteText
ChatCTResponse
ChatModel
ChatModelFromValue
ChatResponseSSE
Choice
CompleteResponse
CT is Complete text CompleteResponse
CompleteText
Content
ContentV2
CreateFineTune
CreateMessage
CreateMessageResponse
CreateMessageV2Response
CreateRun
CreateRunResponse
CreateThreadAndRun
CreateThreadAndRunData
DallE2
DallE3
Davinci002Model
DeleteAssistant
DeleteFile
EditImageRequest
EditRequest
EditResponse
EmbedData
EmbedRequest
EmbedResponse
EngineModel
FileData
FileInfo
FileResponse
FineTuneDelete
FineTuneEvent
FineTuneHyperParams
FineTuneModel
FunctionData
GenerateImage
GenerateImageModel
GenImgResponse
Gpt3TurboInstruct
Gpt40314ChatModel
Gpt40631ChatModel
Gpt41106PreviewAModel
Gpt41106PreviewChatModel
Gpt432k0314ChatModel
Gpt432kChatModel
Gpt4AModel
Gpt4ChatModel
Gpt4O2024ChatModel
Gpt4O2024Model
Gpt4OChatModel
Gpt4oMini2024ChatModel
Gpt4oMini2024Model
Gpt4oMiniChatModel
Gpt4oMiniModel
Gpt4OModel
Gpt4VisionPreviewChatModel
GptTurbo0301AModel
GptTurbo0301ChatModel
GptTurbo0631Model
GptTurbo1106AModel
GptTurbo1106Model
GptTurbo16k0631Model
GptTurboChatModel
GptTurboModel
HttpSetup
JsonSchema
ListAssistantFile
ListMessageFile
ListMessageFileData
ListRun
MessageCreation
MessageData
MessageDataResponse
Messages
Model
ModelFromValue
OpenAI
OpenAiModel
ResponseFormat
SpeechRequest
StepDetail
TextData
ThreadDeleteResponse
ThreadRequest
ThreadResponse
Tool
TrainingFiles
UploadFile
UploadResponse
Variation

Enums

AudioFormat
audio response format.AudioFormat
Format
The format in which the generated images are returned. Must be one of url or b64_json.
FunctionCall
ImageSize
The size of the generated images.
Role

Constants

kAssistants → const String
assistants
kBabbage002Model → const String
fine tune models
kChatGpt4 → const String
kChatGpt40314 → const String
kChatGpt40631 → const String
kChatGpt432k → const String
kChatGpt432k0314 → const String
kChatGptTurbo → const String
chat completion
kChatGptTurbo0301Model → const String
kChatGptTurbo0613 → const String
kChatGptTurbo1106 → const String
kChatGptTurbo16k0613 → const String
kChatGptTurboModel → const String
chat complete 3.5 and gpt-4
kCompletion → const String
kCreateSpeech → const String
kDallE2 → const String
generate image model
kDallE3 → const String
kDavinci002Model → const String
kEditPrompt → const String
edit prompt
kEmbedding → const String
embeddings
kEmbeddingAda002 → const String
edits embeddings
kEngineList → const String
get list engine
kFile → const String
files
kFineTune → const String
fine tune
kFineTuneJob → const String
kFineTuneModel → const String
fine tune model
kGenerateImage → const String
generate image with prompt
kGpt3TurboInstruct → const String
model name
kGpt41106Preview → const String
kGpt4o → const String
kGpt4O2024 → const String
kGpt4oMini → const String
kGpt4oMini2024 → const String
kGpt4VisionPreview → const String
kImageEdit → const String
image edit
kMessages → const String
messages
kModelList → const String
get list model
kModeration → const String
moderation's
kOpenAI → const String
kOrgIdKey → const String
kRateLimitMessage → const String
kRuns → const String
runs
kTextEmbedding3Large → const String
kTextEmbedding3Small → const String
kTextMLast → const String
kTextMStable → const String
moderation model
kThread → const String
threads
kTokenKey → const String
key data
kTranscription → const String
audio
kTranslations → const String
kURL → const String
Base ChatGPT Url
kVariation → const String
variation

Properties

headersAssistants Map<String, String>
getter/setter pair
headersAssistantsV2 Map<String, String>
getter/setter pair

Functions

kHeader(String? token, String? orgId) Map<String, String>
default header
translateEngToThai({required String word}) String
translateThaiToEng({required String word}) String
translateToJapanese({required String word}) String

Exceptions / Errors

MissingTokenException
MissingTokenException not found access token
OpenAIAuthError
Cause: Invalid Authentication Solution: Ensure the correct API key and requesting organization are being used.
OpenAIRateLimitError
Cause: You are sending requests too quickly. Solution: Pace your requests. Read the Rate limit guide.
OpenAIServerError
Cause: Issue on our servers. Solution: Retry your request after a brief wait and contact us if the issue persists. Check the status page.
RequestError
RequestError normal error