Repository navigation
Expand file tree
/
Copy pathguoba.support.js
More file actions
1987 lines (1982 loc) · 83.5 KB
/
Copy pathguoba.support.js
File metadata and controls
1987 lines (1982 loc) · 83.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { Config } from './utils/config.js'
import { speakers, vits_emotion_map } from './utils/tts.js'
import { supportConfigurations as azureRoleList } from './utils/tts/microsoft-azure.js'
import { supportConfigurations as voxRoleList } from './utils/tts/voicevox.js'
import lodash from "lodash";
// 支持锅巴
export function supportGuoba() {
return {
// 插件信息,将会显示在前端页面
// 如果你的插件没有在插件库里,那么需要填上补充信息
// 如果存在的话,那么填不填就无所谓了,填了就以你的信息为准
pluginInfo: {
name: 'chatgpt-plugin',
title: 'ChatGPT-Plugin',
author: ['@ikechan8370', '@misaka20002'],
authorLink: ['https://github.com/ikechan8370', 'https://github.com/misaka20002'],
link: 'https://github.com/misaka20002/chatgpt-plugin',
isV3: true,
isV2: false,
description: '基于OpenAI最新推出的chatgpt和微软的 New bing通过api进行聊天的插件,需自备openai账号或有New bing访问权限的必应账号',
// 显示图标,此为个性化配置
// 图标可在 https://icon-sets.iconify.design 这里进行搜索
icon: 'simple-icons:openai',
// 图标颜色,例:#FF0000 或 rgb(255, 0, 0)
iconColor: '#00c3ff'
},
// 配置项信息
configInfo: {
// 配置项 schemas
schemas: [
{
label: '全局',
component: 'SOFT_GROUP_BEGIN'
},
{
label: '通用配置',
component: 'Divider'
},
{
field: 'toggleMode',
label: '触发方式',
bottomHelpMessage: 'at模式下只有at机器人才会回复。#chat模式下不需要at,但需要添加前缀#chat 其他指令:#chatgpt[开启|关闭]回复确认',
component: 'Select',
componentProps: {
options: [
{ label: 'at', value: 'at' },
{ label: '#chat', value: 'prefix' }
]
}
},
{
field: 'allowOtherMode',
label: '允许其他模式',
bottomHelpMessage: '开启后,则允许用户使用#chat1/#chat3/#chatglm/#bing等命令无视全局模式进行聊天',
component: 'Switch'
},
{
field: 'blockWords',
label: '输出黑名单',
bottomHelpMessage: '检查输出结果中是否有违禁词,如果存在黑名单中的违禁词则不输出。英文逗号隔开',
component: 'InputTextArea'
},
{
field: 'promptBlockWords',
label: '输入黑名单',
bottomHelpMessage: '检查输入结果中是否有违禁词,如果存在黑名单中的违禁词则不输出。英文逗号隔开',
component: 'InputTextArea'
},
{
field: 'whitelist',
label: '对话白名单',
bottomHelpMessage: '呆毛版白名单优先方案:群号用英文逗号分割(例如群号:123456,654321);如果想指定某QQ号则在QQ号前面添加^(例如QQ号:^123456);如果想指定某群的某QQ号则使用 群号^qq 的格式(例如:123456^123456)。说明:1、全局白名单模式,即除白名单以外的都不能使用插件对话;2、可在白名单的基础上指定黑名单;3、若什么都不填则关闭白名单功能仅使用黑名单功能。' +
'白名单优先级:群号^qq > qq > 群号。\n' +
'黑名单优先级: 群号 > qq > 群号^qq。',
component: 'Input'
},
{
field: 'blacklist',
label: '对话黑名单',
bottomHelpMessage: '参考白名单设置规则。',
component: 'Input'
},
{
field: 'switch_ChatCooldown',
label: '不允许并发对话',
bottomHelpMessage: '不允许并发对话,用户要等待上一次对话完成后才可以触发下一次对话;每个群单独计算,主人不受限制',
component: 'Switch'
},
{
field: 'enableRobotAt',
label: '是否允许机器人真at',
bottomHelpMessage: '开启后机器人的回复如果at群友会真的at;当Bot输出的文本中包含特定群友的昵称或群昵称时',
component: 'Switch'
},
{
field: 'enableGroupContext',
label: '是否允许机器人读取近期的群聊聊天记录',
bottomHelpMessage: '开启后机器人可以知道群名、最近发言等信息;同时将替换设定中的 [name] 字符串为机器人群昵称/昵称',
component: 'Switch'
},
{
field: 'groupContextTip',
label: '机器人读取聊天记录时的后台prompt',
component: 'InputTextArea'
},
{
field: 'groupContextLength',
label: '允许机器人读取近期的最多群聊聊天记录条数。',
bottomHelpMessage: '允许机器人读取近期的最多群聊聊天记录条数。太多可能会超。默认50。同时影响所有模式,不止必应',
component: 'InputNumber'
},
{
field: 'enablePrivateChat',
label: '是否允许私聊机器人',
component: 'Switch'
},
{
field: 'groupMerge',
label: '群组消息合并',
bottomHelpMessage: '开启后,群聊消息将被视为同一对话',
component: 'Switch'
},
{
field: 'conversationPreserveTime',
label: '对话保留时长',
helpMessage: '单位:秒',
bottomHelpMessage: '每个人发起的对话保留时长。超过这个时长没有进行对话,再进行对话将开启新的对话。',
component: 'InputNumber',
componentProps: {
min: 0
}
},
{
field: 'forwardReasoning',
label: '是否转发思考过程',
bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。仅适配reasoning_content。默认开启。',
component: 'Switch'
},
{
field: 'removeCQCodeFocus',
label: '移除CQ码',
bottomHelpMessage: '强制移除Bot回复消息中的恼人的 CQ 码',
component: 'Switch'
},
{
label: '图片模式',
component: 'Divider'
},
{
field: 'defaultUsePicture',
label: '全局图片模式',
bottomHelpMessage: '全局默认以图片形式回复,需要开启工具箱',
component: 'Switch'
},
{
field: 'autoUsePicture',
label: '长文本自动转图片',
bottomHelpMessage: '字数大于阈值会自动用图片发送,即使是文本模式',
component: 'Switch'
},
{
field: 'autoUsePictureThreshold',
label: '自动转图片阈值',
helpMessage: '长文本自动转图片开启后才生效,当报错“error happened while uploading content to the cache server. QR Code will not be showed in this picture”时请关闭该选项',
bottomHelpMessage: '自动转图片的字数阈值',
component: 'InputNumber',
componentProps: {
min: 0
}
},
{
field: 'quoteReply',
label: '图片引用消息',
bottomHelpMessage: '在回复图片时引用原始消息',
component: 'Switch'
},
{
field: 'showQRCode',
label: '启用二维码',
bottomHelpMessage: '在图片模式中启用二维码。该对话内容将被发送至第三方服务器以进行渲染展示,如果不希望对话内容被上传到第三方服务器请关闭此功能',
component: 'Switch'
},
{
label: '系统配置',
component: 'Divider'
},
{
field: 'enableToolbox',
label: '开启工具箱',
bottomHelpMessage: '独立的后台管理面板(默认3321端口),与锅巴类似。工具箱会有额外占用,启动速度稍慢,酌情开启。修改后需重启生效!呆毛版 推荐关闭',
component: 'Switch'
},
{
field: 'proxy',
label: '代理服务器地址',
bottomHelpMessage: '数据通过代理服务器发送,http或socks5代理。配置后需重启',
component: 'Input'
},
{
field: 'debug',
label: '调试信息',
bottomHelpMessage: '将输出更多调试信息,如果不希望控制台刷屏的话,可以关闭',
component: 'Switch'
},
{
field: 'is_recallMsg',
label: '撤回错误消息',
bottomHelpMessage: '是否撤回大模型调用出错时的错误消息,此开关重启生效;如果你的云崽平台出现撤回错误消息时把用户消息也一起撤回了,请转到此平台: https://github.com/AIGC-Yunzai/Trss-Yunzai-lagrange',
component: 'Switch'
},
{
field: 'translateSource',
label: '翻译来源',
bottomHelpMessage: '#gpt翻译使用的AI来源',
component: 'Select',
componentProps: {
options: [
{ label: 'OpenAI', value: 'openai' },
{ label: 'Gemini', value: 'gemini' },
{ label: '星火', value: 'xh' },
{ label: '通义千问', value: 'qwen' }
]
}
},
{
label: '对话',
component: 'SOFT_GROUP_BEGIN'
},
{
label: '以下为API方式(默认)的配置',
component: 'Divider'
},
{
field: 'apiKey',
label: 'OpenAI API Key',
bottomHelpMessage: 'OpenAI的ApiKey,用于访问OpenAI的API接口',
component: 'InputPassword'
},
{
field: 'model',
label: 'OpenAI 模型',
bottomHelpMessage: '填写OpenAI模型或OpenAI API兼容的其他模型。可用指令: #chatgpt[开启|关闭]API流',
component: 'Input'
},
{
field: 'apiMaxToken',
label: 'max token',
bottomHelpMessage: '默认4096',
component: 'InputNumber'
},
{
field: 'openAiBaseUrl',
label: 'OpenAI API/反代地址',
bottomHelpMessage: 'OpenAI兼容API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1',
component: 'Input'
},
{
field: 'openAiForceUseReverse',
label: '强制使用API地址',
bottomHelpMessage: '强制使用 OpenAI API/反代地址 而不是走OpenAI官网链接',
component: 'Switch'
},
{
field: 'promptPrefixOverride',
label: 'AI风格',
bottomHelpMessage: '你可以在这里写入你希望AI回答的风格,比如希望优先回答中文,回答长一点等',
component: 'InputTextArea'
},
{
field: 'temperature',
label: 'temperature',
bottomHelpMessage: '用于控制回复内容的多样性,数值越大回复越加随机、多元化,数值越小回复越加保守',
component: 'InputNumber',
componentProps: {
min: 0,
max: 2
}
},
{
label: '以下为必应方式的配置。',
component: 'Divider'
},
{
field: 'bingReasoning',
label: 'Bing开启思考',
bottomHelpMessage: 'Copilot的思考功能。开启后无法搜索',
component: 'Switch'
},
{
field: 'enableGroupContext',
label: '是否允许机器人读取近期的群聊聊天记录',
bottomHelpMessage: '开启后机器人可以知道群名、最近发言等信息',
component: 'Switch'
},
{
field: 'groupContextTip',
label: '机器人读取聊天记录时的后台prompt',
component: 'InputTextArea'
},
{
field: 'enforceMaster',
label: '加强主人认知',
bottomHelpMessage: '加强主人认知。希望机器人认清主人,避免NTR可开启。开启后可能会与自设定的内容有部分冲突。sydney模式可以放心开启',
component: 'Switch'
},
{
field: 'sydney',
label: 'Custom的设定',
bottomHelpMessage: '你可以自己改写设定,让Copilot变成你希望的样子。可能存在不稳定的情况',
component: 'InputTextArea'
},
{
field: 'sydneyReverseProxy',
label: '必应反代',
bottomHelpMessage: '用于创建对话(默认不用于正式对话)。目前国内ip和部分境外IDC IP由于微软限制创建对话,如果有bing.com的反代可以填在此处,或者使用proxy。默认为https://666102.201666.xyz',
component: 'Input'
},
{
field: 'bingAiToken',
label: '必应AccessToken',
bottomHelpMessage: 'Copilot的AccessToken,scope需为ChatAI.ReadWrite。可以发送`#Copilot配置方法`查看浏览器获取配置的方法。',
component: 'Input'
},
{
field: 'bingAiClientId',
label: '必应ClientId',
bottomHelpMessage: '配合RefreshToken刷新AccessToken',
component: 'Input'
},
{
field: 'bingAiScope',
label: '必应Auth Scope',
bottomHelpMessage: '配合RefreshToken刷新AccessToken',
component: 'Input'
},
{
field: 'bingAiRefreshToken',
label: '必应RefreshToken',
bottomHelpMessage: '配合RefreshToken刷新AccessToken',
component: 'Input'
},
{
field: 'bingAiOid',
label: '必应Oid',
bottomHelpMessage: '(homeAccountId)配合RefreshToken刷新AccessToken',
component: 'Input'
},
{
field: '_2captchaKey',
label: '2captcha API密钥',
bottomHelpMessage: '用于解除Copilot的验证码',
component: 'Input'
},
{
label: '以下为API3方式的配置',
component: 'Divider'
},
{
field: 'api',
label: 'ChatGPT API反代服务器地址',
bottomHelpMessage: 'ChatGPT的API反代服务器,用于绕过Cloudflare访问ChatGPT API',
component: 'Input'
},
{
field: 'apiBaseUrl',
label: 'apiBaseUrl地址',
bottomHelpMessage: 'apiBaseUrl地址',
component: 'Input'
},
{
field: 'apiForceUseReverse',
label: '强制使用ChatGPT反代',
bottomHelpMessage: '即使配置了proxy,依然使用ChatGPT反代',
component: 'Switch'
},
{
field: 'useGPT4',
label: '使用GPT-4',
bottomHelpMessage: '使用GPT-4,注意试用配额较低,如果用不了就关掉',
component: 'Switch'
},
{
label: '以下为智谱清言(ChatGLM)方式的配置。',
component: 'Divider'
},
{
field: 'chatglmRefreshToken',
label: 'refresh token',
bottomHelpMessage: 'chatglm_refresh_token 6个月有效期',
component: 'Input'
},
{
label: '以下为Claude API方式的配置',
component: 'Divider'
},
{
field: 'claudeApiKey',
label: 'claude API Key',
bottomHelpMessage: '前往 https://console.anthropic.com/settings/keys 注册和生成。可以填写多个,用英文逗号隔开',
component: 'InputPassword'
},
{
field: 'claudeApiModel',
label: 'claude API 模型',
bottomHelpMessage: '如 claude-3-sonnet-20240229 或 claude-3-opus-20240229',
component: 'Input'
},
{
field: 'claudeApiBaseUrl',
label: 'claude API 反代',
component: 'Input'
},
{
field: 'claudeApiMaxToken',
label: 'claude 最大回复token数',
component: 'InputNumber'
},
{
field: 'claudeApiTemperature',
label: 'claude 温度',
component: 'InputNumber',
componentProps: {
min: 0,
max: 1
}
},
{
field: 'claudeSystemPrompt',
label: 'claude 设定',
component: 'InputTextArea'
},
{
label: '以下为Claude2方式的配置',
component: 'Divider'
},
{
field: 'claudeAIOrganizationId',
label: 'claude2 OrganizationId',
bottomHelpMessage: 'claude.ai的OrganizationId',
component: 'Input'
},
{
field: 'claudeAISessionKey',
label: 'claude2 SessionKey',
bottomHelpMessage: 'claude.ai Cookie中的SessionKey',
component: 'Input'
},
{
field: 'claudeAIReverseProxy',
label: 'claude2 反代',
bottomHelpMessage: 'claude.ai 的反代。或许可以参考https://github.com/ikechan8370/sydney-ws-proxy/tree/claude.ai搭建',
component: 'Input'
},
{
field: 'claudeAIJA3',
label: 'claude2浏览器指纹',
bottomHelpMessage: 'claude.ai使用的浏览器TLS指纹,去https://scrapfly.io/web-scraping-tools/ja3-fingerprint或https://ja3.zone/check查看。如果用了反代就不用管',
component: 'Input'
},
{
field: 'claudeAIUA',
label: 'claude2浏览器UA',
bottomHelpMessage: 'claude.ai使用的浏览器UA,https://scrapfly.io/web-scraping-tools/http2-fingerprint或https://ja3.zone/check查看。如果用了反代就不用管',
component: 'Input'
},
{
field: 'claudeAITimeout',
label: 'claude2超时时间',
bottomHelpMessage: '等待响应的超时时间,单位为秒,默认为120。如果不使用反代而是使用代理可以适当调低。',
component: 'InputNumber'
},
{
label: '以下为星火方式的配置',
component: 'Divider'
},
{
field: 'xhmode',
label: '星火模式',
bottomHelpMessage: '设置星火使用的对话模式',
component: 'Select',
componentProps: {
options: [
{ label: '体验版', value: 'web' },
{ label: '讯飞星火认知大模型V1.5', value: 'api' },
{ label: '讯飞星火认知大模型V2.0', value: 'apiv2' },
{ label: '讯飞星火认知大模型V3.0', value: 'apiv3' },
{ label: '讯飞星火认知大模型V3.5', value: 'apiv3.5' },
{ label: '讯飞星火认知大模型V4.0', value: 'apiv4.0' },
{ label: '讯飞星火助手', value: 'assistants' }
]
}
},
{
field: 'xinghuoToken',
label: '星火Cookie',
bottomHelpMessage: '获取对话页面的ssoSessionId cookie。不要带等号和分号',
component: 'InputPassword'
},
{
field: 'xhAppId',
label: 'AppId',
bottomHelpMessage: '应用页面获取',
component: 'Input'
},
{
field: 'xhAPISecret',
label: 'APISecret',
bottomHelpMessage: '应用页面获取',
component: 'InputPassword'
},
{
field: 'xhAPIKey',
label: '星火APIKey',
bottomHelpMessage: '应用页面获取',
component: 'InputPassword'
},
{
field: 'xhAssistants',
label: '助手接口',
bottomHelpMessage: '助手页面获取',
component: 'Input'
},
{
field: 'xhTemperature',
label: '核采样阈值',
bottomHelpMessage: '核采样阈值。用于决定结果随机性,取值越高随机性越强即相同的问题得到的不同答案的可能性越高',
component: 'InputNumber'
},
{
field: 'xhMaxTokens',
label: '最大Token',
bottomHelpMessage: '模型回答的tokens的最大长度',
component: 'InputNumber'
},
{
field: 'xhPromptSerialize',
label: '序列化设定',
bottomHelpMessage: '是否将设定内容进行json序列化',
component: 'Switch'
},
{
field: 'xhPrompt',
label: '设定',
bottomHelpMessage: '若开启序列化,请传入json数据,例如[{ \"role\": \"user\", \"content\": \"现在是10点\" },{ \"role\": \"assistant\", \"content\": \"了解,现在10点了\" }]',
component: 'InputTextArea'
},
{
field: 'xhRetRegExp',
label: '回复替换正则',
bottomHelpMessage: '要替换文本的正则',
component: 'Input'
},
{
field: 'xhRetReplace',
label: '回复内容替换',
bottomHelpMessage: '替换回复内容中的文本',
component: 'Input'
},
{
label: '以下为通义千问API方式的配置',
component: 'Divider'
},
{
field: 'qwenApiKey',
label: '通义千问API Key',
bottomHelpMessage: '通义千问的ai人格使用“API方式”中的设置,请自行设置',
component: 'InputPassword'
},
{
field: 'qwenModel',
label: '通义千问模型',
bottomHelpMessage: '指明需要调用的模型,目前可选 qwen-turbo 和 qwen-plus',
component: 'Input'
},
{
field: 'qwenTopP',
label: '通义千问topP',
bottomHelpMessage: '生成时,核采样方法的概率阈值。例如,取值为0.8时,仅保留累计概率之和大于等于0.8的概率分布中的token,作为随机采样的候选集。取值范围为(0,1.0),取值越大,生成的随机性越高;取值越低,生成的随机性越低。默认值 0.5。注意,取值不要大于等于1',
component: 'InputNumber'
},
{
field: 'qwenTopK',
label: '通义千问topK',
bottomHelpMessage: '生成时,采样候选集的大小。例如,取值为50时,仅将单次生成中得分最高的50个token组成随机采样的候选集。取值越大,生成的随机性越高;取值越小,生成的确定性越高。注意:如果top_k的值大于100,top_k将采用默认值0,表示不启用top_k策略,此时仅有top_p策略生效。',
component: 'InputNumber'
},
{
field: 'qwenSeed',
label: '通义千问Seed',
bottomHelpMessage: '生成时,随机数的种子,用于控制模型生成的随机性。如果使用相同的种子,每次运行生成的结果都将相同;当需要复现模型的生成结果时,可以使用相同的种子。seed参数支持无符号64位整数类型。默认值 0, 表示每次随机生成',
component: 'InputNumber'
},
{
field: 'qwenTemperature',
label: '通义千问温度',
bottomHelpMessage: '用于控制随机性和多样性的程度。具体来说,temperature值控制了生成文本时对每个候选词的概率分布进行平滑的程度。较高的temperature值会降低概率分布的峰值,使得更多的低概率词被选择,生成结果更加多样化;而较低的temperature值则会增强概率分布的峰值,使得高概率词更容易被选择,生成结果更加确定。\n' +
'\n' +
'取值范围: (0, 2),系统默认值1.0',
component: 'InputNumber'
},
{
field: 'qwenEnableSearch',
label: '通义千问允许搜索',
bottomHelpMessage: '生成时,是否参考夸克搜索的结果。注意:打开搜索并不意味着一定会使用搜索结果;如果打开搜索,模型会将搜索结果作为prompt,进而“自行判断”是否生成结合搜索结果的文本,默认为false',
component: 'Switch'
},
{
label: '以下为Azure chatGPT的配置',
component: 'Divider'
},
{
field: 'azApiKey',
label: 'Azure API Key',
bottomHelpMessage: '管理密钥,用于访问Azure的API接口',
component: 'InputPassword'
},
{
field: 'azureUrl',
label: '端点地址',
bottomHelpMessage: 'https://xxxx.openai.azure.com/',
component: 'Input'
},
{
field: 'azureDeploymentName',
label: '部署名称',
bottomHelpMessage: '创建部署时输入的名称',
component: 'Input'
},
{
label: '以下为Gemini方式的配置',
component: 'Divider'
},
{
field: 'geminiBaseUrl',
label: 'Gemini反代',
bottomHelpMessage: '对https://generativelanguage.googleapis.com的反代,可以填入https://gemini.ikechan8370.com 或 https://gemini.maliy.top (常见报错:500 Internal Server Error)',
component: 'Input'
},
{
field: 'geminiKey',
label: 'API密钥',
bottomHelpMessage: '前往https://makersuite.google.com/app/apikey获取,如果有多个用英文逗号隔开,Key将轮替使用;可用指令:#chatgpt设置geminikey #chatgpt切换gemini',
component: 'InputPassword'
},
{
field: 'geminiModel',
label: '模型',
bottomHelpMessage: '默认值:gemini-2.0-flash;推荐:gemini-exp-1206,gemini-2.0-flash-thinking-exp-01-21;可用模型每日自动更新,立即更新指令:#派蒙chatgpt立即执行每日自动任务',
component: 'Select',
componentProps: {
options: Config.get_geminiModels().map(s => { return { label: s, value: s } })
}
},
{
field: 'gemini_vqa_model',
label: 'gemini识图模型',
bottomHelpMessage: '用于#识图 #gpt翻[英|中|译] 智能模式Gemini识图工具 和 对话中图片识别-gemini;默认值:gemini-2.0-flash',
component: 'Select',
componentProps: {
options: Config.get_geminiModels().map(s => { return { label: s, value: s } })
}
},
{
field: 'recognitionByGemini',
label: '对话中图片识别',
bottomHelpMessage: '呆毛版 对话的前面加上gemini的识图结果(用于无识图能力的接口)(如果对话时使用gemini-2.5及以上的模型时,这个功能和"对话中图片OCR"都不用开了);使用方法:1、建议关闭“全局-对话中图片OCR”功能;2、需要配置了gemini的key才能使用;3、需要同时包含图片和消息才生效,是否生效在控制台通过输出给ai的文本判断;4、gemini遇到涩涩会中断。',
component: 'Switch'
},
{
field: 'gemini_vqa_needMaster',
label: '只有主人才能#识图',
bottomHelpMessage: '只有主人才能使用gemini的#识图 但不影响“对话中图片识别-gemini”',
component: 'Switch'
},
{
field: 'geminiPrompt',
label: '设定',
component: 'InputTextArea'
},
{
field: 'gemini_temperature',
label: 'gemini 温度',
bottomHelpMessage: '用于控制回复内容的多样性,数值越大回复越加随机、多元化,数值越小回复越加保守;默认值 0.9',
component: 'InputNumber',
componentProps: {
min: 0,
step: 0.05,
max: 2
}
},
{
field: 'geminiForceToolKeywords',
label: 'gemini强制工具关键词',
bottomHelpMessage: '智能模式中,gemini强制工具关键词,包含这里关键词的问题一定会调用工具。',
component: 'GTags',
componentProps: {
placeholder: '请输入强制工具关键词',
allowAdd: true,
allowDel: true,
showPrompt: true,
promptProps: {
content: '添加新的强制工具关键词',
okText: '添加',
rules: [
{ required: true, message: '强制工具关键词不能为空' }
]
},
valueParser: (value) => value.split(',') || []
}
},
{
label: '语音',
component: 'SOFT_GROUP_BEGIN'
},
// {
// field: '2captchaToken',
// label: '验证码平台Token',
// bottomHelpMessage: '可注册2captcha实现跳过验证码,收费服务但很便宜。否则可能会遇到验证码而卡住',
// component: 'InputPassword'
// },
{
label: '全局语音合成设置',
component: 'Divider'
},
{
field: 'defaultUseTTS',
label: '全局语音模式',
bottomHelpMessage: '全局默认以语音形式回复,使用默认角色音色',
component: 'Switch'
},
{
field: 'ttsAutoFallbackThreshold',
label: '语音转文字阈值',
bottomHelpMessage: '语音模式下,字数超过这个阈值就同时发送文字。',
component: 'InputNumber',
componentProps: {
min: 0,
max: 99999
}
},
{
field: 'alsoSendText',
label: '语音同时发送文字',
bottomHelpMessage: '语音模式下,同时发送文字版,避免音质较低听不懂',
component: 'Switch'
},
{
field: 'ttsRegex',
label: '语音过滤正则表达式',
bottomHelpMessage: '语音模式下,配置此项以过滤不想被读出来的内容。表达式测试地址:https://www.runoob.com/regexp/regexp-syntax.html',
component: 'Input'
},
{
field: 'cloudTranscode',
label: '云转码API地址',
bottomHelpMessage: '目前只支持node-silk语音转码,可在本地node-silk无法使用时尝试使用云端资源转码',
component: 'Input'
},
{
field: 'cloudMode',
label: '云转码API发送数据模式',
bottomHelpMessage: '语音传回是数据链接还是文件:呆毛版三种vits api选择链接;如果你部署的是本地vits服务或使用的是微软azure,请改为文件',
component: 'Select',
componentProps: {
options: [
{ label: '关闭云转码', value: 'off' },
{ label: '文件', value: 'file' },
{ label: '链接', value: 'url' },
// { label: '数据', value: 'buffer' }
]
}
},
// {
// field: 'focus_CloudTranscode',
// label: '强制使用云转码',
// bottomHelpMessage: '当ffmpeg错误时,可开启本选项,强制使用云转码,需要配置 云转码API地址;开启后优先级:[本地-2转码silk]>[云转码silk]>[本地pcm2slk转码];(本地pcm2slk转码 效果最优)',
// component: 'Switch'
// },
// {
// field: 'tts_ffmpeg_path',
// label: 'FFMPEG路径',
// bottomHelpMessage: '仅当某些平台例如trss无配置ffmpeg时需要配置',
// component: 'Input'
// },
// {
// field: 'ttsHD',
// label: '本地SILK转码方案2',
// bottomHelpMessage: '开启本地SILK转码方案2,此方案只推荐在无法本地silk转码且服务器转码均失效时开启',
// component: 'Switch'
// },
{
label: '语音合成服务器设置',
component: 'Divider'
},
{
field: 'ttsMode',
label: '语音模式源',
bottomHelpMessage: '语音模式下使用何种语音源进行文本->音频转换',
component: 'Select',
componentProps: {
options: [
{
label: 'vits-uma-genshin-honkai',
value: 'vits-uma-genshin-honkai'
},
{
label: '微软Azure',
value: 'azure'
},
{
label: 'VoiceVox',
value: 'voicevox'
}
]
}
},
{
field: 'azureTTSKey',
label: 'Azure语音服务密钥',
component: 'Input'
},
{
field: 'azureTTSRegion',
label: 'Azure语音服务区域',
bottomHelpMessage: '例如japaneast',
component: 'Input'
},
{
field: 'azureTTSEmotion',
label: 'Azure情绪多样化',
bottomHelpMessage: '切换角色后使用"#chatgpt使用设定xxx"重新开始对话以更新不同角色的情绪配置。支持使用不同的说话风格回复,各个角色支持说话风格详情:https://speech.microsoft.com/portal/voicegallery',
component: 'Switch'
},
{
field: 'enhanceAzureTTSEmotion',
label: 'Azure情绪纠正',
bottomHelpMessage: '当机器人未使用或使用了不支持的说话风格时,将在对话中提醒机器人。注意:bing模式开启此项后有概率增大触发抱歉的机率,且不要单独开启此项。',
component: 'Switch'
},
{
field: 'azureTTSSpeaker',
label: 'Azure默认角色',
bottomHelpMessage: '微软Azure语音模式下,未指定角色时使用的角色。若用户通过指令指定了角色,将忽略本设定',
component: 'Select',
componentProps: {
options: [{
label: '随机',
value: '随机'
},
...azureRoleList.flatMap(item => [
item.roleInfo
]).map(s => ({
label: s,
value: s
}))]
}
},
{
field: 'voicevoxSpace',
label: 'voicevox语音转换API地址',
bottomHelpMessage: '可使用https://2ndelement-voicevox.hf.space, 也可github搜索voicevox-engine自建',
component: 'Input'
},
{
field: 'voicevoxTTSSpeaker',
label: 'VoiceVox默认角色',
bottomHelpMessage: 'VoiceVox语音模式下,未指定角色时使用的角色。若留空,将使用随机角色回复。若用户通过指令指定了角色,将忽略本设定',
component: 'Select',
componentProps: {
options: [{
label: '随机',
value: '随机'
},
...voxRoleList.flatMap(item => [
...item.styles.map(style => `${item.name}-${style.name}`),
item.name
]).map(s => ({
label: s,
value: s
}))]
}
},
{
label: 'VITS语音生成:前提:语音模式源为"vits-uma-genshin-honkai";云转码API发送数据模式为链接;指令#tts语音帮助',
component: 'Divider'
},
{
field: 'ttsSpace',
label: 'vits语音转换API地址',
bottomHelpMessage: '使用Bert-VITS2请填入https://bv2.firefly.matce.cn (已失效);使用ai_hobbyist请填入ai_hobbyist;使用vits-uma前往duplicate空间 https://huggingface.co/spaces/ikechan8370/vits-uma-genshin-honkai 或 https://misaka20001-paimon-is-not-a-food.hf.space/api/generate 后查看api地址并填入此处(有需要请填写"语音转换huggingface反代");使用FishApi请填入:https://api.fish.audio;或使用海螺api地址https://hailuo.maliy.top/v1/audio/speech 或参考 https://github.com/xiaoY233/MiniMax-Free-API 自行部署;填入后请重启bot并F5刷新此页面将刷新 vits默认角色 列表,不同站点对应不同发音人,错误填写 vits默认角色 将无法生成语音',
component: 'Input'
},
{
field: 'huggingFaceReverseProxy',
label: '语音转换huggingface反代',
bottomHelpMessage: '没有就空着',
component: 'Input'
},
{
field: 'defaultTTSRole',
label: 'vits默认角色',
bottomHelpMessage: 'vits-uma-genshin-honkai语音模式下,未指定角色时使用的角色。若留空,将使用随机角色回复。若用户通过指令指定了角色,将忽略本设定。可用指令:#tts语音转日语开启 则使用本插件内置的#gpt翻日 功能。可用指令:#tts可选人物列表',
component: 'Select',
componentProps: {
options: [{
label: '随机',
value: '随机'
}].concat(speakers.map(s => { return { label: s, value: s } }))
}
},
{
field: 'autoJapanese',
label: 'vits模式日语输出',
bottomHelpMessage: '使用vits语音时,将机器人的文字回复翻译成日文后获取语音。' +
'若想使用插件的翻译功能,发送"#chatgpt翻译帮助"查看使用方法,支持图片翻译,引用翻译',
component: 'Switch'
},
{
label: 'fish.audio的设置',
component: 'Divider'
},
{
field: 'fishApiKey',
label: 'Api Key',
bottomHelpMessage: '(仅限api.fish.audio)(需要配置key且云转码设置为“文件”)收费,API KEY获取地址:https://fish.audio/zh-CN/go-api/api-keys',
component: 'Input'
},
{
field: 'fish_reference_id',
label: '发音人ID',
bottomHelpMessage: '(仅限api.fish.audio)这里填入你想要的模型model的代码,例如派蒙的是efc1ce3726a64bbc947d53a1465204aa;说明:api.fish.audio 不受 vits默认角色 控制,仅由 发音人ID 决定其发音人;可用指令:#搜索fish发音人[名称]',
component: 'Input'
},
// field: 'api_fish_audio_account_ID',
// label: 'api_fish_audio_account_ID',
// bottomHelpMessage: '(仅限api.fish.audio)填写账号密码,用英文冒号分割;拥有多个账号时用英文逗号分割,将自动负载均衡。例如accountId1:password1,accountId2:password2;可用指令(为防止封IP地址,不推荐使用该指令,目前遇到错误时会自动刷新该token,所以若配置了2个账号就等他自己错误2次就行了):#派蒙tts强制刷新fish账号',
// component: 'InputTextArea'
// },
// {
// field: 'api_fish_token_quota',
// label: 'fish.audio每个token配额',
// bottomHelpMessage: '为防止token失效,填入配额数-1;可用指令:#派蒙tts查看fish用量',
// component: 'InputNumber',
// componentProps: {
// min: 0,
// max: 999999999,
// step: 1
// }
// },
// {
// field: 'api_fish_control_defaultUseTTS',
// label: '自动全局语音模式',
// bottomHelpMessage: 'fish.audio达到配额后关闭全局语音模式;次日 0:01 am 自动开启全局语音模式;',
// component: 'Switch'
// },
// {
// field: 'api_fish_audio_model',
// label: 'api_fish_audio_model',
// bottomHelpMessage: '(仅限api.fish.audio)这里填入你想要的模型model的代码,例如派蒙的是efc1ce3726a64bbc947d53a1465204aa;说明:api.fish.audio 不受 vits默认角色 控制,仅由 api_fish_audio_model 决定其发音人',
// component: 'Input'
// },
{
label: '海螺发音的设置',
component: 'Divider'
},
{
field: 'hailuoApiKey',
label: '海螺Key',
bottomHelpMessage: '如果不知道请联系小呆毛;(需要配置key)(自行搭建文档https://github.com/LLM-Red-Team/hailuo-free-api 请在域名中包含hailuo以便本插件识别)',
component: 'Input'
},
{
label: 'VITS的设置',
component: 'Divider'
},
{
field: 'vits_emotion',
label: 'emotion',
bottomHelpMessage: '(仅限Bert-VITS2)控制发音情感;可用命令:#tts情感设置帮助',
component: 'Select',
componentProps: {
options: vits_emotion_map.map(s => { return { label: s, value: s.replace(/(\s+)|([(].*[)])/g, "").replace(/:|([0-9]*)/g, '') } })
}
},
{
field: 'vits_auto_emotion',
label: 'tts语音启动自动情感',
bottomHelpMessage: '(仅限Bert-VITS2)自动根据句子中的感情词匹配tts中的100种情感,将会覆盖当前tts情感',
component: 'Switch'
},
{
field: 'style_text',
label: 'tts融合文本',
bottomHelpMessage: '(仅限Bert-VITS2)使用辅助文本的语意来辅助生成对话(语言保持与主文本相同)注意:不要使用指令式文本(如:开心),要使用带有强烈情感的文本(如:我好快乐!!!)效果较不明确,留空即为不使用该功能',
component: 'Input'
},
{
field: 'style_text_weights',
label: 'tts融合文本权重',
bottomHelpMessage: '(仅限Bert-VITS2)主文本和辅助文本的bert混合比率,0表示仅主文本,1表示仅辅助文本,范围0.0-1.0,默认为0.7',