openai_sdk

Last updated:

0 purchases

openai_sdk Image
openai_sdk Images
Add to Cart

Description:

openai sdk

openai_sdk (EXPERIMENTAL) #
APIs for sampling from and fine-tuning language models
This Dart package is automatically generated by the OpenAPI Generator project:

API version: 1.2.0
Build package: org.openapitools.codegen.languages.DartDioClientCodegen

Requirements #

Dart 2.15.0+ or Flutter 2.8.0+
Dio 5.0.0+ (https://pub.dev/packages/dio)

Installation & Usage #
pub.dev #
To use the package from pub.dev, please include the following in pubspec.yaml
dependencies:
openai_sdk: 0.0.1
copied to clipboard
Github #
If this Dart package is published to Github, please include the following in pubspec.yaml
dependencies:
openai_sdk:
git:
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
#ref: main
copied to clipboard
Local development #
To use the package from your local drive, please include the following in pubspec.yaml
dependencies:
openai_sdk:
path: /path/to/openai_sdk
copied to clipboard
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:openai_sdk/openai_sdk.dart';


final api = OpenaiSdk().getOpenAIApi();
final String fineTuneId = ft-AF1WoRqd3aJAHsqc9NY7iL8F; // String | The ID of the fine-tune job to cancel

try {
final response = await api.cancelFineTune(fineTuneId);
print(response);
} catch on DioError (e) {
print("Exception when calling OpenAIApi->cancelFineTune: $e\n");
}

copied to clipboard
Documentation for API Endpoints #
All URIs are relative to https://api.openai.com/v1



Class
Method
HTTP request
Description




OpenAIApi
cancelFineTune
POST /fine-tunes/{fine_tune_id}/cancel
Immediately cancel a fine-tune job.


OpenAIApi
createAnswer
POST /answers
Answers the specified question using the provided documents and examples. The endpoint first searches over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for completion.


OpenAIApi
createChatCompletion
POST /chat/completions
Creates a completion for the chat message


OpenAIApi
createClassification
POST /classifications
Classifies the specified `query` using provided examples. The endpoint first searches over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the completions endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.


OpenAIApi
createCompletion
POST /completions
Creates a completion for the provided prompt and parameters


OpenAIApi
createEdit
POST /edits
Creates a new edit for the provided input, instruction, and parameters.


OpenAIApi
createEmbedding
POST /embeddings
Creates an embedding vector representing the input text.


OpenAIApi
createFile
POST /files
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.


OpenAIApi
createFineTune
POST /fine-tunes
Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. Learn more about Fine-tuning


OpenAIApi
createImage
POST /images/generations
Creates an image given a prompt.


OpenAIApi
createImageEdit
POST /images/edits
Creates an edited or extended image given an original image and a prompt.


OpenAIApi
createImageVariation
POST /images/variations
Creates a variation of a given image.


OpenAIApi
createModeration
POST /moderations
Classifies if text violates OpenAI's Content Policy


OpenAIApi
createSearch
POST /engines/{engine_id}/search
The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.


OpenAIApi
createTranscription
POST /audio/transcriptions
Transcribes audio into the input language.


OpenAIApi
createTranslation
POST /audio/translations
Translates audio into into English.


OpenAIApi
deleteFile
DELETE /files/{file_id}
Delete a file.


OpenAIApi
deleteModel
DELETE /models/{model}
Delete a fine-tuned model. You must have the Owner role in your organization.


OpenAIApi
downloadFile
GET /files/{file_id}/content
Returns the contents of the specified file


OpenAIApi
listEngines
GET /engines
Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.


OpenAIApi
listFiles
GET /files
Returns a list of files that belong to the user's organization.


OpenAIApi
listFineTuneEvents
GET /fine-tunes/{fine_tune_id}/events
Get fine-grained status updates for a fine-tune job.


OpenAIApi
listFineTunes
GET /fine-tunes
List your organization's fine-tuning jobs


OpenAIApi
listModels
GET /models
Lists the currently available models, and provides basic information about each one such as the owner and availability.


OpenAIApi
retrieveEngine
GET /engines/{engine_id}
Retrieves a model instance, providing basic information about it such as the owner and availability.


OpenAIApi
retrieveFile
GET /files/{file_id}
Returns information about a specific file.


OpenAIApi
retrieveFineTune
GET /fine-tunes/{fine_tune_id}
Gets info about the fine-tune job. Learn more about Fine-tuning


OpenAIApi
retrieveModel
GET /models/{model}
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.



Documentation For Models #

ChatCompletionRequestMessage
ChatCompletionResponseMessage
CreateAnswerRequest
CreateAnswerRequestStop
CreateAnswerResponse
CreateAnswerResponseSelectedDocumentsInner
CreateChatCompletionRequest
CreateChatCompletionRequestStop
CreateChatCompletionResponse
CreateChatCompletionResponseChoicesInner
CreateClassificationRequest
CreateClassificationResponse
CreateClassificationResponseSelectedExamplesInner
CreateCompletionRequest
CreateCompletionRequestPrompt
CreateCompletionRequestStop
CreateCompletionResponse
CreateCompletionResponseChoicesInner
CreateCompletionResponseChoicesInnerLogprobs
CreateCompletionResponseUsage
CreateEditRequest
CreateEditResponse
CreateEmbeddingRequest
CreateEmbeddingRequestInput
CreateEmbeddingResponse
CreateEmbeddingResponseDataInner
CreateEmbeddingResponseUsage
CreateFineTuneRequest
CreateImageRequest
CreateModerationRequest
CreateModerationRequestInput
CreateModerationResponse
CreateModerationResponseResultsInner
CreateModerationResponseResultsInnerCategories
CreateModerationResponseResultsInnerCategoryScores
CreateSearchRequest
CreateSearchResponse
CreateSearchResponseDataInner
CreateTranscriptionResponse
CreateTranslationResponse
DeleteFileResponse
DeleteModelResponse
Engine
FineTune
FineTuneEvent
ImagesResponse
ImagesResponseDataInner
ListEnginesResponse
ListFilesResponse
ListFineTuneEventsResponse
ListFineTunesResponse
ListModelsResponse
Model
OpenAIFile

Documentation For Authorization #
All endpoints do not require authorization.
Author #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.