国产模型2
This commit is contained in:
parent
79a6934e83
commit
104cb44026
20
lib/beans/MessageBean2.g.dart
Normal file
20
lib/beans/MessageBean2.g.dart
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'MessageBean2.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
MessageBean2 _$MessageBean2FromJson(Map<String, dynamic> json) => MessageBean2(
|
||||||
|
json['sender_type'] as String?,
|
||||||
|
json['sender_name'] as String?,
|
||||||
|
json['text'] as String?,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$MessageBean2ToJson(MessageBean2 instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'sender_type': instance.sender_type,
|
||||||
|
'sender_name': instance.sender_name,
|
||||||
|
'text': instance.text,
|
||||||
|
};
|
||||||
|
|
@ -215,7 +215,7 @@ class HomeModel {
|
||||||
}*/
|
}*/
|
||||||
RequestCenter.instance.sendRequest2({
|
RequestCenter.instance.sendRequest2({
|
||||||
"model": "abab5.5s-chat",
|
"model": "abab5.5s-chat",
|
||||||
"tokens_to_generate": 256,
|
"tokens_to_generate": 512,
|
||||||
"temperature": 0.9,
|
"temperature": 0.9,
|
||||||
"top_p": 0.95,
|
"top_p": 0.95,
|
||||||
"stream": false,
|
"stream": false,
|
||||||
|
|
@ -234,7 +234,7 @@ class HomeModel {
|
||||||
]
|
]
|
||||||
}, (BaseEntity dataEntity) {
|
}, (BaseEntity dataEntity) {
|
||||||
String json = dataEntity.data;
|
String json = dataEntity.data;
|
||||||
if (_extractStarredText(json).isNotEmpty) {
|
/*if (_extractStarredText(json).isNotEmpty) {*/
|
||||||
a = 0;
|
a = 0;
|
||||||
if (dataEntity.code == 0 && dataEntity.data != null) {
|
if (dataEntity.code == 0 && dataEntity.data != null) {
|
||||||
streamController.sink.add({
|
streamController.sink.add({
|
||||||
|
|
@ -247,7 +247,7 @@ class HomeModel {
|
||||||
'data': "",
|
'data': "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
/*} else {
|
||||||
if (a < 5) {
|
if (a < 5) {
|
||||||
a++;
|
a++;
|
||||||
chat2(message);
|
chat2(message);
|
||||||
|
|
@ -257,7 +257,7 @@ class HomeModel {
|
||||||
'data': "(剧情结束)",
|
'data': "(剧情结束)",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}, (ErrorEntity errorEntity) {
|
}, (ErrorEntity errorEntity) {
|
||||||
streamController.sink.add({
|
streamController.sink.add({
|
||||||
'code': "0", //无数据
|
'code': "0", //无数据
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user