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
2f8a418d
Commit
2f8a418d
authored
May 09, 2024
by
pengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用接入修改。
parent
b5fd853c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
402 additions
and
381 deletions
+402
-381
ApiManage.js
src/api/GptController/ApiManage.js
+21
-0
gptController.js
src/api/gptController.js
+2
-2
development.js
src/core/config/development.js
+1
-1
systemRouters.js
src/router/systemRouters.js
+1
-1
editOrAdd.vue
...s/gptTraining/modelService/apiManage/dialog/editOrAdd.vue
+111
-111
index.vue
src/views/gptTraining/modelService/apiManage/index.vue
+266
-266
No files found.
src/api/GptController/
applicationAccess
.js
→
src/api/GptController/
ApiManage
.js
View file @
2f8a418d
export
default
class
applicationAccess
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
export
default
class
ApiManage
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
src/api/gptController.js
View file @
2f8a418d
...
...
@@ -19,7 +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'
;
import
ApiManage
from
'./GptController/ApiManage
.js'
;
export
{
TemplateController
,
...
...
@@ -42,5 +42,5 @@ export {
ModelDeployment
,
KnowledgeGraph
,
DataSetCleaning
,
applicationAccess
ApiManage
}
src/core/config/development.js
View file @
2f8a418d
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.
168
:8082/'
,
// baseUrl: 'http://192.168.0.34:8082/',
wsUrl
:
'ws://218.76.0.69:7860/'
,
projectName
:
'灵境大模型平台'
...
...
src/router/systemRouters.js
View file @
2f8a418d
...
...
@@ -56,7 +56,7 @@ const routers = [
{
path
:
'modelDeployment'
,
component
:
_import
(
'gptTraining/modelManagement/modelDeployment/index'
),
name
:
'modelDeployment'
,
props
:
getProps
,
meta
:
{
title
:
'模型部署'
}
},
// 模型服务
{
path
:
'serviceManagement'
,
component
:
_import
(
'gptTraining/modelService/serviceManagement/index'
),
name
:
'serviceManagement'
,
props
:
getProps
,
meta
:
{
title
:
'在线服务'
}
},
{
path
:
'ap
plicationAccess'
,
component
:
_import
(
'gptTraining/modelService/applicationAccess/index'
),
name
:
'applicationAccess
'
,
props
:
getProps
,
meta
:
{
title
:
'应用接入'
}
},
{
path
:
'ap
iManage'
,
component
:
_import
(
'gptTraining/modelService/apiManage/index'
),
name
:
'apiManage
'
,
props
:
getProps
,
meta
:
{
title
:
'应用接入'
}
},
{
path
:
'testOnline'
,
component
:
_import
(
'gptTraining/modelService/testOnline/index'
),
name
:
'testOnline'
,
props
:
getProps
,
meta
:
{
title
:
'在线测试'
}
},
{
path
:
'callStatistics'
,
component
:
_import
(
'gptTraining/modelService/callStatistics/index'
),
name
:
'callStatistics'
,
props
:
getProps
,
meta
:
{
title
:
'调用统计'
}
},
// Prompt工程
...
...
src/views/gptTraining/modelService/ap
plicationAccess
/dialog/editOrAdd.vue
→
src/views/gptTraining/modelService/ap
iManage
/dialog/editOrAdd.vue
View file @
2f8a418d
<!-- 基本信息-->
<
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=
"ap
plicationAccessDto.applicationName"
>
<el-input
v-model=
"form.ap
plicationAccessDto.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.ap
plicationAccessDto.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
:
{
ap
plicationAccessDto
:
{
applicationDescribe
:
''
,
ap
plicationName
:
''
}
},
rules
:
{
'ap
plicationAccessDto.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
>
<!-- 基本信息-->
<
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=
"ap
iManageDto.apiName"
>
<el-input
v-model=
"form.ap
iManageDto.apiName"
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.ap
iManageDto.remark"
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
{
ApiManage
}
from
'@/api/gptController.js'
export
default
{
data
()
{
return
{
taskList
:
[],
runNameList
:
[],
form
:
{
ap
iManageDto
:
{
remark
:
''
,
ap
iName
:
''
}
},
rules
:
{
'ap
iManageDto.apiName'
:
[{
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
)
{
ApiManage
.
update
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
else
{
ApiManage
.
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/ap
plicationAccess
/index.vue
→
src/views/gptTraining/modelService/ap
iManage
/index.vue
View file @
2f8a418d
This diff is collapsed.
Click to expand it.
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