GPT3 class
Constructors
-
GPT3(String apiKey)
-
Creates the OpenAI GPT-3 helper object.
Properties
-
apiKey
↔ String
-
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
answer(Engine model, String question, List<List<String>> examples, String examplesContext, {List<String>? documents, String? file, Engine searchModel = Engine.ada, int maxRerank = 200, num temperature = 0, int? logprobs, int maxTokens = 16, List<String>? stop, int n = 1, Map<String, num>? logitBias, bool returnMetadata = false, bool returnPrompt = false, List<String>? expand})
→ Future<AnswerApiResult>
-
Answers the specified question using the provided documents and examples.
-
classification(Engine model, String query, {List<List<String>>? examples, String? file, List<String>? labels, Engine searchModel = Engine.ada, num temperature = 0, int? logprobs, int maxExamples = 200, Map<String, num>? logitBias, bool returnPrompt = false, bool returnMetadata = false, List<String>? expand})
→ Future<ClassificationApiResult>
-
Classifies the specified query using provided examples.
-
completion(String prompt, {int maxTokens = 16, num temperature = 1, num topP = 1, int n = 1, bool stream = false, int? logProbs, bool echo = false, Engine engine = Engine.davinci, String? stop, num presencePenalty = 0, num frequencyPenalty = 0, int bestOf = 1, Map<String, num>? logitBias})
→ Future<CompletionApiResult>
-
Post a 'completion' API request to the OpenAI service.
-
deleteFile(String id)
→ Future<void>
-
Delete a file by its
id
. Only owners of organizations can delete files currently.
-
listFiles()
→ Future<ListFilesApiResult>
-
Returns a list of files that belong to the user's organization.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
retrieveFile(String id)
→ Future<UploadedFile>
-
Returns information about the file with the unique
id
.
-
search(String query, {List<String>? documents, String? file, int maxRerank = 200, bool returnMetadata = false, Engine engine = Engine.davinci})
→ Future<SearchApiResult>
-
Given a query and a set of documents or labels, the model ranks each
document based on its semantic similarity to the provided
query
.
-
toString()
→ String
-
A string representation of this object.
inherited
-
uploadFile(String filePath, String purpose)
→ Future<UploadedFile>
-
Upload a file that contains document(s) to be used across various endpoints/features.