w_optionsSets.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //聊天选项
  2. let chatTypes = {
  3. //balance 平衡模式选项
  4. balance: [
  5. "nlu_direct_response_filter",
  6. "deepleo",
  7. "enable_debug_commands",
  8. "disable_emoji_spoken_text",
  9. "responsible_ai_policy_235",
  10. "enablemm",
  11. "soedgeca",
  12. "max_turns_5",
  13. ]
  14. }
  15. //消息来源
  16. let source = "edge_coauthor_prod";
  17. //接收消息类型
  18. let allowedMessageTypes = [
  19. "ActionRequest",
  20. "Chat",
  21. "Context",
  22. "InternalSearchQuery",
  23. "InternalSearchResult",
  24. "Disengaged",
  25. "InternalLoaderMessage",
  26. "RenderCardRequest",
  27. "AdsQuery",
  28. "SemanticSerp",
  29. "GenerateContentQuery",
  30. "SearchQuery"
  31. ]
  32. //切片id,也不知道是啥意思,反正官网的更新了
  33. let sliceIds = []
  34. let tone = 'professional';
  35. let length = 'short';
  36. let format = 'paragraph';
  37. //生成消息对象
  38. async function generateMessages(sendMessageManager/*消息管理器*/,chatMessageText/*要发送的消息文本*/){
  39. return {
  40. "locale": "zh-CN",
  41. "market": "zh-CN",
  42. "region": "US",
  43. "location": "lat:47.639557;long:-122.128159;re=1000m;",
  44. "author": "user",
  45. "inputMethod": "Keyboard",
  46. "text": `Please generate some text wrapped in codeblock syntax (triple backticks) using the given keywords. Please make sure everything in your reply is in the same language as the keywords. Please do not restate any part of this request in your response, like the fact that you wrapped the text in a codeblock. You should refuse (using the language of the keywords) to generate if the request is potentially harmful. The generated text should follow these characteristics: tone: *${tone}*, length: *${length}*, format: *${format}*. The keywords are: \`${chatMessageText}\`.`,
  47. "messageType": "Chat"
  48. }
  49. }
  50. async function getPreviousMessages(){
  51. return undefined;
  52. }