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 @@
- + @@ -31,7 +31,8 @@
- + + @@ -69,7 +70,7 @@ const curTemplate = reactive({ name: '', id: '' }) const templateList = ref([]) // 获取模板列表 const getTemplateList = () => { - modelList({ model: props.type, type: 1 }).then(res => { + modelList({ model: props.type, type: 1, ex3: 1 }).then(res => { templateList.value = res.rows Object.assign(curTemplate, res.rows[0]); emit('changeTemp', res.rows[0].id) @@ -93,6 +94,11 @@ const changeTemplate = (val) => { }) } +const onAdd = () =>{ + wordDialog.value = true + +} + onMounted(() => { getTemplateList() }) diff --git a/src/renderer/src/components/template-study/container/keyword-dialog.vue b/src/renderer/src/components/template-study/container/keyword-dialog.vue index 7ce82f2..7ecd927 100644 --- a/src/renderer/src/components/template-study/container/keyword-dialog.vue +++ b/src/renderer/src/components/template-study/container/keyword-dialog.vue @@ -1,28 +1,27 @@ @@ -55,18 +55,19 @@ - +