File size: 941 Bytes
af9251e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
import { api } from './api'
export const chat = (params: any) => {
return api({
url: '/chat',
method: 'post',
data: JSON.stringify(params),
})
}
export const chatfile = (params: any) => {
return api({
url: '/local_doc_qa/local_doc_chat',
method: 'post',
data: JSON.stringify(params),
})
}
export const getfilelist = (knowledge_base_id: any) => {
return api({
url: '/local_doc_qa/list_files',
method: 'get',
params: { knowledge_base_id },
})
}
export const bing_search = (params: any) => {
return api({
url: '/local_doc_qa/bing_search_chat',
method: 'post',
data: JSON.stringify(params),
})
}
export const deletefile = (params: any) => {
return api({
url: '/local_doc_qa/delete_file',
method: 'post',
data: JSON.stringify(params),
})
}
export const web_url = () => {
return window.location.origin
}
export const setapi = () => {
return window.baseApi
}
|