From dfde8df81532b97dd9210dc66630e0a501927bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Tue, 24 Jun 2025 17:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BF=A1=E4=BB=A3=E7=A0=81=E5=BA=93-A?= =?UTF-8?q?I=E5=A4=A7=E6=A8=A1=E5=9E=8B=E5=85=AC=E7=BD=91=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jyh/index.ts | 83 +++++++++++++++++++ src/components/Header/AIHeader.vue | 2 +- src/views/Jyh/AI/Home/GuessYouWantToAsk.vue | 11 +-- .../ViewHistoryAside/BatchManageModal.vue | 47 +++++++++-- .../ViewHistoryAside/ViewHistoryAside.vue | 78 ++++++++++++----- src/views/Jyh/AI/Home/index.vue | 60 +++++++++----- 6 files changed, 225 insertions(+), 56 deletions(-) diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index ab43aa7..f3af4f3 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -369,3 +369,86 @@ export function basicDict(data) { data: data, }); } + + +/*AI大模型接口*/ +// 1. 创建对话 +export function fetchCreateConversation(data) { + return request({ + url: `/agentHelper/api/createConversation`, + method: 'post', + data: data, + }); +} + +// 2. 对话 +export function fetchChatUseSql(data) { + return request({ + url: `/agentHelper/api/v0/chat_use_sql`, + method: 'post', + data: data, + }); +} + +// 3. 查询会话列表 +export function fetchConversationList(data) { + return request({ + url: `/agentHelper/api/conversationList`, + method: 'post', + data: data, + }); +} + +// 4. 查询会话详情 +export function fetchConversationDetail(params) { + return request({ + url: `/agentHelper/api/conversationDetail`, + method: 'get', + params: params, + }); +} + +// 5. 获取推荐问题 +export function FetchFollowupQuestions(data) { + return request({ + url: `/agentHelper/api/v0/provide_followup_questions`, + method: 'post', + data: data, + }); +} + +// 6. 修改会话标题 +export function fetchChangeConversationTitle(data) { + return request({ + url: `/agentHelper/api/changeConversationTitle`, + method: 'post', + data: data, + }); +} + +// 7. 修改会话的收藏状态 +export function fetchToggleConversationCollect(data) { + return request({ + url: `/agentHelper/api/toggleConversationCollect`, + method: 'post', + data: data, + }); +} + +// 8. 删除对话 +export function fetchDeleteConversation(data) { + return request({ + url: `/agentHelper/api/deleteConversation`, + method: 'post', + data: data, + }); +} + +// 9. 首页推荐问题 +export function fetchUpdateRecommendQuestions(data) { + return request({ + url: `/agentHelper/api/v0/update_recommend_questions`, + method: 'post', + data: data, + }); +} diff --git a/src/components/Header/AIHeader.vue b/src/components/Header/AIHeader.vue index 9ac1391..6f56a0b 100644 --- a/src/components/Header/AIHeader.vue +++ b/src/components/Header/AIHeader.vue @@ -133,7 +133,7 @@ const handleHelp = () => { // window.location.href = 'http://222.20.126.208:4399/'; // 或者使用 window.open 打开新标签页 - window.open('http://222.20.126.208:4399/', '_blank'); + window.open('http://52.184.83.30:8088/', '_blank'); console.log('正在跳转到帮助页面'); } catch (error) { diff --git a/src/views/Jyh/AI/Home/GuessYouWantToAsk.vue b/src/views/Jyh/AI/Home/GuessYouWantToAsk.vue index 5137b63..ce7e4ac 100644 --- a/src/views/Jyh/AI/Home/GuessYouWantToAsk.vue +++ b/src/views/Jyh/AI/Home/GuessYouWantToAsk.vue @@ -21,6 +21,7 @@