mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
AIProviderSelector Impl & AI Models added to RequestModel
This commit is contained in:
@@ -39,6 +39,8 @@ mixin _$RequestModel {
|
||||
bool get isStreaming => throw _privateConstructorUsedError;
|
||||
String? get preRequestScript => throw _privateConstructorUsedError;
|
||||
String? get postRequestScript => throw _privateConstructorUsedError;
|
||||
AIRequestModel? get aiRequestModel => throw _privateConstructorUsedError;
|
||||
AIResponseModel? get aiResponseModel => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RequestModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -70,10 +72,14 @@ abstract class $RequestModelCopyWith<$Res> {
|
||||
@JsonKey(includeToJson: false) DateTime? sendingTime,
|
||||
@JsonKey(includeToJson: false) bool isStreaming,
|
||||
String? preRequestScript,
|
||||
String? postRequestScript});
|
||||
String? postRequestScript,
|
||||
AIRequestModel? aiRequestModel,
|
||||
AIResponseModel? aiResponseModel});
|
||||
|
||||
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
|
||||
$HttpResponseModelCopyWith<$Res>? get httpResponseModel;
|
||||
$AIRequestModelCopyWith<$Res>? get aiRequestModel;
|
||||
$AIResponseModelCopyWith<$Res>? get aiResponseModel;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -105,6 +111,8 @@ class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
|
||||
Object? isStreaming = null,
|
||||
Object? preRequestScript = freezed,
|
||||
Object? postRequestScript = freezed,
|
||||
Object? aiRequestModel = freezed,
|
||||
Object? aiResponseModel = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
@@ -163,6 +171,14 @@ class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
|
||||
? _value.postRequestScript
|
||||
: postRequestScript // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
aiRequestModel: freezed == aiRequestModel
|
||||
? _value.aiRequestModel
|
||||
: aiRequestModel // ignore: cast_nullable_to_non_nullable
|
||||
as AIRequestModel?,
|
||||
aiResponseModel: freezed == aiResponseModel
|
||||
? _value.aiResponseModel
|
||||
: aiResponseModel // ignore: cast_nullable_to_non_nullable
|
||||
as AIResponseModel?,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@@ -193,6 +209,34 @@ class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
|
||||
return _then(_value.copyWith(httpResponseModel: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AIRequestModelCopyWith<$Res>? get aiRequestModel {
|
||||
if (_value.aiRequestModel == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AIRequestModelCopyWith<$Res>(_value.aiRequestModel!, (value) {
|
||||
return _then(_value.copyWith(aiRequestModel: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AIResponseModelCopyWith<$Res>? get aiResponseModel {
|
||||
if (_value.aiResponseModel == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AIResponseModelCopyWith<$Res>(_value.aiResponseModel!, (value) {
|
||||
return _then(_value.copyWith(aiResponseModel: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -217,12 +261,18 @@ abstract class _$$RequestModelImplCopyWith<$Res>
|
||||
@JsonKey(includeToJson: false) DateTime? sendingTime,
|
||||
@JsonKey(includeToJson: false) bool isStreaming,
|
||||
String? preRequestScript,
|
||||
String? postRequestScript});
|
||||
String? postRequestScript,
|
||||
AIRequestModel? aiRequestModel,
|
||||
AIResponseModel? aiResponseModel});
|
||||
|
||||
@override
|
||||
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
|
||||
@override
|
||||
$HttpResponseModelCopyWith<$Res>? get httpResponseModel;
|
||||
@override
|
||||
$AIRequestModelCopyWith<$Res>? get aiRequestModel;
|
||||
@override
|
||||
$AIResponseModelCopyWith<$Res>? get aiResponseModel;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -252,6 +302,8 @@ class __$$RequestModelImplCopyWithImpl<$Res>
|
||||
Object? isStreaming = null,
|
||||
Object? preRequestScript = freezed,
|
||||
Object? postRequestScript = freezed,
|
||||
Object? aiRequestModel = freezed,
|
||||
Object? aiResponseModel = freezed,
|
||||
}) {
|
||||
return _then(_$RequestModelImpl(
|
||||
id: null == id
|
||||
@@ -309,6 +361,14 @@ class __$$RequestModelImplCopyWithImpl<$Res>
|
||||
? _value.postRequestScript
|
||||
: postRequestScript // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
aiRequestModel: freezed == aiRequestModel
|
||||
? _value.aiRequestModel
|
||||
: aiRequestModel // ignore: cast_nullable_to_non_nullable
|
||||
as AIRequestModel?,
|
||||
aiResponseModel: freezed == aiResponseModel
|
||||
? _value.aiResponseModel
|
||||
: aiResponseModel // ignore: cast_nullable_to_non_nullable
|
||||
as AIResponseModel?,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -331,7 +391,9 @@ class _$RequestModelImpl implements _RequestModel {
|
||||
@JsonKey(includeToJson: false) this.sendingTime,
|
||||
@JsonKey(includeToJson: false) this.isStreaming = false,
|
||||
this.preRequestScript,
|
||||
this.postRequestScript});
|
||||
this.postRequestScript,
|
||||
this.aiRequestModel,
|
||||
this.aiResponseModel});
|
||||
|
||||
factory _$RequestModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RequestModelImplFromJson(json);
|
||||
@@ -371,10 +433,14 @@ class _$RequestModelImpl implements _RequestModel {
|
||||
final String? preRequestScript;
|
||||
@override
|
||||
final String? postRequestScript;
|
||||
@override
|
||||
final AIRequestModel? aiRequestModel;
|
||||
@override
|
||||
final AIResponseModel? aiResponseModel;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RequestModel(id: $id, apiType: $apiType, name: $name, description: $description, requestTabIndex: $requestTabIndex, httpRequestModel: $httpRequestModel, responseStatus: $responseStatus, message: $message, httpResponseModel: $httpResponseModel, isWorking: $isWorking, sendingTime: $sendingTime, isStreaming: $isStreaming, preRequestScript: $preRequestScript, postRequestScript: $postRequestScript)';
|
||||
return 'RequestModel(id: $id, apiType: $apiType, name: $name, description: $description, requestTabIndex: $requestTabIndex, httpRequestModel: $httpRequestModel, responseStatus: $responseStatus, message: $message, httpResponseModel: $httpResponseModel, isWorking: $isWorking, sendingTime: $sendingTime, isStreaming: $isStreaming, preRequestScript: $preRequestScript, postRequestScript: $postRequestScript, aiRequestModel: $aiRequestModel, aiResponseModel: $aiResponseModel)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -405,7 +471,11 @@ class _$RequestModelImpl implements _RequestModel {
|
||||
(identical(other.preRequestScript, preRequestScript) ||
|
||||
other.preRequestScript == preRequestScript) &&
|
||||
(identical(other.postRequestScript, postRequestScript) ||
|
||||
other.postRequestScript == postRequestScript));
|
||||
other.postRequestScript == postRequestScript) &&
|
||||
(identical(other.aiRequestModel, aiRequestModel) ||
|
||||
other.aiRequestModel == aiRequestModel) &&
|
||||
(identical(other.aiResponseModel, aiResponseModel) ||
|
||||
other.aiResponseModel == aiResponseModel));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -425,7 +495,9 @@ class _$RequestModelImpl implements _RequestModel {
|
||||
sendingTime,
|
||||
isStreaming,
|
||||
preRequestScript,
|
||||
postRequestScript);
|
||||
postRequestScript,
|
||||
aiRequestModel,
|
||||
aiResponseModel);
|
||||
|
||||
/// Create a copy of RequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -458,7 +530,9 @@ abstract class _RequestModel implements RequestModel {
|
||||
@JsonKey(includeToJson: false) final DateTime? sendingTime,
|
||||
@JsonKey(includeToJson: false) final bool isStreaming,
|
||||
final String? preRequestScript,
|
||||
final String? postRequestScript}) = _$RequestModelImpl;
|
||||
final String? postRequestScript,
|
||||
final AIRequestModel? aiRequestModel,
|
||||
final AIResponseModel? aiResponseModel}) = _$RequestModelImpl;
|
||||
|
||||
factory _RequestModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RequestModelImpl.fromJson;
|
||||
@@ -495,6 +569,10 @@ abstract class _RequestModel implements RequestModel {
|
||||
String? get preRequestScript;
|
||||
@override
|
||||
String? get postRequestScript;
|
||||
@override
|
||||
AIRequestModel? get aiRequestModel;
|
||||
@override
|
||||
AIResponseModel? get aiResponseModel;
|
||||
|
||||
/// Create a copy of RequestModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
Reference in New Issue
Block a user