AIRequestModel class

Annotations
  • @freezed

Constructors

AIRequestModel.new({ModelAPIProvider? modelApiProvider, @Default("") String url, @Default(null) String? model, @Default(null) String? apiKey, @JsonKey(name: "system_prompt") @Default("") String systemPrompt, @JsonKey(name: "user_prompt") @Default("") String userPrompt, @JsonKey(name: "model_configs") @Default(<ModelConfig>[]) List<ModelConfig> modelConfigs, @Default(null) bool? stream})
const
factory
AIRequestModel.fromJson(Map<String, Object?> json)
factory

Properties

apiKey String?
no setterinherited
copyWith → $AIRequestModelCopyWith<AIRequestModel>
Create a copy of AIRequestModel with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
httpRequestModel → HttpRequestModel?
no setter
model String?
no setterinherited
modelApiProvider ModelAPIProvider?
no setterinherited
modelConfigs List<ModelConfig>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream bool?
no setterinherited
systemPrompt String
no setterinherited
url String
no setterinherited
userPrompt String
no setterinherited

Methods

getFormattedOutput(Map x) String?
getFormattedStreamOutput(Map x) String?
getModelConfigIdx(String id) int?
getModelConfigMap() Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this AIRequestModel to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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