-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1377710
commit c8ab7b1
Showing
13 changed files
with
658 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { http } from '@/utils/http/axios' | ||
|
||
function searchPresetConvs(data, params: { current: number, size: number }) { | ||
return http.request({ | ||
url: `/admin/conv-preset/search?currentPage=${params.current}&pageSize=${params.size}`, | ||
method: 'post', | ||
data, | ||
}) | ||
} | ||
|
||
function addPresetConv(data) { | ||
return http.request({ | ||
url: '/admin/conv-preset/addOne', | ||
method: 'post', | ||
data, | ||
}) | ||
} | ||
|
||
function editPresetConv(uuid: string, data) { | ||
return http.request({ | ||
url: `/admin/conv-preset/edit/${uuid}`, | ||
method: 'post', | ||
data, | ||
}) | ||
} | ||
|
||
function deletePresetConv(uuid: string) { | ||
return http.request( | ||
{ | ||
url: `/admin/conv-preset/del/${uuid}`, | ||
method: 'POST', | ||
} | ||
) | ||
} | ||
|
||
function searchConvs(data, params: { current: number, size: number }) { | ||
return http.request({ | ||
url: `/admin/conv/search?currentPage=${params.current}&pageSize=${params.size}`, | ||
method: 'post', | ||
data, | ||
}) | ||
} | ||
|
||
function editConv(uuid: string, data) { | ||
return http.request({ | ||
url: `/admin/conv/edit/${uuid}`, | ||
method: 'post', | ||
data, | ||
}) | ||
} | ||
|
||
function deleteConv(uuid: string) { | ||
return http.request( | ||
{ | ||
url: `/admin/conv/del/${uuid}`, | ||
method: 'POST', | ||
} | ||
) | ||
} | ||
|
||
export default { | ||
searchPresetConvs, | ||
addPresetConv, | ||
editPresetConv, | ||
deletePresetConv, | ||
searchConvs, | ||
editConv, | ||
deleteConv, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { RouteRecordRaw } from 'vue-router' | ||
import { Layout } from '@/router/constant' | ||
import { LibraryOutline } from '@vicons/ionicons5' | ||
import { renderIconWithProps } from '@/utils/index' | ||
|
||
/** | ||
* @param name 路由名称, 必须设置,且不能重名 | ||
* @param meta 路由元信息(路由附带扩展信息) | ||
* @param redirect 重定向地址, 访问这个路由时,自定进行重定向 | ||
* @param meta.disabled 禁用整个菜单 | ||
* @param meta.title 菜单名称 | ||
* @param meta.icon 菜单图标 | ||
* @param meta.keepAlive 缓存该路由 | ||
* @param meta.sort 排序越小越排前 | ||
* | ||
* */ | ||
const routes: Array<RouteRecordRaw> = [ | ||
{ | ||
path: '/conversation', | ||
name: 'Conversation', | ||
redirect: '/conversation/list', | ||
component: Layout, | ||
meta: { | ||
title: '会话管理', | ||
icon: renderIconWithProps(LibraryOutline, { size: 20 }), | ||
sort: 3, | ||
}, | ||
children: [ | ||
{ | ||
path: 'list', | ||
name: 'ConversationList', | ||
meta: { | ||
title: '会话管理', | ||
}, | ||
component: () => import('@/views/conversation/index.vue'), | ||
}, | ||
{ | ||
path: 'preset', | ||
name: 'PresetConversationList', | ||
meta: { | ||
title: '预设会话管理', | ||
}, | ||
component: () => import('@/views/conversation/preset-conv/PresetConv.vue'), | ||
}, | ||
], | ||
}, | ||
] | ||
|
||
export default routes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { BasicColumn } from '@/components/Table' | ||
import { Conversation } from '/#/conversation' | ||
export const columns: BasicColumn<Conversation>[] = [ | ||
{ | ||
title: 'id', | ||
key: 'id', | ||
width: 50, | ||
}, | ||
{ | ||
title: 'uuid', | ||
key: 'uuid', | ||
width: 120, | ||
}, | ||
{ | ||
title: '标题', | ||
key: 'title', | ||
width: 150, | ||
}, | ||
{ | ||
title: '角色描述', | ||
key: 'aiSystemMessage', | ||
width: 200, | ||
}, | ||
{ | ||
title: '消耗的总token', | ||
key: 'tokens', | ||
width: 150, | ||
}, | ||
{ | ||
title: '开启上下文', | ||
key: 'understandContextEnable', | ||
width: 100, | ||
render(row) { | ||
return row.understandContextEnable ? '是' : '否' | ||
}, | ||
}, | ||
{ | ||
title: '创建时间', | ||
key: 'createTime', | ||
width: 180, | ||
}, | ||
{ | ||
title: '更新时间', | ||
key: 'updateTime', | ||
width: 180, | ||
}, | ||
] |
Oops, something went wrong.