Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
canmoumou
追书人
提交
36aa1087
追
追书人
项目概览
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看板
提交
36aa1087
编写于
11月 23, 2023
作者:
U
u013013023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto Commit
上级
b7b7ea59
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
78 addition
and
42 deletion
+78
-42
src/App.vue
src/App.vue
+78
-42
未找到文件。
src/App.vue
浏览文件 @
36aa1087
...
@@ -47,17 +47,17 @@ import { fetchEventSource } from '@microsoft/fetch-event-source';
...
@@ -47,17 +47,17 @@ import { fetchEventSource } from '@microsoft/fetch-event-source';
import
{
apiKey
,
apiUrl
}
from
'
./api
'
;
import
{
apiKey
,
apiUrl
}
from
'
./api
'
;
let
prompt
=
''
;
let
prompt
=
''
;
let
start_prompt
=
"
请扮演克苏鲁主题
,
COC模组的keeper,引导我做各种行动.
"
+
let
start_prompt
=
"
请扮演克苏鲁主题COC模组的keeper,引导我做各种行动.
"
+
"
背景:1992年, 一位未解之谜探索协会(SEU)的调查员,来到密歇根市,调查托马斯·金博尔家的书籍失窃案.
"
+
"
背景:1992年, 一位未解之谜探索协会(SEU)的调查员,来到密歇根市,调查托马斯·金博尔家的书籍失窃案.
"
+
"
托马斯·金博尔居住在艾尔斯伯里大街 218 号的一栋小屋,热爱读书, 但最近他家里似乎遭了贼,被盗的是一些他叔叔最喜欢的书.
"
+
"
托马斯·金博尔居住在艾尔斯伯里大街 218 号的一栋小屋,热爱读书, 但最近他家里似乎遭了贼,被盗的是一些他叔叔最喜欢的书.
"
+
"
这
个谜团有些不同寻常,这位叔叔在一年前就神秘失踪,没有留下任何踪迹.
"
+
"
这
位叔叔在一年前就神秘失踪。
"
+
"
因此,托马斯·金博尔请求调查员调查这起偷书案,同时查明他的叔叔道格拉斯失踪的原因,并承诺提供报酬.
"
+
"
因此,托马斯·金博尔请求调查员调查这起偷书案,同时查明他的叔叔道格拉斯失踪的原因,并承诺提供报酬.
"
+
"
以下是我作为调查员的个人信息:
"
;
"
以下是我作为调查员的个人信息:
"
;
let
checking_prompt
=
"
请你扮演coc模组的keeper,现在回复我信息,再回复我调查阶段可以做的事.
"
+
let
checking_prompt
=
"
请你扮演coc模组的keeper,现在回复我信息,再回复我调查阶段可以做的事.
"
+
"
调查阶段可做的事:
"
;
"
调查阶段可做的事:
"
;
// 1.询问附近居民;2.查看墓地周边;3.在图书馆调查本地消息;4.询问警方;5.查阅本地报纸《阿诺兹堡广告报》的旧刊6.查看金博尔家周边.7.结束调查.";
// 1.询问附近居民;2.查看墓地周边;3.在图书馆调查本地消息;4.询问警方;5.查阅本地报纸《阿诺兹堡广告报》的旧刊6.查看金博尔家周边.7.结束调查.";
// "以下是我作为调查员的个人信息:";
// "以下是我作为调查员的个人信息:";
let
action_prompt
=
"
请你扮演coc模组的keeper,现在回复我行动阶段可以做的事(理论上调查员只能做一件事).
"
+
let
action_prompt
=
"
请你扮演coc模组的keeper,
调查阶段我知道了_____,
现在回复我行动阶段可以做的事(理论上调查员只能做一件事).
"
+
"
行动阶段可做的事:
"
;
"
行动阶段可做的事:
"
;
// 1.检查道格拉斯·金博尔最喜欢的墓碑;2调查墓地中的隧道;3.监视屋子或墓地.";
// 1.检查道格拉斯·金博尔最喜欢的墓碑;2调查墓地中的隧道;3.监视屋子或墓地.";
// "以下是我作为调查员的个人信息:";
// "以下是我作为调查员的个人信息:";
...
@@ -158,6 +158,7 @@ let results_info_2 = ["调查员成功杀死人影或让它失去行动能力"+
...
@@ -158,6 +158,7 @@ let results_info_2 = ["调查员成功杀死人影或让它失去行动能力"+
let
final
=
[
"
针对模组中的这个困局,玩家可能会提出全新的或是不同的解决方案。用水泥封闭坟墓并不会对食尸鬼群体有什么影响,它们本就要废弃这处墓地。
"
+
let
final
=
[
"
针对模组中的这个困局,玩家可能会提出全新的或是不同的解决方案。用水泥封闭坟墓并不会对食尸鬼群体有什么影响,它们本就要废弃这处墓地。
"
+
"
你告诉调查员,可以自行决定是将关于道格拉斯的真相告诉托马斯·金博尔,还是将其隐瞒下来,秘而不宣。报酬是10美元。(大约相当于如今的240美金)故事结束,如果想要重新开始,可以选择下方的按钮发起新对话。
"
]
"
你告诉调查员,可以自行决定是将关于道格拉斯的真相告诉托马斯·金博尔,还是将其隐瞒下来,秘而不宣。报酬是10美元。(大约相当于如今的240美金)故事结束,如果想要重新开始,可以选择下方的按钮发起新对话。
"
]
console
.
log
(
"
test
"
)
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -174,39 +175,41 @@ export default {
...
@@ -174,39 +175,41 @@ export default {
checking_list
:{
1
:
"
1.询问附近居民;
"
,
2
:
"
2.查看墓地周边;
"
,
3
:
"
3.在图书馆调查本地消息;
"
,
checking_list
:{
1
:
"
1.询问附近居民;
"
,
2
:
"
2.查看墓地周边;
"
,
3
:
"
3.在图书馆调查本地消息;
"
,
4
:
"
4.询问警方;
"
,
5
:
"
5.查阅本地报纸《阿诺兹堡广告报》的旧刊
"
,
6
:
"
6.查看金博尔家周边;
"
,
7
:
"
7.结束调查.
"
},
4
:
"
4.询问警方;
"
,
5
:
"
5.查阅本地报纸《阿诺兹堡广告报》的旧刊
"
,
6
:
"
6.查看金博尔家周边;
"
,
7
:
"
7.结束调查.
"
},
action_list
:{
1
:
"
1.检查道格拉斯·金博尔最喜欢的墓碑;
"
,
2
:
"
2调查墓地中的隧道;
"
,
3
:
"
3.监视屋子或墓地.
"
},
action_list
:{
1
:
"
1.检查道格拉斯·金博尔最喜欢的墓碑;
"
,
2
:
"
2调查墓地中的隧道;
"
,
3
:
"
3.监视屋子或墓地.
"
},
status_
lis
t
:
status_prompt
,
status_
promp
t
:
status_prompt
,
checking_info
:
checking_info
,
checking_info
:
checking_info
,
action_info
:{
1
:
action_info_1
,
2
:
action_info_2
},
action_info
:{
1
:
action_info_1
,
2
:
action_info_2
},
result_info
:{
1
:
results_info_1
,
2
:
results_info_2
},
result_info
:{
1
:
results_info_1
,
2
:
results_info_2
},
personal_info
:
""
,
personal_info
:
""
,
last_sender
:
""
,
last_sender
:
""
,
final
:
final
,
final
:
final
,
context
:
""
,
}
}
},
},
methods
:
{
methods
:
{
handleKeeper
(){
handleKeeper
(){
console
.
log
(
this
.
status_id
);
switch
(
this
.
status_id
)
{
switch
(
this
.
status_id
)
{
case
0
:
// start
case
0
:
// start
return
this
.
getStart
();
this
.
getStart
();
break
;
case
1
:
// checking
case
1
:
// checking
return
this
.
getCheckingPrompt
();
this
.
getCheckingPrompt
();
break
;
case
2
:
// action
case
2
:
// action
return
this
.
getActionPrompt
();
this
.
getActionPrompt
();
break
;
case
3
:
// result
case
3
:
// result
return
this
.
getResultPrompt
();
this
.
getResultPrompt
();
break
;
default
:
default
:
return
this
.
getEnd
();
this
.
getEnd
();
break
;
}
}
},
},
getStart
(){
getStart
(){
this
.
status_id
=
1
;
this
.
status_id
=
1
;
return
this
.
status_prompt
[
0
]
+
this
.
personal_info
;
this
.
context
=
this
.
status_prompt
[
0
]
+
this
.
personal_info
;
},
},
getCheckingPrompt
(){
getCheckingPrompt
(){
let
sender
=
this
.
last_sender
;
let
sender
=
this
.
last_sender
;
...
@@ -249,58 +252,68 @@ export default {
...
@@ -249,58 +252,68 @@ export default {
delete
this
.
checking_list
[
ele_idx
];
delete
this
.
checking_list
[
ele_idx
];
}
}
}
}
return
context
+
this
.
status_prompt
[
1
]
+
str
(
this
.
checking_list
)
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
if
(
JSON
.
stringify
(
obj
)
===
'
{}
'
){
this
.
status_id
=
2
;
}
let
val
=
this
.
personal_info
;
this
.
$Message
.
info
({
content
:
context
,
duration
:
3
,
background
:
true
});
this
.
context
=
context
+
this
.
status_prompt
[
1
]
+
str
(
this
.
checking_list
)
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
},
},
getActionPrompt
(){
getActionPrompt
(){
let
sender
=
this
.
last_sender
;
let
sender
=
this
.
last_sender
;
let
context
=
""
;
let
context
=
""
;
if
(
self
.
action_id
==
0
){
if
(
this
.
action_id
==
0
){
context
=
str
(
this
.
action_list
);
context
=
str
(
this
.
action_list
);
self
.
action_id
=
self
.
action_id
+
1
;
this
.
action_id
=
this
.
action_id
+
1
;
return
context
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
this
.
context
=
context
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
}
}
if
(
self
.
action_id
==
1
){
if
(
this
.
action_id
==
1
){
if
(
sender
.
search
(
"
监视
"
)
!=-
1
){
if
(
sender
.
search
(
"
监视
"
)
!=-
1
){
self
.
result_id
=
2
;
this
.
result_id
=
2
;
context
=
self
.
action_info
[
2
];
context
=
this
.
action_info
[
2
];
this
.
pre_action
=
2
;
this
.
pre_action
=
2
;
}
}
else
{
else
{
self
.
result_id
=
1
;
this
.
result_id
=
1
;
context
=
self
.
action_info
[
1
];
context
=
this
.
action_info
[
1
];
this
.
pre_action
=
1
;
this
.
pre_action
=
1
;
}
}
self
.
action_id
=
self
.
action_id
+
1
;
this
.
action_id
=
this
.
action_id
+
1
;
return
context
[
0
]
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
this
.
context
=
context
[
0
]
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
}
}
if
(
self
.
action_id
==
2
){
if
(
this
.
action_id
==
2
){
if
(
sender
.
search
(
"
交谈
"
)
!=-
1
||
sender
.
search
(
"
对话
"
)
!=-
1
||
sender
.
search
(
"
对话
"
)
!=-
1
||
sender
.
search
(
"
相见
"
)
!=-
1
){
if
(
sender
.
search
(
"
交谈
"
)
!=-
1
||
sender
.
search
(
"
对话
"
)
!=-
1
||
sender
.
search
(
"
对话
"
)
!=-
1
||
sender
.
search
(
"
相见
"
)
!=-
1
){
self
.
result_id
=
1
;
this
.
result_id
=
1
;
}
}
if
(
sender
.
search
(
"
战斗
"
)
!=-
1
||
sender
.
search
(
"
攻击
"
)
!=-
1
||
sender
.
search
(
"
格斗
"
)
!=-
1
||
sender
.
search
(
"
闪避
"
)
!=-
1
){
if
(
sender
.
search
(
"
战斗
"
)
!=-
1
||
sender
.
search
(
"
攻击
"
)
!=-
1
||
sender
.
search
(
"
格斗
"
)
!=-
1
||
sender
.
search
(
"
闪避
"
)
!=-
1
){
self
.
result_id
=
2
;
this
.
result_id
=
2
;
}
}
if
(
this
.
pre_action
==
1
){
if
(
this
.
pre_action
==
1
){
context
=
self
.
action_info
[
1
];
context
=
this
.
action_info
[
1
];
}
else
{
}
else
{
context
=
self
.
action_info
[
2
];
context
=
this
.
action_info
[
2
];
}
}
self
.
action_id
=
self
.
action_id
+
1
;
this
.
action_id
=
this
.
action_id
+
1
;
self
.
status_id
=
3
;
this
.
status_id
=
3
;
return
context
[
1
]
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
this
.
context
=
context
[
1
]
+
this
.
status_prompt
[
2
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
}
}
},
},
getResultPrompt
(){
getResultPrompt
(){
let
context
=
""
;
let
context
=
""
;
if
(
self
.
result_id
==
2
){
if
(
this
.
result_id
==
2
){
context
=
str
(
self
.
result_info
[
2
]);
context
=
str
(
this
.
result_info
[
2
]);
}
else
{
}
else
{
context
=
str
(
self
.
result_info
[
1
]);
context
=
str
(
this
.
result_info
[
1
]);
}
}
return
context
+
this
.
status_prompt
[
3
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
this
.
context
=
context
+
this
.
status_prompt
[
3
]
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
},
},
getEnd
(){
getEnd
(){
return
this
.
final
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
this
.
context
=
this
.
final
+
"
<br>调查员信息:
"
+
this
.
personal_info
;
},
},
handleInit
()
{
handleInit
()
{
this
.
$Message
.
error
({
this
.
$Message
.
error
({
...
@@ -310,12 +323,22 @@ export default {
...
@@ -310,12 +323,22 @@ export default {
});
});
},
},
handleSend
()
{
handleSend
()
{
if
(
this
.
personal_info
===
""
){
this
.
$Message
.
error
({
content
:
"
欢迎来到说书人,请先设置个人信息~
"
,
duration
:
3
,
background
:
true
});
return
0
;
}
if
(
this
.
loading
||
this
.
question
===
''
)
return
;
if
(
this
.
loading
||
this
.
question
===
''
)
return
;
this
.
loading
=
true
;
this
.
loading
=
true
;
const
question
=
this
.
question
;
const
question
=
this
.
question
;
this
.
question
=
''
;
this
.
last_sender
=
this
.
question
;
this
.
last_sender
=
this
.
question
;
this
.
question
=
''
;
this
.
dialogs
.
push
({
this
.
dialogs
.
push
({
id
:
this
.
dialogs
.
length
+
1
,
id
:
this
.
dialogs
.
length
+
1
,
...
@@ -331,6 +354,8 @@ export default {
...
@@ -331,6 +354,8 @@ export default {
text
:
'
书页翻动的声音...
'
text
:
'
书页翻动的声音...
'
});
});
this
.
question
=
''
;
const
dialog
=
this
.
dialogs
.
find
(
item
=>
item
.
id
===
aiDialogID
);
const
dialog
=
this
.
dialogs
.
find
(
item
=>
item
.
id
===
aiDialogID
);
/**
/**
...
@@ -339,7 +364,17 @@ export default {
...
@@ -339,7 +364,17 @@ export default {
* 发布到社区后,将消耗运行者的额度
* 发布到社区后,将消耗运行者的额度
* 注意:如果部署应用,任何人通过部署后的域名访问应用时,都将消耗部署者的额度
* 注意:如果部署应用,任何人通过部署后的域名访问应用时,都将消耗部署者的额度
*/
*/
prompt
=
this
.
handleKeeper
();
// this.$Message.error({
// content: this.context,
// duration: 3,
// background: true
// });
this
.
handleKeeper
()
let
prompt
=
this
.
context
;
console
.
log
(
"
error
"
,
prompt
);
const
body
=
{
const
body
=
{
messages
:
[
messages
:
[
{
{
...
@@ -388,7 +423,8 @@ export default {
...
@@ -388,7 +423,8 @@ export default {
this
.
dialogs
=
[
""
];
this
.
dialogs
=
[
""
];
this
.
showPersonalButton
=
true
;
this
.
showPersonalButton
=
true
;
this
.
context
=
""
;
this
.
personal_info
=
""
;
this
.
personal_info
=
""
;
this
.
status_id
=
0
;
this
.
status_id
=
0
;
this
.
action_id
=
0
;
this
.
action_id
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录