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
9cac7cc5
Commit
9cac7cc5
authored
Dec 26, 2023
by
mhw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
6b9ec22e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
index.vue
...ning/modelService/testOnline/components/leftBox/index.vue
+2
-1
index.vue
...ing/modelService/testOnline/components/rightBox/index.vue
+4
-2
No files found.
src/views/gptTraining/modelService/testOnline/components/leftBox/index.vue
View file @
9cac7cc5
...
...
@@ -19,7 +19,7 @@
<el-form-item
label=
"提示词:"
style=
""
>
<div
style=
"display: flex;flex-direction: row;align-items: center;"
>
<el-select
v-model=
"promptTemplate"
filterable
placeholder=
"提示词"
value-key=
"templateId"
@
change=
"templateControllerChange"
clearable
>
<el-option
v-for=
"item in templateControllerList"
:key=
"item.
value
"
:label=
"item.label"
:value=
"item"
>
<el-option
v-for=
"item in templateControllerList"
:key=
"item.
templateId
"
:label=
"item.label"
:value=
"item"
>
</el-option>
</el-select>
<el-switch
@
change=
"changePromptTemplate"
style=
"margin-left: 10px;"
v-model=
"isPromptTemplate"
active-color=
"#13ce66"
inactive-color=
"#ff4949"
>
...
...
@@ -215,6 +215,7 @@ export default {
this
.
modelList
=
res
.
data
.
map
((
item
)
=>
{
return
{
id
:
item
.
modelId
,
name
:
item
.
modelName
,
children
:
item
.
modelVersionList
===
[]
?
[]
:
item
.
modelVersionList
.
map
((
item2
)
=>
{
return
{
id
:
item2
.
versionId
,
name
:
item2
.
versionName
}
})
}
})
this
.
getActiveModelList
()
}).
catch
(
e
=>
{
console
.
log
(
e
);
...
...
src/views/gptTraining/modelService/testOnline/components/rightBox/index.vue
View file @
9cac7cc5
...
...
@@ -126,7 +126,8 @@ export default {
})
this
.
inputContent
=
null
;
console
.
log
(
this
.
myHistory
.
slice
(
0
,
-
1
).
slice
(
-
this
.
heistoryRotate
));
this
.
param
.
history
=
[]
this
.
myHistory
.
slice
(
0
,
-
1
).
slice
(
-
this
.
heistoryRotate
).
forEach
((
item
)
=>
{
this
.
param
.
history
.
push
(...[{
role
:
item
.
role
,
content
:
item
.
content
},
{
role
:
'assistant'
,
content
:
item
.
excludeReferenceAnswer
}])
})
...
...
@@ -145,7 +146,8 @@ export default {
onmessage
(
data
)
{
let
nowChat
=
this
.
myHistory
[
this
.
myHistory
.
length
-
1
]
if
(
this
.
chatForm
.
pattern
===
'通用智能问答'
)
{
nowChat
.
answer
+=
data
nowChat
.
excludeReferenceAnswer
+=
data
nowChat
.
answer
+=
data
;
}
else
if
(
this
.
chatForm
.
pattern
===
'专业知识库问答'
)
{
let
temporary
=
JSON
.
parse
(
`[
${
data
}
]`
.
replace
(
/}{/g
,
'},{'
))
temporary
.
forEach
((
item
)
=>
{
...
...
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