|
|
@@ -152,7 +152,16 @@ export class BigModelApi implements LLMApi {
|
|
|
}
|
|
|
// 获取当前的数据
|
|
|
const currentData = info.data;
|
|
|
- remainText += currentData;
|
|
|
+ const formatStart = '```think';
|
|
|
+ const formatEnd = 'think```';
|
|
|
+
|
|
|
+ if (currentData?.startsWith(formatStart)) {
|
|
|
+ remainText += currentData.replace(formatStart, '```think\n');
|
|
|
+ } else if (currentData?.startsWith(formatEnd)) {
|
|
|
+ remainText += currentData.replace(formatEnd, '```');
|
|
|
+ } else {
|
|
|
+ remainText += currentData;
|
|
|
+ }
|
|
|
},
|
|
|
async onclose() {
|
|
|
finish();
|