config.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. (function (global) {
  2. global.formatDocUrl = (sUrl, modelType = '0') => { //默认省厅
  3. if (modelType === '0') {
  4. if (sUrl.indexOf(global.AppGlobalConfig.knowledgeDocUrl2) !== -1) {
  5. sUrl = sUrl.replace(global.AppGlobalConfig.knowledgeDocUrl2, global.AppGlobalConfig.knowledgeDocUrlProxy)
  6. } else {
  7. sUrl = sUrl.replace(global.AppGlobalConfig.knowledgeDocUrl, global.AppGlobalConfig.knowledgeDocUrlProxy)
  8. }
  9. } else {
  10. sUrl = sUrl.replace(global.AppGlobalConfig.knowledgeDocUrl, global.AppGlobalConfig.knowledgeDocUrlProxy2)
  11. }
  12. return sUrl;
  13. }
  14. global.formatDocName = (sUrl, key = "file_name") => {
  15. if (!sUrl) return;
  16. const arrs = sUrl.split("?")[1].split("&");
  17. const map = {};
  18. arrs.forEach((item) => {
  19. const arr = item.split("=")
  20. map[arr[0]] = arr[1]
  21. })
  22. return map[key]
  23. }
  24. global.AppGlobalConfig = {
  25. system: {
  26. name: '',
  27. copyright: '版权所有© 2024 浙江万维空间信息技术有限公司',
  28. },
  29. isDisabledSource: true,
  30. authorization: {
  31. enabled: false,
  32. time: 12
  33. },
  34. llm: {
  35. kb_name: 'policy' //kb_chat接口链接库
  36. },
  37. authToken: 'ZJUGIS-Authorization',
  38. storage: {
  39. encryption: true, // 是否加密
  40. secretKey: 'yydjydhfyhfggd'
  41. },
  42. topKs: {
  43. '0': 5,
  44. '1': 10,
  45. '2': 15,
  46. },
  47. baseApi: '/baseApi',
  48. // server: 'https://zdzy.zrzyt.zj.gov.cn/aisKnowledge',
  49. server: '/server',
  50. authServer: '/auth',
  51. policyServer: 'https://zjugpt.com/server',
  52. aiServer: '/aiServer', //省厅
  53. aisChat: '/aisChat', //温州
  54. knowledgeServer2: 'https://natureai.zjugis.com/liqchat',
  55. knowledgeDocUrl: 'http://127.0.0.1:20331/',
  56. knowledgeDocUrl2: 'http://127.0.0.1:20339/',
  57. knowledgeDocUrlProxy: 'https://ai.zrzyt.zj.gov.cn:10086/aiServer/',
  58. knowledgeDocUrlProxy2: 'https://ai.zrzyt.zj.gov.cn:10086/aisChat/',
  59. landMarketUrl: 'https://natureai.zjugis.com/subscribe/',
  60. //解析表格
  61. dataAnalysisChatUrl: "/lianqiai/tools/data_analysis_chat",
  62. composeExtensionUrl: "/aisChat/chat/compose_chat_theme_extension",
  63. // 文件上传
  64. uploadUrl: "/aisChat/knowledge_base/upload_docs",
  65. // 外链
  66. links: {
  67. // 隐私
  68. agreement: '/agreement.html',
  69. // 政策
  70. privacy: '/privacy.html',
  71. // 万维官网
  72. zjugis: 'https://zjugis.com/home/index.html',
  73. // 主页
  74. home: '/aisearch/#/home',
  75. // 注册页
  76. register: '/#/register',
  77. landMarketUrl: "https://zjugpt.com/land/#/landSupermarket",
  78. map: 'https://www.gscloud.cn/sources/index?pid=1&rootid=1',
  79. tool: 'http://guihuayun.com/',
  80. },
  81. tdtToken: '339e600c45a24c5d462c384bd8a1d257',
  82. questions: [
  83. [
  84. {
  85. icon: 'land',
  86. name: '国有土地的使用方式有哪些?'
  87. },
  88. {
  89. icon: 'land',
  90. name: '哪些情形下可以划拨方式取得国有土地使用权?'
  91. },
  92. ],
  93. [
  94. {
  95. icon: 'land',
  96. name: '什么是闲置土地?'
  97. },
  98. {
  99. icon: 'doc',
  100. name: '什么是国有建设用地供应计划?'
  101. },
  102. {
  103. icon: 'farm',
  104. name: '哪些情形可以“耕地转出”?'
  105. }
  106. ]
  107. ],
  108. };
  109. })(window)