bingAI: add optionsSet.js

This commit is contained in:
James Feng Cao 2023-04-12 09:39:41 +08:00
parent 1ba51cb179
commit 8998d08b42
3 changed files with 115 additions and 79 deletions

View file

@ -81,6 +81,7 @@
} }
</script> </script>
<script type="text/javascript" src="./js/GetSet.js"></script> <script type="text/javascript" src="./js/GetSet.js"></script>
<script type="text/javascript" src="./js/optionsSets.js"></script>
<script type="text/javascript" src="./js/bingChatHub.js"></script> <script type="text/javascript" src="./js/bingChatHub.js"></script>
<script type="text/javascript" src="./js/parserReturn.js"></script> <script type="text/javascript" src="./js/parserReturn.js"></script>
<script type="text/javascript" src="./js/bing.js"></script> <script type="text/javascript" src="./js/bing.js"></script>

View file

@ -20,85 +20,6 @@ function getUuid() {
return URL.createObjectURL(new Blob()).split('/')[3]; return URL.createObjectURL(new Blob()).split('/')[3];
} }
//聊天选项
let chatTypes = {
//更有创造力选项
create: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"h3imaginative",
"clgalileo",
"gencontentv3",
"telmet",
"jbfv2",
"c2b47e4f",
"dv3sugg"
],
//balance 平衡模式选项
balance: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"galileo",
"jbf101",
"cachewriteext",
"e2ecachewrite",
"nodlcpcwrite",
"dv3sugg",
"dlwebtrunc",
"glpromptv6"
],
//精准选项
accurate: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"h3precise",
"telmet",
"jbfv2",
"c2b47e4f",
"dv3sugg",
"clgalileo"
]
}
//接收消息类型
let allowedMessageTypes = [
"Chat",
"InternalSearchQuery",
"InternalSearchResult",
"Disengaged",
"InternalLoaderMessage",
"RenderCardRequest",
"AdsQuery",
"SemanticSerp",
"GenerateContentQuery",
"SearchQuery"
]
//切片id也不知道是啥意思反正官网的更新了
let sliceIds = [
"audseq",
"chk1cln",
"nofbkcf",
"nosharepre",
"fixsacodecf",
"405suggbs0",
"scctl",
"403jbf101",
"udstrclm8cmp",
"udstrclm8",
"329v6webtrunc",
"404e2ewrt"
]
class SendMessageManager { class SendMessageManager {
//(会话id客户端id签名id是否是开始) //(会话id客户端id签名id是否是开始)
//(string,string,string,boolena) //(string,string,string,boolena)

View file

@ -0,0 +1,114 @@
//聊天选项
let chatTypes = {
//更有创造力选项
create: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"h3imaginative",
"jbf101",
"cachewriteext",
"e2ecachewrite",
"nodlcpcwrite",
"dv3sugg",
"clgalileo",
"gencontentv3"
],
//balance 平衡模式选项
balance: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"galileo",
"jbf101",
"cachewriteext",
"e2ecachewrite",
"nodlcpcwrite",
"dv3sugg",
"dlwebtrunc",
"glpromptv6"
],
//精准选项
accurate: [
"nlu_direct_response_filter",
"deepleo",
"disable_emoji_spoken_text",
"responsible_ai_policy_235",
"enablemm",
"h3precise",
"clgalileo",
"jbf101",
"cachewriteext",
"e2ecachewrite",
"nodlcpcwrite",
"dv3sugg"
]
}
//接收消息类型
let allowedMessageTypes = [
"Chat",
"InternalSearchQuery",
"InternalSearchResult",
"Disengaged",
"InternalLoaderMessage",
"RenderCardRequest",
"AdsQuery",
"SemanticSerp",
"GenerateContentQuery",
"SearchQuery"
]
//切片id也不知道是啥意思反正官网的更新了
let sliceIds = [
"audseq",
"chk1cln",
"nofbkcf",
"nosharepre",
"fixsacodecf",
"405suggbs0",
"scctl",
"403jbf101",
"udstrclm8cmp",
"udstrclm8",
"329v6webtrunc",
"404e2ewrt"
]
async function getPreviousMessages(){
function getUuid() {
return URL.createObjectURL(new Blob()).split('/')[3];
}
let pos = getStartProposes();
return [{
"text": getStartMessage(),
"author": "bot",
"adaptiveCards": [],
"suggestedResponses": [{
"text": pos[0],
"contentOrigin": "DeepLeo",
"messageType": "Suggestion",
"messageId": getUuid(),
"offense": "Unknown"
}, {
"text": pos[1],
"contentOrigin": "DeepLeo",
"messageType": "Suggestion",
"messageId": getUuid(),
"offense": "Unknown"
}, {
"text": pos[2],
"contentOrigin": "DeepLeo",
"messageType": "Suggestion",
"messageId": getUuid(),
"offense": "Unknown"
}],
"messageId": getUuid(),
"messageType": "Chat"
}];
}