ConfigCompletion class

Constructors

ConfigCompletion({String? model = "text-davinci-003", int? maxTokens = 150, double? temperature = 0.9, int? topP = 1, int? n = 1, bool? stream = false, int? logprobs, String? stop = ""})
ConfigCompletion.fromMap(Map<String, dynamic> map)
Create the object from a Map<String, dynamic>
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
logprobs → int?
Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5. If you need m
final
maxTokens → int?
Max Number of the Token disired to be spend in the request
final
model → String?
model utilized to create the completion
final
n → int?
How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stop → String?
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
final
stream → bool?
Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: DONE message.
final
temperature → double?
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
final
topP → int?
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.
final

Methods

copyWith({String? model, int? maxTokens, double? temperature, int? topP, int? n, bool? stream, int? logprobs, String? stop}) → ConfigCompletion
Generate a new ConfigCompletion object from the original object
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts the object to a Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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