diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js index 1ec7f76..51448f2 100644 --- a/src/renderer/src/api/mode/index.js +++ b/src/renderer/src/api/mode/index.js @@ -1,7 +1,7 @@ import request from '@/utils/request' import axios from 'axios' -let rootPath = import.meta.env.VITE_APP_ENV === 'production' ? "https://ai.ysaix.com:7864" : ''; +let rootPath = import.meta.env.VITE_APP_ENV === 'production' ? 'https://ai.ysaix.com:7864' : '' // 查询模板列表 export function modelList(params) { return request({ @@ -16,8 +16,8 @@ export function conversation(data) { url: rootPath + '/v1/api/new_conversation', method: 'get', headers: { - 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', - 'Content-Type': 'application/json', + Authorization: 'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', + 'Content-Type': 'application/json' }, data: data }) @@ -29,10 +29,45 @@ export function completion(data) { url: rootPath + '/v1/api/completion', method: 'post', headers: { - 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', + Authorization: 'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', 'Content-Type': 'application/json', - 'Accept': '*/*' + Accept: '*/*' }, data: data }) } + +// 添加提示词 (系统预设) +export function addKeyWords(data) { + return request({ + url: '/education/llmModel/copy', + method: 'post', + data + }) +} + +// 添加子模板 +export function addChildTemp(data) { + return request({ + url: '/education/llmModel', + method: 'post', + data + }) +} + +// 编辑子模板 +export function editChildTemp(data) { + return request({ + url: '/education/llmModel', + method: 'put', + data + }) +} + +// 删除子模板 +export function removeChildTemp(id) { + return request({ + url: '/education/llmModel/' + id, + method: 'delete' + }) +} diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue index 12f42ab..2747619 100644 --- a/src/renderer/src/components/template-study/container/header.vue +++ b/src/renderer/src/components/template-study/container/header.vue @@ -20,7 +20,7 @@