Unverified 提交 409a302f 作者: fxjhello 提交者: GitHub

Revert "fix:前端知识库获取失败. 修改获取及删除接口至knowledge_base"

上级 6981bdee
...@@ -24,15 +24,6 @@ export const getfilelist = (knowledge_base_id: any) => { ...@@ -24,15 +24,6 @@ export const getfilelist = (knowledge_base_id: any) => {
}) })
} }
export const getkblist = (knowledge_base_id: any) => {
return api({
url: '/local_doc_qa/list_knowledge_base',
method: 'get',
params: {},
})
}
export const bing_search = (params: any) => { export const bing_search = (params: any) => {
return api({ return api({
url: '/local_doc_qa/bing_search_chat', url: '/local_doc_qa/bing_search_chat',
...@@ -48,13 +39,6 @@ export const deletefile = (params: any) => { ...@@ -48,13 +39,6 @@ export const deletefile = (params: any) => {
data: JSON.stringify(params), data: JSON.stringify(params),
}) })
} }
export const deletekb = (params: any) => {
return api({
url: '/local_doc_qa/delete_knowledge_base',
method: 'post',
data: JSON.stringify(params),
})
}
export const web_url = () => { export const web_url = () => {
return window.location.origin return window.location.origin
} }
......
...@@ -3,7 +3,7 @@ import { NButton, NForm, NFormItem, NInput, NPopconfirm } from 'naive-ui' ...@@ -3,7 +3,7 @@ import { NButton, NForm, NFormItem, NInput, NPopconfirm } from 'naive-ui'
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import filelist from './filelist.vue' import filelist from './filelist.vue'
import { SvgIcon } from '@/components/common' import { SvgIcon } from '@/components/common'
import { getkblist, deletekb} from '@/api/chat' import { deletefile, getfilelist } from '@/api/chat'
import { idStore } from '@/store/modules/knowledgebaseid/id' import { idStore } from '@/store/modules/knowledgebaseid/id'
const items = ref<any>([]) const items = ref<any>([])
const choice = ref('') const choice = ref('')
...@@ -11,7 +11,7 @@ const store = idStore() ...@@ -11,7 +11,7 @@ const store = idStore()
onMounted(async () => { onMounted(async () => {
choice.value = store.knowledgeid choice.value = store.knowledgeid
const res = await getkblist({}) const res = await getfilelist({})
res.data.data.forEach((item: any) => { res.data.data.forEach((item: any) => {
items.value.push({ items.value.push({
value: item, value: item,
...@@ -52,8 +52,8 @@ const handleClick = () => { ...@@ -52,8 +52,8 @@ const handleClick = () => {
} }
} }
async function handleDelete(item: any) { async function handleDelete(item: any) {
await deletekb(item.value) await deletefile(item.value)
const res = await getkblist({}) const res = await getfilelist({})
items.value = [] items.value = []
res.data.data.forEach((item: any) => { res.data.data.forEach((item: any) => {
items.value.push({ items.value.push({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论