OpenIARepository class

Constructors

OpenIARepository({OpenIAService? service})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
service OpenIAService
this is the service that makes tha API calls
no setter

Methods

addApiKey(String apiKey) → void
Add an APIKey to the package
cancelFineTune({required String fineTuneId}) Future<FineTunesResponse>
Immediately cancel a fine-tune job. return a FineTunesResponse object
cancelRawFineTune({required String fineTuneId}) Future<Map<String, dynamic>>
Immediately cancel a fine-tune job. return a Map
configCompletionFromConfig(ConfigCompletion config) → void
configure the completion service from a ConfigCompletion object
configCompletionFromMap(Map<String, dynamic> newConfig) → void
configure the completion service from a map
configEditsFromConfig({required ConfigEdits config}) → void
configure the edits service from a ConfigEdits object
configEditsFromMap({required Map<String, dynamic> newConfig, required bool isText}) → void
configure the edits service from a map
configEmbeddingConfig(ConfigEmbedding newConfig) → void
configure Embedding service from map
configEmbeddingFromMap(Map<String, dynamic> newConfig) → void
configure Embedding service from map
configFineTunesFromConfig(ConfigFineTunes newConfig) → void
configure Fine-tunes service from map
configFineTunesFromMap(Map<String, dynamic> newConfig) → void
configure Fine-tunes service from map
configImagesFromConfig(ConfigImages newConfig) → void
configure the images service from a ConfigImages object
configImagesFromMap(Map<String, dynamic> newConfig) → void
configure the images service from a map
createAImageVariation({required File imageFile}) Future<ImagesResponse>
create a variation of an image and return as ImagesResponse object
createEmbedding({required String prompt}) Future<EmbeddingsResponse>
Creates an embedding vector representing the input text. returns it as a EmbeddingsResponse object
createFineTunes({required String trainingFile, String? validationFile}) Future<FineTunesResponse>
Creates a job that fine-tunes a specified model from a given dataset. return a FineTunesResponse object The ID of an uploaded file that contains training data.
createRawEmbedding({required String prompt}) Future<Map<String, dynamic>>
Creates an embedding vector representing the input text. returns it in Map
createRawFineTunes({required String trainingFile, String? validationFile}) Future<Map<String, dynamic>>
Creates a job that fine-tunes a specified model from a given dataset. return a Map The ID of an uploaded file that contains training data.
createRawImageVariation({required File imageFile}) Future<Map<String, dynamic>>
create a variation of an image and return as a Map
deleteFile({required String fileId}) Future<Map<String, dynamic>>
Delete a file
deleteFineTunelModel({required dynamic model}) Future<Map<String, dynamic>>
Delete a fine-tuned model. You must have the Owner role in your organization. Return a Map
editImage({required File image, File? mask, required String prompt}) Future<ImagesResponse>
Creates an edited or extended image given an original image and a prompt. Provide a mask is optional An mask is: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
editRawImage({required File image, File? mask, required String prompt}) Future<Map<String, dynamic>>
Creates an edited or extended image given an original image and a prompt. Provide a mask is optional An mask is: An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
getCompletion(String prompt) Future<CompletionResponse>
get a completion as CompletionResponse object
getEdits({required String input, required String instruction}) Future<EditsResponse>
get a Edit as EditsResponse object
getFilesList() Future<ListFileResponse>
Retrives the list of stored files as ListFileResponse object.
getImages(String prompt) Future<ImagesResponse>
get Images as ImagesResponse object
getListFineTunes() Future<ListFineTunesResponse>
List your organization's fine-tuning jobs, return a ListFineTunesResponse object
getModelsList() Future<OpenAiModels>
get the Models as OpenAiModels object
getRawCompletion(String prompt) Future<Map<String, dynamic>>
get a Completion as Map<String, dynamic>
getRawEdits({required String input, required String instruction}) Future<Map<String, dynamic>>
get a Edit as Map<String, dynamic>
getRawFilesList() Future<Map<String, dynamic>>
Retrives the list of stored files as Map.
getRawImages(String prompt) Future<Map<String, dynamic>>
get Images as Map<String, dynamic>
getRawListFineTunes() Future<Map<String, dynamic>>
List your organization's fine-tuning jobs, return a Map
getRawModelsList() Future<Map<String, dynamic>>
get a Models as Map<String, dynamic>
moderationCheck({required String input}) Future<ModerationResponse>
Classifies if text violates OpenAI's Content Policy, returns ModerationResponse object
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rawModerationCheck({required String input}) Future<Map<String, dynamic>>
Classifies if text violates OpenAI's Content Policy, returns a Map
retriveFileContent({required String fileId}) Future<File>
Returns the contents of the specified file.
retriveFileInfo({required String fileId}) Future<FileData>
Returns information about a specific file as FileData
retriveFineTune({required String fineTuneId}) Future<FineTunesResponse>
Gets info about the fine-tune job. return a FineTunesResponse object
retriveRawFileInfo({required String fileId}) Future<Map<String, dynamic>>
Returns information about a specific file as Map
retriveRawFineTune({required String fineTuneId}) Future<Map<String, dynamic>>
Gets info about the fine-tune job. return a Map
toString() String
A string representation of this object.
inherited
uploadFile({required File file, required String purpose}) Future<FileData>
Upload an file with some purpouse ex: fine-tune, search. the model to updated file, its need to be a JsonL, a json that contains a json with prompt and conpletion map in every line {"prompt": "
uploadFileReturningAMap({required File file, required String purpose}) Future<Map<String, dynamic>>
Upload an file with some purpouse ex: fine-tune, search. returns a Map the model to updated file, its need to be a JsonL, a json that contains a json with prompt and conpletion map in every line {"prompt": "

Operators

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