|  |  |  | 
|---|
|  |  |  | data: any; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 会话列表 | 
|---|
|  |  |  | export function sessionListApi() { | 
|---|
|  |  |  | export function sessionListApi(dialog_id) { | 
|---|
|  |  |  | return axios.get<ISessionListResult>( | 
|---|
|  |  |  | '/api/conversation/list?modeltype=localragflow' | 
|---|
|  |  |  | "/api/conversation/list?modeltype=localragflow&dialogid=" + dialog_id, | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 会话列表分页 | 
|---|
|  |  |  | export function sessionListApiPage(data) { | 
|---|
|  |  |  | return axios.get<ISessionListResult>( | 
|---|
|  |  |  | `/api/conversation/list?modeltype=localragflow&dialogid=&page=${data.page}&per_page=${data.page_size}`, | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 删除会话 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 新增会话 | 
|---|
|  |  |  | export function addSessionApi(params: any) { | 
|---|
|  |  |  | return axios.get<ISessionListResult>( | 
|---|
|  |  |  | '/api/getConId/kdwithai?platform=localragflow', | 
|---|
|  |  |  | { params } | 
|---|
|  |  |  | return axios.post<ISessionListResult>( | 
|---|
|  |  |  | '/api/v1/conversation/set?platform=localragflow', | 
|---|
|  |  |  | params | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 获取智能助手列表 | 
|---|
|  |  |  | export function getDialogListApi() { | 
|---|
|  |  |  | return axios.get<ISessionListResult>('/api/dialog/list'); | 
|---|
|  |  |  | return axios.get<ISessionListResult>('/api/v1/dialog/list'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function uploadWithoutKb(params) { | 
|---|
|  |  |  | const config = { | 
|---|
|  |  |  | headers: { | 
|---|
|  |  |  | 'Content-Type': 'application/x-www-form-urlencoded', | 
|---|
|  |  |  | // token: token, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | return axios.post('/api/v1/document/upload_without_kb', params, config); | 
|---|
|  |  |  | } | 
|---|