GptClient class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
cancelRun ({String ? apiKey , String ? organizationId , required String threadId , required String runId })
→ Future <GptRun >
Cancels a run that is in_progress.
createAssistant ({String ? apiKey , String ? organizationId , required CreateGptAssistantRequest request })
→ Future <GptAssistant >
Create an assistant with a model and instructions.
createAssistantFile ({String ? apiKey , String ? organizationId , required String assistantId , required CreateAssistantFileRequest request })
→ Future <AssistantFile >
Create an assistant file by attaching a File to an assistant.
createChatCompletion ({String ? apiKey , String ? organizationId , required GptChatCompletionRequest request })
→ Future <GptChatCompletion >
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
createImageEdit ({String ? apiKey , String ? organizationId , required ImageEditRequest request })
→ Future <List <GptImage > >
Creates an edited or extended image given an original image and a prompt.
createImageVariation ({String ? apiKey , String ? organizationId , required ImageVariationRequest request })
→ Future <List <GptImage > >
Creates a variation of a given image.
createMessage ({String ? apiKey , String ? organizationId , required String threadId , required CreateGptMessageRequest request })
→ Future <GptAssistantMessage >
Create a message.
createRun ({String ? apiKey , String ? organizationId , required String threadId , required CreateGptRunRequest request })
→ Future <GptRun >
Create a run.
createSpeech ({String ? apiKey , String ? organizationId , required GptSpeechRequest request })
→ Future <Uint8List >
Audio
createThread ({String ? apiKey , String ? organizationId , required CreateGptThreadRequest request })
→ Future <GptThread >
Create a thread.
createThreadAndRun ({String ? apiKey , String ? organizationId , required CreateAndRunThreadRequest request })
→ Future <GptRun >
Create a thread and run it in one request.
deleteAssistant ({String ? apiKey , String ? organizationId , required String assistantId })
→ Future <void >
Delete an assistant.
deleteAssistantFile ({String ? apiKey , String ? organizationId , required String assistantId , required String fileId })
→ Future <void >
deleteFile ({String ? apiKey , String ? organizationId , required String fileId })
→ Future <void >
Delete a file.
deleteThread ({String ? apiKey , String ? organizationId , required String threadId })
→ Future <void >
Retrieves a thread.
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.
listAssistantFiles ({String ? apiKey , String ? organizationId , required String assistantId , required GetGptListRequest request })
→ Future <List <AssistantFile > >
Returns a list of assistant files.
listAssistants ({String ? apiKey , String ? organizationId , required GetGptListRequest request })
→ Future <List <GptAssistant > >
Returns a list of assistants.
listFiles ({String ? apiKey , String ? organizationId , required ListFilesRequest request })
→ Future <List <GptFile > >
Returns a list of files that belong to the user's organization.
listMessageFiles ({String ? apiKey , String ? organizationId , required String threadId , required String messageId , required GetGptListRequest request })
→ Future <List <GptMessageFile > >
Returns a list of message files.
listMessages ({String ? apiKey , String ? organizationId , required String threadId , required GetGptListRequest request })
→ Future <List <GptAssistantMessage > >
listRuns ({String ? apiKey , String ? organizationId , required String threadId })
→ Future <List <GptRun > >
Lists runs
modifyAssistant ({String ? apiKey , String ? organizationId , required String assistantId , required ModifyGptAssistantRequest request })
→ Future <GptAssistant >
Modifies an assistant.
modifyMessage ({String ? apiKey , String ? organizationId , required String threadId , required String messageId , required CreateGptMessageRequest request })
→ Future <GptAssistantMessage >
Modifies a message.
modifyRun ({String ? apiKey , String ? organizationId , required String threadId , required String runId , required ModifyGptRunRequest request })
→ Future <GptRun >
Modify a run.
modifyThread ({String ? apiKey , String ? organizationId , required String threadId , required ModifyGptThreadRequest request })
→ Future <GptThread >
Modifies a thread.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retrieveAssistant ({String ? apiKey , String ? organizationId , required String assistantId })
→ Future <GptAssistant >
Retrieves an assistant.
retrieveAssistantFile ({String ? apiKey , String ? organizationId , required String assistantId , required String fileId })
→ Future <AssistantFile >
Retrieves an AssistantFile.
retrieveFile ({String ? apiKey , String ? organizationId , required String fileId })
→ Future <GptFile >
Returns information about a specific file.
retrieveFileContent ({String ? apiKey , String ? organizationId , required String fileId })
→ Future <Uint8List >
Returns the contents of the specified file.
retrieveMessage ({String ? apiKey , String ? organizationId , required String threadId , required String messageId })
→ Future <GptAssistantMessage >
Retrieves a message.
retrieveMessageFile ({String ? apiKey , String ? organizationId , required String threadId , required String messageId , required String fileId })
→ Future <GptMessageFile >
Retrieves a message file.
retrieveRun ({String ? apiKey , String ? organizationId , required String threadId , required String runId })
→ Future <GptRun >
Retrieves a run.
retrieveThread ({String ? apiKey , String ? organizationId , required String threadId })
→ Future <GptThread >
Retrieves a thread.
submitToolOutputsToRun ({String ? apiKey , String ? organizationId , required String threadId , required String runId , required SubmitToolsOutputsRequest request })
→ Future <GptRun >
When a run has the status: "requires_action" and required_action.type
is submit_tool_outputs, this endpoint can be used to submit the outputs
from the tool calls once they're all completed. All outputs must be
submitted in a single request.
toString ()
→ String
A string representation of this object.
inherited
transcribeAudio ({String ? apiKey , String ? organizationId , required GptAudioTranscriptionRequest request , required Uint8List fileBytes })
→ Future <GptTranscriptionObject >
Transcribes audio into the input language.
translateAudio ({String ? apiKey , String ? organizationId , required GptAudioTranslationRequest request , required Uint8List fileBytes })
→ Future <GptTranslationObject >
Translates audio into English.
uploadFile ({String ? apiKey , String ? organizationId , required CreateFileRequest request , required Uint8List fileBytes })
→ Future <GptFile >
Upload a file that can be used across various endpoints.
The size of all the files uploaded by one organization can be up to 100 GB.