Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lmp_web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yujian
lmp_web
Commits
0e6f7290
Commit
0e6f7290
authored
Apr 24, 2024
by
mhw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增应用接入
parent
a65dee81
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
279 additions
and
90 deletions
+279
-90
applicationAccess.js
src/api/GptController/applicationAccess.js
+21
-0
gptController.js
src/api/gptController.js
+3
-1
development.js
src/core/config/development.js
+2
-2
index.vue
src/views/gptTraining/knowledgeGraph/card/index.vue
+3
-3
index.vue
src/views/gptTraining/modelFineTuning/sft/index.vue
+3
-0
index.vue
...ews/gptTraining/modelManagement/modelEvaluation/index.vue
+4
-3
editOrAdd.vue
...ining/modelService/applicationAccess/dialog/editOrAdd.vue
+111
-0
index.vue
...iews/gptTraining/modelService/applicationAccess/index.vue
+132
-81
No files found.
src/api/GptController/applicationAccess.js
0 → 100644
View file @
0e6f7290
export
default
class
applicationAccess
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/applicationAccess/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/applicationAccess/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/applicationAccess/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/applicationAccess/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/applicationAccess/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
src/api/gptController.js
View file @
0e6f7290
...
...
@@ -19,6 +19,7 @@ import DatasetData from './GptController/DatasetData.js';
import
ModelDeployment
from
'./GptController/ModelDeployment.js'
;
import
KnowledgeGraph
from
'./GptController/KnowledgeGraph.js'
;
import
DataSetCleaning
from
'./GptController/DataSetCleaning.js'
;
import
applicationAccess
from
'./GptController/applicationAccess.js'
;
export
{
TemplateController
,
...
...
@@ -40,5 +41,6 @@ export {
DatasetData
,
ModelDeployment
,
KnowledgeGraph
,
DataSetCleaning
DataSetCleaning
,
applicationAccess
}
src/core/config/development.js
View file @
0e6f7290
module
.
exports
=
{
// baseUrl: 'http://218.76.0.69:8082/',
//
baseUrl: 'http://192.168.0.34:8082/',
baseUrl
:
'http://192.168.0.36:8082/'
,
baseUrl
:
'http://192.168.0.34:8082/'
,
//
baseUrl: 'http://192.168.0.36:8082/',
// baseUrl: 'http://192.168.0.34:8082/',
wsUrl
:
'ws://218.76.0.69:7860/'
,
projectName
:
'灵境大模型平台'
...
...
src/views/gptTraining/knowledgeGraph/card/index.vue
View file @
0e6f7290
...
...
@@ -45,9 +45,9 @@
</el-tooltip>
</div>
-->
<div
style=
"margin-bottom:10px"
>
<el-button
type=
"primary"
plain
:size=
"defaultFormItemSize"
@
click
.
stop=
"testLink(item)"
>
测试连接
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
:plain=
"true"
@
click
.
stop=
"edit(item)"
>
编辑
</el-button>
<el-button
type=
"danger"
:size=
"defaultFormItemSize"
:plain=
"true"
@
click
.
stop=
"del(item)"
>
删除
</el-button>
<el-button
plain
:size=
"defaultFormItemSize"
@
click
.
stop=
"testLink(item)"
>
测试连接
</el-button>
<el-button
:size=
"defaultFormItemSize"
plain
@
click
.
stop=
"edit(item)"
>
编辑
</el-button>
<el-button
:size=
"defaultFormItemSize"
plain
@
click
.
stop=
"del(item)"
>
删除
</el-button>
</div>
</div>
</el-card>
...
...
src/views/gptTraining/modelFineTuning/sft/index.vue
View file @
0e6f7290
...
...
@@ -272,6 +272,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/assets/style/element-variables.scss'
;
.title
{
font-size
:
16px
;
}
.instructions
{
background-color
:
white
;
width
:
100%
;
...
...
src/views/gptTraining/modelManagement/modelEvaluation/index.vue
View file @
0e6f7290
<!--模型评估 -->
<
template
>
<div
style=
"position: relative"
>
<el-collapse
v-model=
"activeName"
accordion
ref=
"collapse"
v-resize=
"resize"
style=
"margin-bottom:20px"
>
...
...
@@ -68,8 +67,8 @@
<
script
>
import
{
mapGetters
}
from
'vuex'
/* eslint-disable-next-line */
import
{
DropdownWidget
,
TableWidget
,
UploadWidget
,
ChartWidget
}
from
'@/utils/widget.js'
import
{
ModelEstimate
}
from
'@/api/gptController.js'
import
{
TableWidget
}
from
'@/utils/widget.js'
import
editOrAdd
from
'./dialog/editOrAdd'
import
particulars
from
'./dialog/particulars'
...
...
@@ -261,7 +260,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/assets/style/element-variables.scss'
;
.title
{
font-size
:
16px
;
}
.instructions
{
background-color
:
white
;
width
:
100%
;
...
...
src/views/gptTraining/modelService/applicationAccess/dialog/editOrAdd.vue
0 → 100644
View file @
0e6f7290
<!-- 基本信息-->
<
template
>
<el-form
label-position=
"left"
ref=
"form"
label-width=
"100px"
:model=
"form"
:size=
"defaultFormItemSize"
:rules=
"rules"
>
<el-row
class=
"title"
>
基本信息
</el-row>
<el-form-item
label=
"应用名称:"
prop=
"applicationAccessDto.applicationName"
>
<el-input
v-model=
"form.applicationAccessDto.applicationName"
class=
"inputWidth"
:size=
"defaultFormItemSize"
></el-input>
<el-row>
<span
class=
"introduce"
>
支持中英文、数字、下划线(_),2-20个字符,不能以下划线为开头
</span></el-row>
</el-form-item>
<el-form-item
label=
"应用描述:"
>
<el-input
v-model=
"form.applicationAccessDto.applicationDescribe"
type=
"textarea"
class=
"inputWidth"
:rows=
"5"
:size=
"defaultFormItemSize"
></el-input>
</el-form-item>
<el-row
type=
"flex"
justify=
"end"
class=
"dialog-btn-layer mt20"
>
<el-button
:size=
"defaultFormItemSize"
:plain=
"true"
@
click=
"onCancel(false)"
>
取消
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
@
click=
"onSubmit"
>
确定
</el-button>
</el-row>
</el-form>
</
template
>
<
script
>
import
{
applicationAccess
}
from
'@/api/gptController.js'
export
default
{
data
()
{
return
{
taskList
:
[],
runNameList
:
[],
form
:
{
applicationAccessDto
:
{
applicationDescribe
:
''
,
applicationName
:
''
}
},
rules
:
{
'applicationAccessDto.applicationName'
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}]
}
}
},
props
:
[
'isEdit'
,
'item'
],
components
:
{},
computed
:
{},
mounted
()
{
this
.
intFrom
()
this
.
getTaskList
()
// this.getTuningRun()
},
methods
:
{
intFrom
()
{
this
.
form
=
{
...
this
.
form
,
...
this
.
item
}
try
{
this
.
form
.
templateLabel
=
JSON
.
parse
(
this
.
item
.
templateLabel
)
}
catch
(
error
)
{
// console.log(error);
}
},
onCancel
(
isSuccess
)
{
if
(
this
.
observer
!=
null
)
{
this
.
observer
.
cancel
(
isSuccess
)
}
},
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
{}
params
=
{
...
this
.
form
}
if
(
this
.
isEdit
)
{
applicationAccess
.
update
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
else
{
applicationAccess
.
add
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'添加成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
}
else
{
// reject();
}
})
})
}
}
}
</
script
>
<
style
scoped
>
.inputWidth
{
width
:
600px
;
}
.title
{
font-size
:
20px
;
margin-bottom
:
16px
;
}
.introduce
{
font-size
:
12px
;
color
:
#909399
;
}
</
style
>
src/views/gptTraining/modelService/applicationAccess/index.vue
View file @
0e6f7290
<!--应用接入-->
<
template
>
<div
style=
"position: relative"
>
<el-collapse
v-model=
"activeName"
accordion
ref=
"collapse"
v-resize=
"resize"
style=
"margin-bottom:20px"
>
<el-collapse
v-model=
"activeName"
accordion
ref=
"collapse"
v-resize=
"resize"
style=
"margin-bottom:20px"
>
<el-collapse-item
name=
"1"
>
<template
slot=
"title"
>
<div
class=
"title"
>
操作指引
</div>
...
...
@@ -15,88 +9,77 @@
<div
class=
"instructions"
>
<div
class=
"instructionsList"
>
<div
class=
"item"
v-for=
"(item, index) in instructionsList"
:key=
"index"
>
<div
class=
"item"
v-for=
"(item, index) in instructionsList"
:key=
"index"
>
<div>
<img
class=
"img"
:src=
"item.img"
alt=
""
/>
<div
class=
"itemTitle"
>
<span
class=
"head-index"
>
{{ index + 1 }}
</span
>
{{ item.title }}
<span
class=
"head-index"
>
{{ index + 1 }}
</span>
{{ item.title }}
</div>
<div
class=
"itemDescribe"
>
{{ item.describe }}
</div>
</div>
<i
v-if=
"instructionsList.length!==index+1"
class=
"el-icon-arrow-right"
style=
"margin-left: 50px; font-size: 30px; font-weight: bolder;color:#b8babf"
></i>
<i
v-if=
"instructionsList.length!==index+1"
class=
"el-icon-arrow-right"
style=
"margin-left: 50px; font-size: 30px; font-weight: bolder;color:#b8babf"
></i>
</div>
</div>
</div>
</el-collapse-item>
</el-collapse>
<div
class=
"tableBox"
:style=
"{ height: tableHeight }"
>
<el-form
ref=
"myDataSetPage"
:model=
"myDataSetPage"
label-width=
"75px"
:size=
"defaultFormItemSize"
label-position=
"right"
@
submit
.
native
.
prevent
>
<filter-box
:item-width=
"350"
@
search=
"refresh()"
@
reset=
"onReset"
>
<el-form-item
label-width=
"0px"
>
<el-button
class=
"add"
type=
"primary"
icon=
"el-icon-plus"
:size=
"defaultFormItemSize"
@
click=
"add"
>
创建应用
</el-button>
</el-form-item>
<el-form-item
label=
"应用名称"
prop=
"formFilter.modelName"
label-width=
"120px"
>
<el-input
class=
"filter-item"
v-model=
"myDataSetPage.formFilter.applicationName"
:clearable=
"true"
placeholder=
"应用名称"
/>
</el-form-item>
</filter-box>
</el-form>
<el-button
class=
"add"
type=
"primary"
icon=
"el-icon-plus"
:size=
"defaultFormItemSize"
>
创建应用
</el-button
>
<vxe-table
border
show-header-overflow
show-overflow
:row-config=
"{ isHover: true }"
:data=
"tableData"
min-height=
"96"
>
<vxe-column
field=
"appName"
title=
"应用名称"
></vxe-column>
<vxe-column
field=
"appID"
title=
"AppID"
></vxe-column>
<vxe-table
border
show-header-overflow
show-overflow
:row-config=
"{ isHover: true }"
:data=
"myDataSetPage.tableData.impl.dataList"
min-height=
"96"
>
<vxe-column
field=
"applicationName"
title=
"应用名称"
></vxe-column>
<vxe-column
field=
"appId"
title=
"AppID"
></vxe-column>
<vxe-column
field=
"apiKey"
title=
"API Key"
></vxe-column>
<vxe-column
field=
"secretKey"
title=
"Secret Key"
></vxe-column>
<vxe-column
field=
"creationTime"
title=
"创建时间"
></vxe-column>
<vxe-column
field=
"applicationDescribe"
title=
"描述"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
></vxe-column>
<vxe-column
field=
"operation"
title=
"操作"
>
<
!-- <
template slot-scope="scope">
<el-button
<
template
slot-scope=
"scope"
>
<!--
<el-button
type=
"text"
:size=
"defaultFormItemSize"
@
click=
"dataImport(scope.row)"
>
导入
</el-button
>
<el-button
type="text"
:size="defaultFormItemSize"
@click="del(scope.row)"
>删除</el-button
>
</template> -->
>
-->
<el-button
type=
"text"
:size=
"defaultFormItemSize"
@
click=
"del(scope.row)"
>
删除
</el-button>
</
template
>
</vxe-column>
</vxe-table>
<el-row
slot=
"pagination"
type=
"flex"
justify=
"end"
style=
"margin-top: 16px;width: 100%;"
>
<el-pagination
:total=
"myDataSetPage.tableData.impl.totalCount"
:current-page=
"myDataSetPage.tableData.impl.currentPage"
:page-size=
"myDataSetPage.tableData.impl.pageSize"
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, prev, pager, next, sizes"
@
current-change=
"myDataSetPage.tableData.impl.onCurrentPageChange"
@
size-change=
"myDataSetPage.tableData.impl.onPageSizeChange"
>
</el-pagination>
</el-row>
</div>
</div>
</template>
<
script
>
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
/* eslint-disable-next-line */
import
{
DropdownWidget
,
TableWidget
,
UploadWidget
,
ChartWidget
}
from
'@/utils/widget.js'
import
{
applicationAccess
}
from
'@/api/gptController.js'
import
editOrAdd
from
'./dialog/editOrAdd'
export
default
{
data
()
{
data
()
{
return
{
activeName
:
'1'
,
collapseHeight
:
0
,
instructionsList
:
[
{
title
:
'创建应用'
,
describe
:
'创建应用, 获取密钥'
,
describe
:
'创建应用, 获取密钥'
,
img
:
require
(
'@/assets/img/pg1.svg'
)
},
{
...
...
@@ -106,53 +89,121 @@ export default {
},
{
title
:
'查看用量'
,
describe
:
'查看报表了解使用情况'
,
describe
:
'查看报表了解使用情况'
,
img
:
require
(
'@/assets/img/pg3.svg'
)
}
],
myDataSetPage
:
{
formFilter
:
{
dataName
:
''
}
applicationName
:
''
},
tableData
:
[
{
id
:
10001
,
name
:
'Test1'
,
role
:
'Develop'
,
sex
:
'Man'
,
age
:
28
,
address
:
'test abc'
}
]
};
tableData
:
{
impl
:
new
TableWidget
(
this
.
getwidgetData
,
true
,
true
,
false
,
undefined
,
false
)
}
}
}
},
components
:
{},
computed
:
{
...
mapGetters
([
'getMainContextHeight'
]),
tableHeight
()
{
return
this
.
getMainContextHeight
-
this
.
collapseHeight
-
54
+
'px'
;
tableHeight
()
{
return
this
.
getMainContextHeight
-
this
.
collapseHeight
-
55
+
'px'
}
},
mounted
()
{},
methods
:
{
resize
(
e
)
{
getwidgetData
(
params
)
{
if
(
params
==
null
)
params
=
{}
params
=
{
...
params
,
applicationAccessDtoFilter
:
{
...
this
.
myDataSetPage
.
formFilter
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
applicationAccess
.
list
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
({
dataList
:
res
.
data
.
dataList
,
totalCount
:
res
.
data
.
totalCount
})
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
})
},
add
()
{
this
.
$dialog
.
show
(
'创建应用'
,
editOrAdd
,
{
area
:
[
'50%'
,
'70%'
]
},
{
isEdit
:
false
}
)
.
then
((
res
)
=>
{
this
.
refresh
()
})
.
catch
((
e
)
=>
{
this
.
refresh
()
})
},
del
(
item
)
{
this
.
$confirm
(
'是否确认删除'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
params
=
{
kgId
:
item
.
kgId
}
applicationAccess
.
delete
(
this
,
params
)
.
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
refresh
()
})
.
catch
((
e
)
=>
{
console
.
log
(
e
)
})
})
},
refresh
(
reloadData
=
false
)
{
if
(
reloadData
)
{
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
(
true
,
1
)
}
else
{
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
()
}
},
onReset
()
{
this
.
$refs
.
myDataSetPage
.
resetFields
()
this
.
refresh
(
true
)
},
formInit
()
{
this
.
refresh
()
},
resize
(
e
)
{
setTimeout
(()
=>
{
this
.
collapseHeight
=
e
.
height
;
},
300
);
this
.
collapseHeight
=
e
?.
height
},
300
)
}
},
onReset
()
{}
mounted
()
{
this
.
formInit
()
}
}
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@/assets/style/element-variables.scss"
;
@import
'@/assets/style/element-variables.scss'
;
.title
{
font-size
:
16px
;
}
.instructions
{
background-color
:
white
;
width
:
100%
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment