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
e4fd9a53
Commit
e4fd9a53
authored
Mar 05, 2024
by
mhw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
f56b2646
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
29 deletions
+40
-29
index.vue
.../modelService/testOnline/components/contentView/index.vue
+10
-11
index.vue
...ing/modelService/testOnline/components/rightBox/index.vue
+30
-18
No files found.
src/views/gptTraining/modelService/testOnline/components/contentView/index.vue
View file @
e4fd9a53
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
event
.
preventDefault
();
event
.
preventDefault
();
that
.
$dialog
.
show
(
'文件预览'
,
filePreview
,
{
that
.
$dialog
.
show
(
'文件预览'
,
filePreview
,
{
area
:
[
'100%'
,
'100%'
]
area
:
[
'100%'
,
'100%'
]
},
{
url
:
tagUrl
}).
then
(
res
=>
{
},
{
url
:
tagUrl
}).
then
(
res
=>
{
}).
catch
(
e
=>
{
});
}).
catch
(
e
=>
{
});
}
}
...
@@ -229,7 +229,7 @@ export default {
...
@@ -229,7 +229,7 @@ export default {
<
style
>
<
style
>
.describe-view
{
.describe-view
{
overflow
:
hidden
!important
;
overflow
:
hidden
!important
;
transition
:
all
0.5s
;
transition
:
all
0.5s
;
color
:
#000
;
color
:
#000
;
font-size
:
14px
;
font-size
:
14px
;
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -239,13 +239,12 @@ export default {
...
@@ -239,13 +239,12 @@ export default {
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.vis-label
{
.vis-label
{
white-space
:
nowrap
;
white-space
:
nowrap
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
}
}
.full
{
.full
{
width
:
20px
;
width
:
20px
;
height
:
20px
;
height
:
20px
;
/* background: #0092FF; */
/* background: #0092FF; */
...
@@ -257,7 +256,7 @@ export default {
...
@@ -257,7 +256,7 @@ export default {
border-radius
:
5px
;
border-radius
:
5px
;
/* transition: all 0.5s; */
/* transition: all 0.5s; */
}
}
.down
{
.down
{
width
:
20px
;
width
:
20px
;
height
:
20px
;
height
:
20px
;
/* background: #0092FF; */
/* background: #0092FF; */
...
...
src/views/gptTraining/modelService/testOnline/components/rightBox/index.vue
View file @
e4fd9a53
<!-- 右侧聊天界面 -->
<!-- 右侧聊天界面 -->
<
template
>
<
template
>
<div
class=
"box"
ref=
"box"
>
<div
class=
"box"
ref=
"box"
>
<div
class=
"contentBox"
ref=
"contentBox"
v-if=
"myHistory.length > 0"
>
<div
class=
"contentBox"
ref=
"contentBox"
v-if=
"myHistory.length > 0"
>
<div
v-for=
"
item in myHistory"
:key=
"item.id"
>
<div
v-for=
"item in myHistory"
:key=
"item.id"
>
<div
class=
"userBox"
>
<div
class=
"userBox"
>
<div
class=
"content"
>
<div
class=
"content"
>
<contentView
:content=
"item.content"
/>
<contentView
:content=
"item.content"
/>
</div>
</div>
<div
class=
"icon"
>
<div
class=
"icon"
>
...
@@ -14,29 +12,43 @@
...
@@ -14,29 +12,43 @@
</div>
</div>
</div>
</div>
<div
v-if=
"item.answer"
class=
"gptBox"
>
<div
v-if=
"item.answer"
class=
"gptBox"
>
<div
class=
"icon"
>
<div
class=
"icon"
>
GPT
</div>
GPT
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<contentView
:content=
"item.answer"
:ref=
"'contentView' + item.id"
/>
<contentView
:content=
"item.answer"
:ref=
"'contentView' + item.id"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"initBox"
ref=
"initBox"
v-else
>
<div
class=
"initBox"
ref=
"initBox"
v-else
>
<div
class=
"text"
>
<div
class=
"text"
>
你好,
<br>
你好,
<br
/
>
我是人工智能语言模型
<br>
我是人工智能语言模型
<br
/
>
我可以回答你的问题,为你提供有用信息,帮助你完成创作。
<br>
我可以回答你的问题,为你提供有用信息,帮助你完成创作。
<br
/
>
</div>
</div>
</div>
</div>
<div
class=
"inputBox"
>
<div
class=
"inputBox"
>
<el-input
placeholder=
"请输入内容"
v-model=
"inputContent"
class=
"input-with-select"
@
keyup
.
enter
.
native=
"submit"
>
<el-input
<el-button
slot=
"append"
icon=
"el-icon-position"
@
click=
"submit"
></el-button>
placeholder=
"请输入内容"
v-model=
"inputContent"
class=
"input-with-select"
@
keyup
.
enter
.
native=
"submit"
>
<el-button
slot=
"append"
icon=
"el-icon-position"
@
click=
"submit"
></el-button>
</el-input>
</el-input>
<el-button
icon=
"el-icon-delete"
style=
"margin-left:10px"
@
click=
"clear"
type=
"danger"
plain
></el-button>
<el-button
icon=
"el-icon-delete"
style=
"margin-left: 10px"
@
click=
"clear"
type=
"danger"
plain
></el-button>
</div>
</div>
<div
id=
"network"
></div>
<div
id=
"network"
></div>
</div>
</div>
...
@@ -169,13 +181,14 @@ export default {
...
@@ -169,13 +181,14 @@ export default {
nowChat
.
answer
+=
item
.
answer
||
'
\
n'
+
item
.
docs
nowChat
.
answer
+=
item
.
answer
||
'
\
n'
+
item
.
docs
})
})
}
else
if
(
this
.
chatForm
.
pattern
===
'知识图谱问答'
)
{
}
else
if
(
this
.
chatForm
.
pattern
===
'知识图谱问答'
)
{
console
.
log
(
data
);
let
temporary
=
JSON
.
parse
(
`[
${
data
}
]`
.
replace
(
/}{/g
,
'},{'
))
let
temporary
=
JSON
.
parse
(
`[
${
data
}
]`
.
replace
(
/}{/g
,
'},{'
))
temporary
.
forEach
((
item
)
=>
{
temporary
.
forEach
((
item
)
=>
{
console
.
log
(
item
);
this
.
modifyContent
(
item
)
// 修改返回内容
this
.
modifyContent
(
item
)
// 修改返回内容
nowChat
.
excludeReferenceAnswer
+=
item
.
answer
||
''
// 排除回答中的引用内容
nowChat
.
excludeReferenceAnswer
+=
item
.
answer
||
''
// 排除回答中的引用内容
nowChat
.
answer
+=
item
.
answer
||
'
\
n'
+
item
.
docs
nowChat
.
answer
+=
item
.
answer
||
'
\
n'
+
item
.
docs
.
join
()
// nowChat.answer += item.answer += '\n' + item.docs.join()
})
})
}
}
...
@@ -216,7 +229,6 @@ export default {
...
@@ -216,7 +229,6 @@ export default {
var
data
=
match2
[
1
]
var
data
=
match2
[
1
]
// 修改文本内容
// 修改文本内容
textAfterSpecifiedString
=
`<div class="describe-view" data="
${
data
}
" >
${
textAfterSpecifiedString
}
</div>`
textAfterSpecifiedString
=
`<div class="describe-view" data="
${
data
}
" >
${
textAfterSpecifiedString
}
</div>`
item2
=
item2
.
replace
(
match2
[
2
],
textAfterSpecifiedString
)
item2
=
item2
.
replace
(
match2
[
2
],
textAfterSpecifiedString
)
}
}
return
item2
.
replace
(
'出处'
,
'知识溯源'
)
return
item2
.
replace
(
'出处'
,
'知识溯源'
)
...
...
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