Browse Source

温州功能优化

songxy 3 tháng trước cách đây
mục cha
commit
2eab79e76e

+ 3 - 7
ais_search_zj/web/src/views/ai-search/ai-search.vue

@@ -1553,9 +1553,7 @@ const getRecommendedQuestion = async (b = false) => {
   }
   recommendedQuestionsIndex = 0;
   const raw = JSON.stringify({
-    messages: [
-      {
-        content: `你会收到一个用户提问,请根据问题延伸出10个子问题。
+    query: `你会收到一个用户提问,请根据问题延伸出10个子问题。
 
 在你回答问题的时候,还需要注意推荐给用户的问题必须以列表的形式返回。
 for example:
@@ -1568,11 +1566,7 @@ for example:
 ]
 
 以下是用户提问:${question}`,
-        role: 'user'
-      }
-    ],
     // model: 'qwen1.5-chat',
-    model: 'qwen2.5-instruct',
     stream: false
   });
 
@@ -1585,10 +1579,12 @@ for example:
 
   fetch(window.AppGlobalConfig.knowledgeServer + '/chat/chat', requestOptions)
     .then((response) => {
+      console.log(response)
       return response.json()
     })
     .then((msg) => {
       const str = msg.choices[0]?.message?.content;
+      console.log(str)
       if (str) {
         recommendedQuestions = JSON.parse(str);
         questions.value = recommendedQuestions.slice(0, 5);

+ 1 - 1
ais_search_zj/web/src/views/home/home.vue

@@ -53,7 +53,7 @@
           </div>
         </div>
       </div>
-      <div class="ai_tool_box" v-if="false">
+      <div class="ai_tool_box">
         <h4>AI工具</h4>
         <ul>
           <li @click="toToolPage('./#/policy/interpret')">

+ 0 - 1
ais_search_zj/web/src/views/zcdb/components/aiAssistant.vue

@@ -151,7 +151,6 @@ const query = async () => {
           }
           try {
             const rData = JSON.parse(msg.data);
-            console.log(msg.data);
             if (rData) {
               setTimeout(() => {
                 form.value.aiLoading = false;

+ 5 - 3
ais_search_zj/web/src/views/zcdb/smartComparison.vue

@@ -131,11 +131,12 @@ const handleChange = (info, type) => {
   if (status === 'done') {
     message.success(`${info.file.name} 文件上传成功.`);
     const id = 'title-' + new Date().getTime();
-    const url = 'https://ai.zrzyt.zj.gov.cn/aisKnowledge' + info.file.response.data;
+    const url = 'http://10.1.1.11:59001/aisKnowledge' + info.file.response.data;
     var item = {
       id: id,
       f_title: name,
       f_type: 'temp',
+      file: info.file.originFileObj,
       size: info.file.size,
       fileName: fileName,
       url: url
@@ -167,8 +168,7 @@ const deleteFileHandle = (type) => {
   if (type === 1) {
     file = fileList1.value[0]
     fileList1.value = []
-  }
-  if (type === 2) {
+  }else if (type === 2) {
     file = fileList2.value[0]
     fileList2.value = []
   }
@@ -178,6 +178,8 @@ const deleteFileHandle = (type) => {
       break;
     }
   }
+  console.log("fileList.value------------------------")
+  console.log(fileList.value)
   if (fileList.value.length > 0) {
     current.value = fileList.value[0]
   } else if (fileList.value.length === 0) { 

+ 1 - 1
ais_search_zj/web/src/views/zjjd/index.vue

@@ -254,7 +254,7 @@ const handleChange = (info) => {
   console.log(info)
   if (status === 'done') {
     fileDetail.value = info.file.originFileObj;
-    fileUrl.value = 'https://ai.zrzyt.zj.gov.cn/aisKnowledge' + info.file.response.data;
+    fileUrl.value = 'http://10.1.1.11:59001/aisKnowledge' + info.file.response.data;
     chatDesc.value = [];
     loading.value = false;
     content.value = '';