forked from ikechan8370/chatgpt-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
guoba.support.js
1275 lines (1274 loc) · 46.3 KB
/
guoba.support.js
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 } from "./utils/tts.js";
import { supportConfigurations as azureRoleList } from "./utils/tts/microsoft-azure.js";
import { supportConfigurations as voxRoleList } from "./utils/tts/voicevox.js";
// 支持锅巴
export function supportGuoba() {
return {
// 插件信息,将会显示在前端页面
// 如果你的插件没有在插件库里,那么需要填上补充信息
// 如果存在的话,那么填不填就无所谓了,填了就以你的信息为准
pluginInfo: {
name: "chatgpt-plugin",
title: "ChatGPT-Plugin",
author: "@ikechan8370&@Xcating",
authorLink: "https://github.com/ikechan8370",
link: "https://github.com/Xcating/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: [
{
field: "blockWords",
label: "输出黑名单",
bottomHelpMessage:
"检查输出结果中是否有违禁词,如果存在黑名单中的违禁词则不输出。英文逗号隔开",
component: "InputTextArea",
},
{
field: "promptBlockWords",
label: "输入黑名单",
bottomHelpMessage:
"检查输入结果中是否有违禁词,如果存在黑名单中的违禁词则不输出。英文逗号隔开",
component: "InputTextArea",
},
{
field: "whitelist",
label: "对话白名单",
bottomHelpMessage:
"默认设置为添加群号。优先级高于黑名单。\n" +
"注意:需要添加QQ号时在前面添加^(例如:^123456),此全局添加白名单,即除白名单以外的所有人都不能使用插件对话。\n" +
"如果需要在某个群里独享moment,即群聊中只有白名单上的qq号能用,则使用(群号^qq)的格式(例如:123456^123456)。\n" +
"白名单优先级:混合制 > qq > 群号。\n" +
"黑名单优先级: 群号 > qq > 混合制。",
component: "Input",
},
{
field: "blacklist",
label: "对话黑名单",
bottomHelpMessage: "参考白名单设置规则。",
component: "Input",
},
{
field: "imgOcr",
label: "图片识别",
bottomHelpMessage:
"是否识别消息中图片的文字内容,需要同时包含图片和消息才生效",
component: "Switch",
},
{
field: "enablePrivateChat",
label: "是否允许私聊机器人",
component: "Switch",
},
{
field: "defaultUsePicture",
label: "全局图片模式",
bottomHelpMessage: "全局默认以图片形式回复",
component: "Switch",
},
{
field: "defaultUseTTS",
label: "全局语音模式",
bottomHelpMessage: "全局默认以语音形式回复,使用默认角色音色",
component: "Switch",
},
{
field: "groupMerge",
label: "群组消息合并",
bottomHelpMessage: "开启后,群聊消息将被视为同一对话",
component: "Switch",
},
{
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: "defaultTTSRole",
label: "vits默认角色",
bottomHelpMessage:
"vits-uma-genshin-honkai语音模式下,未指定角色时使用的角色。若留空,将使用随机角色回复。若用户通过指令指定了角色,将忽略本设定",
component: "Select",
componentProps: {
options: [
{
label: "随机",
value: "随机",
},
].concat(
speakers.map((s) => {
return { label: s, value: s };
})
),
},
},
{
field: "azureTTSSpeaker",
label: "Azure默认角色",
bottomHelpMessage:
"微软Azure语音模式下,未指定角色时使用的角色。若用户通过指令指定了角色,将忽略本设定",
component: "Select",
componentProps: {
options: [
{
label: "随机",
value: "随机",
},
...azureRoleList
.flatMap((item) => [item.roleInfo])
.map((s) => ({
label: s,
value: s,
})),
],
},
},
{
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,
})),
],
},
},
{
field: "ttsRegex",
label: "语音过滤正则表达式",
bottomHelpMessage:
"语音模式下,配置此项以过滤不想被读出来的内容。表达式测试地址:https://www.runoob.com/regexp/regexp-syntax.html",
component: "Input",
},
{
field: "ttsAutoFallbackThreshold",
label: "语音转文字阈值",
helpMessage: "语音模式下,字数超过这个阈值就降级为文字",
bottomHelpMessage: "语音转为文字的阈值",
component: "InputNumber",
componentProps: {
min: 0,
max: 299,
},
},
{
field: "alsoSendText",
label: "语音同时发送文字",
bottomHelpMessage: "语音模式下,同时发送文字版,避免音质较低听不懂",
component: "Switch",
},
{
field: "autoJapanese",
label: "vits模式日语输出",
bottomHelpMessage:
"使用vits语音时,将机器人的文字回复翻译成日文后获取语音。" +
'若想使用插件的翻译功能,发送"#chatgpt翻译帮助"查看使用方法,支持图片翻译,引用翻译...',
component: "Switch",
},
{
field: "autoUsePicture",
label: "长文本自动转图片",
bottomHelpMessage: "字数大于阈值会自动用图片发送,即使是文本模式",
component: "Switch",
},
{
field: "autoUsePictureThreshold",
label: "自动转图片阈值",
helpMessage: "长文本自动转图片开启后才生效",
bottomHelpMessage: "自动转图片的字数阈值",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
field: "conversationPreserveTime",
label: "对话保留时长",
helpMessage: "单位:秒",
bottomHelpMessage:
"每个人发起的对话保留时长。超过这个时长没有进行对话,再进行对话将开启新的对话。",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
field: "allowOtherMode",
label: "允许其他模式",
bottomHelpMessage:
"开启后,则允许用户使用#chat1/#chat3/#chatglm/#bing等命令无视全局模式进行聊天",
component: "Switch",
},
{
field: "quoteReply",
label: "图片引用消息",
bottomHelpMessage: "在回复图片时引用原始消息",
component: "Switch",
},
{
field: "problem",
label: "启用问题合集",
bottomHelpMessage: "开启问题回答功能,可用#chatgpt问题教程 查看指令",
component: "Switch",
},
{
field: "showQRCode",
label: "启用二维码",
bottomHelpMessage:
"在图片模式中启用二维码。该对话内容将被发送至第三方服务器以进行渲染展示,如果不希望对话内容被上传到第三方服务器请关闭此功能",
component: "Switch",
},
{
field: "drawCD",
label: "绘图CD",
helpMessage: "单位:秒",
bottomHelpMessage: "绘图指令的CD时间,主人不受限制",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
field: "enableDraw",
label: "绘图功能开关",
component: "Switch",
},
{
field: "proxy",
label: "代理服务器地址",
bottomHelpMessage:
"数据通过代理服务器发送,http或socks5代理。配置后需重启",
component: "Input",
},
{
field: "debug",
label: "调试信息",
bottomHelpMessage:
"将输出更多调试信息,如果不希望控制台刷屏的话,可以关闭",
component: "Switch",
},
{
field: "chromeTimeoutMS",
label: "浏览器超时时间",
helpMessage: "单位:毫秒",
bottomHelpMessage: "浏览器默认超时,浏览器可能需要更高的超时时间",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
label: "以下为前缀配置",
component: "Divider",
},
{
field: "ChatRulePrefix",
label: "默认对话前缀",
bottomHelpMessage:
"配置完需要重启,默认为chat,支持用|分隔开多个前缀",
component: "Input",
},
{
field: "BingRulePrefix",
label: "必应回答前缀",
bottomHelpMessage:
"配置完需要重启,默认为bing,支持用|分隔开多个前缀",
component: "Input",
},
{
field: "APIRulePrefix",
label: "API回答前缀",
bottomHelpMessage:
"配置完需要重启,默认为chat1,支持用|分隔开多个前缀",
component: "Input",
},
{
field: "API3RulePrefix",
label: "API3回答前缀",
bottomHelpMessage:
"配置完需要重启,默认为chat3,支持用|分隔开多个前缀",
component: "Input",
},
{
label: "以下为打招呼配置。",
component: "Divider",
},
{
field: "HelloCron",
label: "打招呼自设定Cron",
bottomHelpMessage:
"大招呼自设定Cron,可不配置,不配置将使用下一条的招呼间隔配置",
component: "Input",
componentProps: {
placeholder: "请输入定时表达式",
},
},
{
field: "helloInterval",
label: "打招呼间隔(小时)",
component: "InputNumber",
componentProps: {
min: 1,
max: 24,
},
},
{
field: "initiativeChatGroups",
label: "主动发起聊天群聊的群号",
bottomHelpMessage:
"在这些群聊里会不定时主动说一些随机的打招呼的话,用英文逗号隔开。必须配置了OpenAI Key",
component: "Input",
},
{
field: "helloPrompt",
label: "打招呼prompt",
bottomHelpMessage:
"将会用这段文字询问ChatGPT,由ChatGPT给出随机的打招呼文字",
component: "Input",
},
{
field: "helloProbability",
label: "打招呼的触发概率(%)",
bottomHelpMessage:
"设置为100则每次经过间隔时间必定触发主动打招呼事件。",
component: "InputNumber",
componentProps: {
min: 0,
max: 100,
},
},
{
label: "以下为服务超时配置。",
component: "Divider",
},
{
field: "defaultTimeoutMs",
label: "默认超时时间",
helpMessage: "单位:毫秒",
bottomHelpMessage: "各个地方的默认超时时间",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
field: "chromeTimeoutMS",
label: "浏览器超时时间",
helpMessage: "单位:毫秒",
bottomHelpMessage: "浏览器默认超时,浏览器可能需要更高的超时时间",
component: "InputNumber",
componentProps: {
min: 0,
},
},
{
field: "sydneyFirstMessageTimeout",
label: "Sydney模式接受首条信息超时时间",
helpMessage: "单位:毫秒",
bottomHelpMessage:
"超过该时间阈值未收到Bing的任何消息,则断开本次连接并重试(最多重试3次,失败后将返回timeout waiting for first message)",
component: "InputNumber",
componentProps: {
min: 15000,
},
},
{
label: "以下为API方式(默认)的配置",
component: "Divider",
},
{
field: "apiKey",
label: "OpenAI API Key",
bottomHelpMessage: "OpenAI的ApiKey,用于访问OpenAI的API接口",
component: "InputPassword",
},
{
field: "model",
label: "OpenAI 模型",
bottomHelpMessage:
"gpt-4, gpt-4-0613, gpt-4-32k, gpt-4-32k-0613, gpt-3.5-turbo, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k-0613。默认为gpt-3.5-turbo,gpt-4需账户支持",
component: "Input",
},
{
field: "smartMode",
label: "智能模式",
bottomHelpMessage:
"仅建议gpt-4-32k和gpt-3.5-turbo-16k-0613开启,gpt-4-0613也可。开启后机器人可以群管、收发图片、发视频发音乐、联网搜索等。注意较费token。配合开启读取群聊上下文效果更佳",
component: "Switch",
},
{
field: "UseEli",
label: "智能模式鳄梨工具",
bottomHelpMessage: "选择是否使用鳄梨类工具,搜歌/影视等其他功能",
component: "witch",
},
{
field: "ExrateMsg",
label: "分段发送",
bottomHelpMessage: "分割句号和问号分段输出消息",
component: "Switch",
},
{
field: "Maxcount",
label: "最大分割消息个数",
bottomHelpMessage: "仅在分段发送模式下使用",
component: "InputNumber",
},
{
field: "ExprotMoji",
label: "发送随机表情",
bottomHelpMessage: "发送消息完发送随机表情",
component: "Switch",
},
{
field: "openAiBaseUrl",
label: "OpenAI API服务器地址",
bottomHelpMessage:
"OpenAI的API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1",
component: "Input",
},
{
field: "PresetsAPIUrlA",
label: "API反代预设地址A",
bottomHelpMessage:
'OpenAI的API服务器地址预设-A,可用指令"#chatgpt切换反代预设A"切换。注意要带上/v1。默认为https://api.openai.com/v1',
component: "Input",
},
{
field: "PresetsAPIUrlB",
label: "API反代预设地址B",
bottomHelpMessage:
'OpenAI的API服务器地址预设-B,可用指令"#chatgpt切换反代预设B"切换。注意要带上/v1。默认为https://api.openai.com/v1',
component: "Input",
},
{
field: "openAiForceUseReverse",
label: "强制使用OpenAI反代",
bottomHelpMessage: "即使配置了proxy,依然使用OpenAI反代",
component: "Switch",
},
{
field: "promptPrefixOverride",
label: "AI风格",
bottomHelpMessage:
"你可以在这里写入你希望AI回答的风格,比如希望优先回答中文,回答长一点等",
component: "InputTextArea",
},
{
field: "assistantLabel",
label: "AI名字",
bottomHelpMessage:
"AI认为的自己的名字,当你问他你是谁是他会回答这里的名字",
component: "Input",
},
{
field: "temperature",
label: "temperature",
bottomHelpMessage:
"用于控制回复内容的多样性,数值越大回复越加随机、多元化,数值越小回复越加保守",
component: "InputNumber",
componentProps: {
min: 0,
max: 2,
},
},
{
label: "以下为必应方式的配置。",
component: "Divider",
},
{
field: "BingMiao",
label: "喵版必应",
bottomHelpMessage:
"使用喵喵设定时得到完整的防ntr效果,如果用的是自己的设定请关闭",
component: "Switch",
},
{
field: "toneStyle",
label: "Bing模式",
bottomHelpMessage:
"微软必应官方的三种应答风格。默认为均衡,Sydney为实验风格,独立与三种风格之外;自设定为自定义AI的回答风格",
component: "Select",
componentProps: {
options: [
{ label: "均衡", value: "balanced" },
{ label: "创意", value: "creative" },
{ label: "精确", value: "precise" },
{ label: "Sydney(可能存在风险)", value: "Sydney" },
{ label: "自设定(可能存在风险)", value: "Custom" },
],
},
},
{
field: "enableSuggestedResponses",
label: "是否开启建议回复",
bottomHelpMessage: "开启了会像官网上一样,每个问题给出建议的用户问题",
component: "Switch",
},
{
field: "enableGroupContext",
label: "是否允许机器人读取近期的群聊聊天记录",
bottomHelpMessage: "开启后机器人可以知道群名、最近发言等信息",
component: "Switch",
},
{
field: "groupContextTip",
label: "机器人读取聊天记录时的后台prompt",
component: "InputTextArea",
},
{
field: "enforceMaster",
label: "加强主人认知",
bottomHelpMessage:
"加强主人认知。希望机器人认清主人,避免NTR可开启。开启后可能会与自设定的内容有部分冲突。sydney模式可以放心开启",
component: "Switch",
},
{
field: "enableGenerateContents",
label: "允许生成图像等内容",
bottomHelpMessage:
"开启后类似网页版能够发图。但是此选项会占用大量token,自设定等模式下容易爆token",
component: "Switch",
},
// {
// field: 'cognitiveReinforcementTip',
// label: '加强主人认知的后台prompt',
// component: 'InputTextArea'
// },
{
field: "groupContextLength",
label: "允许机器人读取近期的最多群聊聊天记录条数。",
bottomHelpMessage:
"允许机器人读取近期的最多群聊聊天记录条数。太多可能会超。默认50",
component: "InputNumber",
},
{
field: "enableRobotAt",
label: "是否允许机器人真at",
bottomHelpMessage: "开启后机器人的回复如果at群友会真的at",
component: "Switch",
},
{
field: "sydney",
label: "Custom的设定",
bottomHelpMessage:
"仅自设定模式下有效。你可以自己改写设定,让Sydney变成你希望的样子。可能存在不稳定的情况",
component: "InputTextArea",
},
{
field: "sydneyApologyIgnored",
label: "Bing抱歉是否不计入聊天记录",
bottomHelpMessage:
"有时无限抱歉,就关掉这个再多问几次试试,可能有奇效",
component: "Switch",
},
{
field: "sydneyContext",
label: "Bing的扩展资料",
bottomHelpMessage:
"AI将会从你提供的扩展资料中学习到一些知识,帮助它更好地回答你的问题。实际相当于使用edge侧边栏Bing时读取的你当前浏览网页的内容。如果太长可能容易到达GPT-4的8192token上限",
component: "InputTextArea",
},
{
field: "sydneyReverseProxy",
label: "sydney反代",
bottomHelpMessage:
"仅悉尼和自设定模式下有效,用于创建对话(默认不用于正式对话)。目前国内ip和部分境外IDC IP由于微软限制创建对话,如果有bing.com的反代可以填在此处,或者使用proxy",
component: "Input",
},
{
field: "sydneyForceUseReverse",
label: "强制使用sydney反代",
bottomHelpMessage: "即使配置了proxy,创建对话时依然使用sydney反代",
component: "Switch",
},
{
field: "sydneyWebsocketUseProxy",
label: "对话使用sydney反代",
bottomHelpMessage:
"【一般情况无需也不建议开启】默认情况下仅创建对话走反代,对话时仍然直连微软。开启本选项将使对话过程也走反,需反代支持",
component: "Switch",
},
{
field: "bingCaptchaOneShotUrl",
label: "必应验证码pass服务",
bottomHelpMessage: "必应出验证码会自动用该服务绕过",
component: "Input",
},
{
type: "check",
label: "第三方绘图",
placeholder: "使用AP插件代替Bing进行绘图",
data: "bingAPDraw"
},
{
field: "sydneyMood",
label: "情感显示",
bottomHelpMessage: "开启Sydney的情感显示,仅在图片模式下生效",
component: "Switch",
},
{
field: "sydneyImageRecognition",
label: "图片识别",
bottomHelpMessage:
"开启Sydney的图片识别功能,建议和OCR只保留一个开启",
component: "Switch",
},
{
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: "以下为浏览器方式的配置.(Deprecated)",
component: "Divider",
},
{
field: "username",
label: "用户名",
bottomHelpMessage: "OpenAI用户名。",
component: "Input",
},
{
field: "password",
label: "密码",
bottomHelpMessage: "OpenAI密码。",
component: "InputPassword",
},
{
field: "UA",
label: "浏览器UA",
bottomHelpMessage: "模拟浏览器UA,无特殊需求保持默认即可",
component: "InputTextArea",
},
{
field: "headless",
label: "无头模式",
bottomHelpMessage:
"无界面的服务器可以开启,但遇到验证码时可能无法使用。(实测很容易卡住,几乎不可用)",
component: "Switch",
},
{
field: "chromePath",
label: "Chrome路径",
bottomHelpMessage:
"为空使用默认puppeteer的chromium,也可以传递自己本机安装的Chrome可执行文件地址,提高通过率。windows可以是‘C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe’,linux通过which查找路径",
component: "Input",
},
{
label: "以下为Slack Claude方式的配置",
component: "Divider",
},
{
field: "slackUserToken",
label: "Slack用户Token",
bottomHelpMessage:
"slackUserToken,在OAuth&Permissions页面获取。需要具有channels:history, chat:write, groups:history, im:history, mpim:history 这几个scope",
component: "Input",
},
{
field: "slackBotUserToken",
label: "Slack Bot Token",
bottomHelpMessage:
"slackBotUserToken,在OAuth&Permissions页面获取。需要channels:history,groups:history,im:history 这几个scope",
component: "Input",
},
{
field: "slackClaudeUserId",
label: "Slack成员id",
bottomHelpMessage:
"在Slack中点击Claude头像查看详情,其中的成员ID复制过来",
component: "Input",
},
{
field: "slackSigningSecret",
label: "Slack签名密钥",
bottomHelpMessage: "Signing Secret。在Basic Information页面获取",
component: "Input",
},
{
field: "slackClaudeSpecifiedChannel",
label: "Slack指定频道",
bottomHelpMessage:
"为空时,将为每个qq号建立私有频道。若填写了,对话将发生在本频道。和其他人公用workspace时建议用这个",
component: "Input",
},
{
field: "slackClaudeEnableGlobalPreset",
label: "Claude使用全局设定",
bottomHelpMessage:
"开启后,所有人每次发起新对话时,会先发送设定过去再开始对话,达到类似Bing自设定的效果。",
component: "Switch",
},
{
field: "slackClaudeGlobalPreset",
label: "Slack全局设定",
bottomHelpMessage: "若启用全局设定,每个人都会默认使用这里的设定。",
component: "Input",
},
{
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: "以下为AzureChatGPT的配置",
component: "Divider",
},
{
field: "azureApiKey",
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: "以下为ChatGLM方式的配置",
component: "Divider",
},
{
field: "chatglmBaseUrl",
label: "ChatGLM API地址",
bottomHelpMessage: "如 http://localhost:8080",
component: "Input",
},
{
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: "讯飞星火助手", 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: "以下为Bard方式的配置",
component: "Divider",
},
{
field: "bardPsid",
label: "BardCookie",
bottomHelpMessage:
"获取https://bard.google.com/页面的cookie,可完整输入,需至少包含__Secure-1PSID和__Secure-1PSIDTS",
component: "Input",
},
{
field: "bardReverseProxy",
label: "Bard反代地址",
bottomHelpMessage: "bard反代服务器地址,用于绕过地区限制",
component: "Input",
},
{
field: "bardForceUseReverse",
label: "Bard使用反代",
bottomHelpMessage: "开启后将通过反代访问bard",
component: "Switch",
},
{
label: '以下为通义千问API方式的配置',
component: 'Divider'
},
{
field: 'qwenApiKey',
label: '通义千问API Key',
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',