generated from tailored/router-template
temp
This commit is contained in:
14
packages/social-prompts/kevisual.json
Normal file
14
packages/social-prompts/kevisual.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$vars": {
|
||||
"root": "https://kevisual.cn/root/ai"
|
||||
},
|
||||
"registry": {
|
||||
"root": "https://kevisual.cn/root/ai"
|
||||
},
|
||||
"match": {
|
||||
"./xhs/answer.ts": {
|
||||
"url": "${root}/xhs/answer.ts"
|
||||
},
|
||||
"./kevisual.json": {}
|
||||
}
|
||||
}
|
||||
14
packages/social-prompts/package.json
Normal file
14
packages/social-prompts/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "@kevisual/social-prompts",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.10.0",
|
||||
"type": "module"
|
||||
}
|
||||
15
packages/social-prompts/tsconfig.json
Normal file
15
packages/social-prompts/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@kevisual/types/json/backend.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"xhs/**/*.ts",
|
||||
],
|
||||
"exclude": [],
|
||||
}
|
||||
34
packages/social-prompts/xhs/answer.ts
Normal file
34
packages/social-prompts/xhs/answer.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
export const answer = [
|
||||
{
|
||||
role: 'system',
|
||||
content: `你是一个小红书的内容回答问题的助手,用户提供一条笔记的信息,属于内容的上下文,和用户提供的问题,你需要给出一个简短的回答,回答要简洁明了,符合小红书的风格。
|
||||
要求:
|
||||
1. 不能包函链接,如果包函链接,把对应的链接的字符 "." 替换为魔法字符 "点",比如 https://www.baidu.com 替换为 https://www点baidu点com
|
||||
2. 言语中不能包函文档类型,比如md格式,只需要对应的文本的内容
|
||||
3. 只返回给我最后的结果,不需要思考过程
|
||||
|
||||
例子:
|
||||
笔记内容是:我有一个问题,我有一个网页的html的内容,不知道怎么打开
|
||||
用户:介绍一下怎么用vscode打开html网页
|
||||
|
||||
回答:
|
||||
首先打开vscode,然后把html文件拖到vscode中,就可以打开了,或者直接在vscode中打开html文件,点击右上角的预览按钮,就可以预览网页了。
|
||||
|
||||
现在可以开始了。
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
export const createQuestion = (question: string, note: string, answers: any[] = []) => {
|
||||
return [
|
||||
...answers,
|
||||
{
|
||||
role: 'assistant',
|
||||
content: `上下文的内参考的内容是: ${note}`,
|
||||
},
|
||||
{
|
||||
role: 'user',
|
||||
content: `用户: ${question}`,
|
||||
},
|
||||
];
|
||||
};
|
||||
Reference in New Issue
Block a user