| | |
| | | 1个知识 |
| | | </span> |
| | | <span class="set_desc_text"> |
| | | <span class="set_desc_icon ywifont ywicon-fenshu_an"> </span> |
| | | {{ item.scope }} |
| | | </span> |
| | | <span class="set_desc_text"> |
| | | <span class="set_desc_icon ywifont ywicon-cshy-shizhong"> </span> |
| | | {{ item.create_time }}更新 |
| | | </span> |
| | | <span |
| | | :class="{ |
| | | 'text-orange-500': item.publish === SupervisorPublished.N, |
| | | 'text-green-500': item.publish === SupervisorPublished.Y, |
| | | }" |
| | | class="text-[12px]" |
| | | > |
| | | {{ supervisorPublishedMap[item.publish] }} |
| | | </span> |
| | | </div> |
| | | </div> |
| | |
| | | import { useQueryTable } from '/@/hooks/useQueryTable'; |
| | | import mittBus from '/@/utils/mitt'; |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { SupervisorPublished, supervisorPublishedMap } from '/@/views/project/yw/lowCode/sqlAmis/types'; |
| | | import knowledgeLeft from '/static/images/knowledge/data_type_1.png'; |
| | | |
| | | import axios, { CancelTokenSource } from 'axios'; |
| | | const router = useRouter(); |
| | | //#region ====================== 获取知识库sheet列表 ====================== |
| | | const knowledgeBaseList = ref([]); |
| | |
| | | knowledge_title: row.title, |
| | | knowledge_desc: row.desc, |
| | | knowledge_prompt: row.prompt, |
| | | knowledge_scope: row.scope, |
| | | }, |
| | | }); |
| | | }; |
| | |
| | | chatTestIsShow.value = true; |
| | | nextTick(() => { |
| | | chatRef.value.clear(); |
| | | chatRef.value.autoSend(row.prompt); |
| | | setTimeout(() => { |
| | | chatRef.value.autoSend(row.prompt); |
| | | }, 30); |
| | | }); |
| | | }; |
| | | |
| | |
| | | }, |
| | | }); |
| | | |
| | | const questionAi = async (text) => { |
| | | const questionAi = async (text, sourceObj: { source: CancelTokenSource }) => { |
| | | const currentSource = axios.CancelToken.source(); |
| | | sourceObj.source = currentSource; |
| | | const res = await check_docvector_validate( |
| | | { |
| | | knowlg_id: chatTestMapRow.value.id, |
| | |
| | | }, |
| | | { |
| | | loading: false, |
| | | cancelToken: currentSource.token, |
| | | } |
| | | ); |
| | | return res; |