optionsSets.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. //聊天选项
  2. let chatTypes = {
  3. //更有创造力选项
  4. create: [
  5. "nlu_direct_response_filter",
  6. "deepleo",
  7. "disable_emoji_spoken_text",
  8. "responsible_ai_policy_235",
  9. "enablemm",
  10. "h3imaginative",
  11. "objopinion",
  12. "eredirecturl",
  13. "dv3sugg",
  14. "autosave",
  15. "clgalileo",
  16. "gencontentv3",
  17. "prompttrcp"
  18. ],
  19. //balance 平衡模式选项
  20. balance: [
  21. "nlu_direct_response_filter",
  22. "deepleo",
  23. "disable_emoji_spoken_text",
  24. "responsible_ai_policy_235",
  25. "enablemm",
  26. "galileo",
  27. "objopinion",
  28. "eredirecturl",
  29. "dv3sugg",
  30. "autosave",
  31. "saharagenconv5"
  32. ],
  33. //精准选项
  34. accurate: [
  35. "nlu_direct_response_filter",
  36. "deepleo",
  37. "disable_emoji_spoken_text",
  38. "responsible_ai_policy_235",
  39. "enablemm",
  40. "h3precise",
  41. "objopinion",
  42. "eredirecturl",
  43. "dv3sugg",
  44. "autosave",
  45. "clgalileo",
  46. "gencontentv3",
  47. "prompttrcp"
  48. ]
  49. }
  50. //消息来源
  51. let source = "cib";
  52. //接收消息类型
  53. let allowedMessageTypes = [
  54. "ActionRequest",
  55. "Chat",
  56. "Context",
  57. "InternalSearchQuery",
  58. "InternalSearchResult",
  59. "Disengaged",
  60. "InternalLoaderMessage",
  61. "Progress",
  62. "RenderCardRequest",
  63. "AdsQuery",
  64. "SemanticSerp",
  65. "GenerateContentQuery",
  66. "SearchQuery"
  67. ]
  68. //切片id,也不知道是啥意思,反正官网的更新了
  69. let sliceIds = [
  70. "winmuid1tf",
  71. "osbsdusgreccf",
  72. "contansperf",
  73. "mlchatpc2",
  74. "winstmsg2tf",
  75. "creatgoglt2",
  76. "creatorv2t",
  77. "norespwcf",
  78. "0521dur5",
  79. "dur5",
  80. "517opinion",
  81. "418dhlths0",
  82. "525ptrcp",
  83. "kcimgv2cf",
  84. "kcimgatt",
  85. "427startpms0"
  86. ]
  87. //生成消息对象
  88. async function generateMessages(sendMessageManager/*消息管理器*/,chatMessageText/*要发送的消息文本*/){
  89. function timeString() {
  90. var d = new Date();
  91. var year = d.getFullYear();
  92. var month = (d.getMonth() + 1).toString().padStart(2, "0");
  93. var date = d.getDate().toString().padStart(2, "0");
  94. var hour = d.getHours().toString().padStart(2, "0");
  95. var minute = d.getMinutes().toString().padStart(2, "0");
  96. var second = d.getSeconds().toString().padStart(2, "0");
  97. var offset = "+08:00"; // 你可以根据需要修改这个值
  98. var s = year + "-" + month + "-" + date + "T" + hour + ":" + minute + ":" + second + offset;
  99. return s;
  100. }
  101. if(!sendMessageManager.startTime){
  102. sendMessageManager.startTime = timeString();
  103. }
  104. return {
  105. "locale": "zh-CN",
  106. "market": "zh-CN",
  107. "region": "US",
  108. "location": "lat:47.639557;long:-122.128159;re=1000m;",
  109. "locationHints": [
  110. {
  111. "Center": {
  112. "Latitude": 30.474109798833613,
  113. "Longitude": 114.39626256171093
  114. },
  115. "RegionType": 2,
  116. "SourceType": 11
  117. },
  118. {
  119. "country": "United States",
  120. "state": "California",
  121. "city": "Los Angeles",
  122. "zipcode": "90060",
  123. "timezoneoffset": -8,
  124. "dma": 803,
  125. "countryConfidence": 8,
  126. "cityConfidence": 5,
  127. "Center": {
  128. "Latitude": 33.9757,
  129. "Longitude": -118.2564
  130. },
  131. "RegionType": 2,
  132. "SourceType": 1
  133. }
  134. ],
  135. "timestamp": sendMessageManager.startTime,
  136. "author": "user",
  137. "inputMethod": "Keyboard",
  138. "text": chatMessageText,
  139. "messageType": "Chat"
  140. }
  141. }
  142. async function getPreviousMessages(){
  143. function getUuid() {
  144. return URL.createObjectURL(new Blob()).split('/')[3];
  145. }
  146. let pos = getStartProposes();
  147. return [{
  148. "text": getStartMessage(),
  149. "author": "bot",
  150. "adaptiveCards": [],
  151. "suggestedResponses": [{
  152. "text": pos[0],
  153. "contentOrigin": "DeepLeo",
  154. "messageType": "Suggestion",
  155. "messageId": getUuid(),
  156. "offense": "Unknown"
  157. }, {
  158. "text": pos[1],
  159. "contentOrigin": "DeepLeo",
  160. "messageType": "Suggestion",
  161. "messageId": getUuid(),
  162. "offense": "Unknown"
  163. }, {
  164. "text": pos[2],
  165. "contentOrigin": "DeepLeo",
  166. "messageType": "Suggestion",
  167. "messageId": getUuid(),
  168. "offense": "Unknown"
  169. }],
  170. "messageId": getUuid(),
  171. "messageType": "Chat"
  172. }];
  173. }