CompletionRequest class

Annotations
  • @freezed

Constructors

CompletionRequest({required String prompt, required String model, @JsonKey(name: 'max_tokens') int? maxTokens, @Default(0) int temperature})
const
factory
CompletionRequest.fromJson(Map<String, Object?> json)
factory

Properties

copyWith → $CompletionRequestCopyWith<CompletionRequest>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
maxTokens int?
The maximum number of tokens to generate in the completion.
no setterinherited
model String
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
no setterinherited
prompt String
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature int
What sampling temperature to use. Higher values means the model will take more risks.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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