Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
canmoumou
追书人
提交
a008d4cd
追
追书人
项目概览
canmoumou
/
追书人
与 Fork 源项目一致
Fork自
inscode / ChatGPT With Prompt
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
追
追书人
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a008d4cd
编写于
11月 22, 2023
作者:
U
u013013023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wed Nov 22 16:01:00 CST 2023 inscode
上级
2705b9bf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
18 deletion
+34
-18
src/App.vue
src/App.vue
+34
-18
未找到文件。
src/App.vue
浏览文件 @
a008d4cd
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</
template
>
</
template
>
</div>
</div>
<div
class=
"question ivu-mt"
>
<div
class=
"question ivu-mt"
>
<Input
v-model=
"question"
type=
"textarea"
:autosize=
"{ minRows: 4, maxRows: 6 }"
placeholder=
"
输入内容
..."
/>
<Input
v-model=
"question"
type=
"textarea"
:autosize=
"{ minRows: 4, maxRows: 6 }"
placeholder=
"
你想说
..."
/>
<Row
class=
"ivu-mt"
>
<Row
class=
"ivu-mt"
>
<Col>
<Col>
<Button
type=
"primary"
size=
"large"
icon=
"md-send"
:loading=
"loading"
@
click=
"handleSend"
>
发送
</Button>
<Button
type=
"primary"
size=
"large"
icon=
"md-send"
:loading=
"loading"
@
click=
"handleSend"
>
发送
</Button>
...
@@ -17,25 +17,27 @@
...
@@ -17,25 +17,27 @@
<Button
size=
"large"
class=
"ivu-ml"
icon=
"md-add"
:disabled=
"loading"
@
click=
"handleNewChat"
>
新对话
</Button>
<Button
size=
"large"
class=
"ivu-ml"
icon=
"md-add"
:disabled=
"loading"
@
click=
"handleNewChat"
>
新对话
</Button>
</Col>
</Col>
<Col>
<Col>
<Button
size=
"large"
class=
"ivu-ml"
icon=
"md-settings"
:disabled=
"loading"
@
click=
"handleOpenPrompt"
>
设置 Prompt
</Button>
<Button
size=
"large"
class=
"ivu-ml"
icon=
"md-settings"
:disabled=
"loading"
@
click=
"handleOpenPrompt"
v-if=
"showPersonalButton"
>
个人信息
</Button>
</Col>
</Col>
</Row>
</Row>
<Typography
class=
"ivu-text-center ivu-m"
>
<Typography
class=
"ivu-text-center ivu-m"
>
Powered By
<img
src=
"./assets/logo.png"
class=
"logo"
>
<a
href=
"https://inscode.net"
target=
"_blank"
>
InsCode.net
</a>
Powered By
<img
src=
"./assets/logo.png"
class=
"logo"
>
<a
href=
"https://inscode.net"
target=
"_blank"
>
InsCode.net
</a>
</Typography>
</Typography>
</div>
</div>
<Modal
v-model=
"showPrompt"
title=
"设置
Prompt
"
footer-hide
:styles=
"{top: '20px'}"
>
<Modal
v-model=
"showPrompt"
title=
"设置
调查员
"
footer-hide
:styles=
"{top: '20px'}"
>
<Title
:level=
"4"
>
Prompt:
</Title>
<Title
:level=
"4"
>
调查员信息
</Title>
<Input
v-model=
"prompt"
type=
"textarea"
:autosize=
"{minRows: 3,maxRows: 5}"
placeholder=
"例如:
写一个策划,主题是_____
"
/>
<Input
v-model=
"prompt"
type=
"textarea"
:autosize=
"{minRows: 3,maxRows: 5}"
placeholder=
"例如:
我是xxx,xx岁.
"
/>
<Title
class=
"ivu-mt"
:level=
"4"
>
推荐
:
</Title>
<Title
class=
"ivu-mt"
:level=
"4"
>
预设调查员们
:
</Title>
<Space
:wrap=
"true"
>
<Space
:wrap=
"true"
>
<Button
@
click=
"handleSetPrompt('写一篇140字以内的朋友圈配文,语言风格要浪漫文艺的,主题是__________')"
>
朋友圈神器
</Button>
<Button
@
click=
"handleSetPrompt('我是杰西·威廉姆斯,黑人女性,今年20岁,阿卡姆密斯卡托尼克大学的历史系学生')"
>
杰西·威廉姆斯
</Button>
<Button
@
click=
"handleSetPrompt('扮演一位知心姐姐进行在线聊天。__________')"
>
知心姐姐
</Button>
<Button
@
click=
"handleSetPrompt('我是内华达·琼斯,男性,35岁,阿卡姆密斯卡托尼克大学的考古学教授')"
>
内华达·琼斯
</Button>
<Button
@
click=
"handleSetPrompt('你现在需要扮演一个高情商、幽默的人,去参加一些聚会社交,请帮我回应接下来的问题,__________')"
>
高情商回复
</Button>
<Button
@
click=
"handleSetPrompt('我是洛伊丝·卢索,女性,19岁,阿卡姆密斯卡托尼克大学的工程系教授')"
>
洛伊丝·卢索
</Button>
<Button
@
click=
"handleSetPrompt('我是你的专属心理咨询师,你有什么想咨询的么?')"
>
心理咨询师
</Button>
<Button
@
click=
"handleSetPrompt('我是温特沃夫‧埃夫伯里,男性,58岁,阿卡姆密斯卡托尼克大学的语言学教授')"
>
温特沃夫‧埃夫伯里
</Button>
<Button
@
click=
"handleSetPrompt('我是惠子·凯恩,21岁东亚女性,阿卡姆密斯卡托尼克大学的理科生')"
>
惠子·凯恩
</Button>
</Space>
</Space>
<Title
class=
"ivu-mt"
:level=
"4"
>
操作:
</Title>
<Title
class=
"ivu-mt"
:level=
"4"
>
操作:
</Title>
<Button
icon=
"md-trash"
@
click=
"handleClearPrompt"
>
清空
Prompt
</Button>
<Button
icon=
"md-trash"
@
click=
"handleClearPrompt"
>
清空
</Button>
<Button
size=
"large"
type=
"primary"
long
class=
"ivu-mt"
@
click=
"handleSavePrompt"
>
保存
</Button>
<Button
size=
"large"
type=
"primary"
long
class=
"ivu-mt"
@
click=
"handleSavePrompt"
>
保存
</Button>
</Modal>
</Modal>
</div>
</div>
...
@@ -53,10 +55,18 @@ export default {
...
@@ -53,10 +55,18 @@ export default {
loading
:
false
,
loading
:
false
,
dialogs
:
[],
dialogs
:
[],
prompt
:
''
,
prompt
:
''
,
showPrompt
:
false
showPrompt
:
false
,
showPersonalButton
:
true
,
}
}
},
},
methods
:
{
methods
:
{
handleInit
()
{
this
.
$Message
.
error
({
content
:
'
不要用沉默回复我
'
,
duration
:
3
,
background
:
true
});
},
handleSend
()
{
handleSend
()
{
if
(
this
.
loading
||
this
.
question
===
''
)
return
;
if
(
this
.
loading
||
this
.
question
===
''
)
return
;
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -75,7 +85,7 @@ export default {
...
@@ -75,7 +85,7 @@ export default {
this
.
dialogs
.
push
({
this
.
dialogs
.
push
({
id
:
aiDialogID
,
id
:
aiDialogID
,
role
:
'
ai
'
,
role
:
'
ai
'
,
text
:
'
AI 思考中
...
'
text
:
'
书页翻动的声音
...
'
});
});
const
dialog
=
this
.
dialogs
.
find
(
item
=>
item
.
id
===
aiDialogID
);
const
dialog
=
this
.
dialogs
.
find
(
item
=>
item
.
id
===
aiDialogID
);
...
@@ -128,7 +138,7 @@ export default {
...
@@ -128,7 +138,7 @@ export default {
});
});
},
},
handleNewChat
()
{
handleNewChat
()
{
this
.
dialogs
=
[];
this
.
dialogs
=
[
"
你可以做出以下选择
"
];
},
},
handleOpenPrompt
()
{
handleOpenPrompt
()
{
this
.
showPrompt
=
true
;
this
.
showPrompt
=
true
;
...
@@ -139,12 +149,17 @@ export default {
...
@@ -139,12 +149,17 @@ export default {
handleSavePrompt
()
{
handleSavePrompt
()
{
if
(
!
this
.
prompt
)
{
if
(
!
this
.
prompt
)
{
this
.
$Message
.
error
({
this
.
$Message
.
error
({
content
:
'
提示词内容不能为空
'
,
content
:
'
不要用沉默回复我, 请告诉我你是谁
'
,
duration
:
3
,
duration
:
3
,
background
:
true
background
:
true
});
});
}
else
{
}
else
{
const
prompt
=
this
.
prompt
;
const
pre_promt
=
"
你是coc模组的keeper,你将带领一位未解之谜探索协会(SEU)的调查员来到1992年的密歇根市,调查托马斯·金博尔家的书籍失窃案。
"
+
"
托马斯·金博尔居住在艾尔斯伯里大街 218 号的一栋小屋,热爱读书, 但最近他家里似乎遭了贼,被盗的是一些他叔叔最喜欢的书。
"
+
"
这个谜团有些不同寻常,因为这位叔叔早在一年前就神秘失踪了,并且没有留下任何踪迹。
"
+
"
因此,托马斯·金博尔请求调查员调查这起偷书案,同时也看看是否能查明他的叔叔道格拉斯失踪的原因。
"
+
"
以下是我作为调查员的个人信息:
"
;
const
prompt
=
pre_promt
+
this
.
prompt
;
localStorage
.
setItem
(
'
setting-prompt
'
,
prompt
);
localStorage
.
setItem
(
'
setting-prompt
'
,
prompt
);
this
.
showPrompt
=
false
;
this
.
showPrompt
=
false
;
this
.
handleLoadPrompt
();
this
.
handleLoadPrompt
();
...
@@ -157,10 +172,11 @@ export default {
...
@@ -157,10 +172,11 @@ export default {
prompt
=
localPrompt
;
prompt
=
localPrompt
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$Message
.
success
({
this
.
$Message
.
success
({
content
:
'
已加载 Prompt
'
,
content
:
'
我知道你是谁了
'
,
background
:
true
background
:
true
});
});
});
});
this
.
showPersonalButton
=
false
}
}
},
},
handleClearPrompt
()
{
handleClearPrompt
()
{
...
@@ -169,7 +185,7 @@ export default {
...
@@ -169,7 +185,7 @@ export default {
prompt
=
''
;
prompt
=
''
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$Message
.
success
({
this
.
$Message
.
success
({
content
:
'
已清空 Prompt
'
,
content
:
'
你不再是你
'
,
background
:
true
background
:
true
});
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录