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
ce4b5716
Commit
ce4b5716
authored
Dec 26, 2023
by
mhw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提示词修改
parent
9cac7cc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
createTemplate.vue
...oject/promptTemplate/components/dialog/createTemplate.vue
+4
-3
promptInput.vue
...tProject/promptTemplate/components/dialog/promptInput.vue
+6
-2
No files found.
src/views/gptTraining/promptProject/promptTemplate/components/dialog/createTemplate.vue
View file @
ce4b5716
...
...
@@ -21,11 +21,13 @@
</el-form-item>
<template
v-if=
"form.scenarioType === 0 "
>
<el-form-item
label=
"模板框架:"
class=
"templateFramework"
v-if=
" !isEdit"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.name"
placement=
"top"
v-for=
"item in TemplateFrameworkDict.getList()"
:label=
"item.id"
:size=
"defaultFormItemSize"
:key=
"item.id"
>
<el-radio
v-model=
"form.templateFramework"
@
input=
"$refs.promptInput.init()"
:label=
"item.id"
>
{{
item
.
symbol
}}
</el-radio>
</el-tooltip>
</el-form-item>
<el-form-item
label=
"Prompt:"
prop=
"templateContent"
key=
"templateContent1"
>
<promptInput
ref=
"promptInput"
v-model=
"form.templateContent"
:templateFramework=
"form.templateFramework"
:isEdit=
"isEdit"
/>
</el-form-item>
</
template
>
...
...
@@ -58,7 +60,7 @@ export default {
interfaceAddress
:
''
,
negativeTemplateContent
:
''
,
negativeTemplateVariables
:
''
,
parameterFormat
:
''
,
parameterFormat
:
'
{}
'
,
scenarioType
:
0
,
templateContent
:
''
,
templateFramework
:
0
,
...
...
@@ -131,8 +133,7 @@ export default {
});
});
},
changeScenarioType
()
{
console
.
log
(
this
.
$refs
.
promptInput
);
changeScenarioType
(
data
)
{
if
(
this
.
$refs
.
promptInput
)
{
this
.
$refs
.
promptInput
.
init
()
}
...
...
src/views/gptTraining/promptProject/promptTemplate/components/dialog/promptInput.vue
View file @
ce4b5716
<!--prompt输入 -->
<
template
>
<div
>
<el-input
v-if=
"[1,2,3].indexOf(templateFramework)===-1||isEdit"
type=
"textarea"
:rows=
"5"
placeholder=
"请输入内容"
:value=
"prompt"
class=
"inputWidth"
@
input=
"changeInput"
></el-input>
<el-input
v-if=
"[1,2,3].indexOf(templateFramework)===-1||isEdit"
type=
"textarea"
:rows=
"5"
placeholder=
"请输入内容"
:value=
"prompt"
class=
"inputWidth"
@
input=
"changeInput
2
"
></el-input>
<el-card
class=
"box-card"
style=
"width:600px"
v-else
>
<div
class=
"inputBox"
v-for=
"(item,index) in myPrompts"
:key=
"index"
>
...
...
@@ -128,9 +128,13 @@ export default {
return
item
.
label
+
':'
+
item
.
value
+
'
\
n'
}
}).
join
(
''
)
console
.
log
(
promptsString
);
console
.
log
(
this
.
templateFramework
);
this
.
$emit
(
'input'
,
[
1
,
2
,
3
].
indexOf
(
this
.
templateFramework
)
===
-
1
?
this
.
prompt
:
promptsString
)
},
changeInput2
(
data
)
{
this
.
prompt
=
data
this
.
$emit
(
'input'
,
this
.
prompt
)
},
add
(
item
)
{
if
(
item
.
tableData
.
length
===
20
)
return
item
.
tableData
.
push
({
...
...
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