Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

[Improvements] recommend.json 里的URL来自两个作者的仓库(自定义在线模板) #516

Closed
simonwu53 opened this issue Mar 11, 2023 · 6 comments
Labels
status: terrible 听起来好像有点糟糕

Comments

@simonwu53
Copy link
Contributor

simonwu53 commented Mar 11, 2023

目前的在线模板来自src/assets/recommend.json文件

{
  "key": "awesome-chatgpt-prompts-zh",
  "desc": "ChatGPT 中文调教指南",
  "downloadUrl": "https://raw.githubusercontent.com/Nothing1024/chatgpt-prompt-collection/main/awesome-chatgpt-prompts-zh.json",
  "url": "https://github.com/PlexPt/awesome-chatgpt-prompts-zh"
}

其中downloadUrl用的是“Nothing1024”的配置,而url给的项目地址是“PlexPt”的仓库。本来没什么,但是在我想参考他们的模板来做自己的在线prompts的时候,发现他们两个仓库用的模板是不一样的!

本项目代码用的是“Nothing1024”的配置模板,每个prompt字典里的key是keyvalue两个。而“PlexPt”的模板用的key是actprompt(如果取他的模板的raw地址导入会报错并导致prompt商店无法打开直到清空cookie重置所有记录)。

以下是正确的prompt模板(务必用“key”和“value”):

[
  {
    "key": "prompt提示词",
    "value": "prompt内容"
  }
]

最后,如果导入其他人做的在线模板,也最好看一下他们的模板是不是用“key”和“value”作为prompt字典key的,否则就要重制网页cookie了😅

@simonwu53 simonwu53 changed the title recommend.json 里的URL来自两个作者的仓库(自定义在线模板) [Improvements] recommend.json 里的URL来自两个作者的仓库(自定义在线模板) Mar 11, 2023
@Nothing1024
Copy link
Contributor

你好,我是prompt部分的PR提交者,我简单解释一下吧。

  1. 两个仓库不一样的内容是因为我在进行prompt部分调试时,原项目还没有上传JSON文件(可以参考他们的update日期),只有md文档,所有的文档内容其实是我通过官方的readme手动收集爬取处理的。而且目前该文件主要是为了部署者进行自定义设置演示,感兴趣可以自己进行修改。
  2. prompt导入这个问题确实是我的问题,我在提交pr时没有成功提交keyvalue的检测处理(逻辑应是 如果检测JSON格式错误或者是没有对应键值会报错, 目前后者没有检测),今天下午我会尝试添加相关部分
  3. 具体的导入模板可参考我当时提交的PR
    feat: 添加Prompt模板和Prompt商店支持 #268

@Chanzhaoyu Chanzhaoyu added the status: terrible 听起来好像有点糟糕 label Mar 12, 2023
@xiaosaaaa
Copy link

速度够快的

Chanzhaoyu pushed a commit that referenced this issue Mar 12, 2023
* fix(PromptStore): import prompt template using different dict keys

* chore(PromptStore): clear url field after downloading
@i-iooi-i
Copy link

比较好奇模板可以固定一种职业性格一直使用吗?直到手动切换为另外一种性格。
还是说有时限性?超过一段时间就会变为默认。

@Chanzhaoyu
Copy link
Owner

比较好奇模板可以固定一种职业性格一直使用吗?直到手动切换为另外一种性格。
还是说有时限性?超过一段时间就会变为默认。

没有做这个,不过你可以手动设定

@i-iooi-i
Copy link

比较好奇模板可以固定一种职业性格一直使用吗?直到手动切换为另外一种性格。
还是说有时限性?超过一段时间就会变为默认。

没有做这个,不过你可以手动设定

感谢大佬,我在超时变量里设定个时间看看。

lizhengxiang87 added a commit to lizhengxiang87/chatgpt-web that referenced this issue Mar 25, 2023
* chore: change docs

* feat: 添加 Prompt 模板和 Prompt 商店支持 (Chanzhaoyu#268)

* feat: 添加Prompt模板和Prompt商店支持

* feat: well done

---------

Co-authored-by: Redon <790348264@qq.com>

* feat: 设置添加关闭按钮

* chore: format

* chore: 2.10.4

* chore: cover

* fix: 更新JSON导入检查 (Chanzhaoyu#523)

* feat: Improve zh-TW locale (Chanzhaoyu#511)

* fix: cors in auth_secret_key model (Chanzhaoyu#499)

* fix: 修改最大行数与官方保持一致 (Chanzhaoyu#502)

* chore: rename environment variables files

* docs: update README.md about .env file

* feat: support long reply

* chore: upgrade chatgpt package and set long reply to false default

* chore: set long reply to false default

* fix: change maxRows to 8

* feat: mobile max row

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* feat: support linux command line proxy standard (Chanzhaoyu#308)

* feat: support linux command line proxy standard with env HTTPS_PROXY and ALL_PROXY

* chore: update docs for linux command linux proxy standard

* fix: Prompt商店在线导入可以导入两种recommend.json里提到的模板 (Chanzhaoyu#516) (Chanzhaoyu#521)

* fix(PromptStore): import prompt template using different dict keys

* chore(PromptStore): clear url field after downloading

* feat: 仓库添加翻译

* feat: 仓库查询筛选

* feat: 调整界面

* chore: update deps

* feat: improve zh-TW locale, translate new strings (Chanzhaoyu#542)

* feat: 语言设定改为下拉框选择

* feat: 修改 Prompt Store 移动端样式

* chore: docs change

* feat: 权限输入框改为密码类型

* fix: 清空上下文时不应该重置会话标题

* chore: docs change

* chore: optimize dockerfile to speed up building and reduce docker image size (Chanzhaoyu#520)

* chore: v2.10.5

* fix: 修复导入、导出错误

* fix: inverted parameter for before each function (Chanzhaoyu#585)

* fix: 🐛 fix scroll bar style (Chanzhaoyu#617)

* fix: typo (Chanzhaoyu#636)

* perf: 优化移动端 prompt 商店样式 (Chanzhaoyu#608)

* feat: 修改移动端 prompt 商店样式

* add: 修改移动端 prompt 商店样式

* perf: 清理代码

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* chore: extract proxy setup code into reusable function (Chanzhaoyu#583)

* perf: 记录上下文设定保存到本地

* perf: 优化部份判断

* docs: 移除 docker-compose.yml 省略

* feat: show api balance (Chanzhaoyu#582)

* feat: show api balance

* Update index.ts

* 保留小数点后五位

* perf: 判断优化

---------

Co-authored-by: Redon <790348264@qq.com>

* chore: update deps and lint fix

* feat: session 返回接口方式做显示判断

* fix: highlight.js 控制台兼容性警告

* chore: v2.10.6

* fix: 回退 chatgpt 版本导致的代理失效

* fix: 添加 usingContext 缺省

* chore: v2.10.7

* feat: 查询余额使用 API_BASE_URL 参数

* feat: 渲染的链接新窗口打开

* perf: config 接口添加权限验证

* fix: 手动重置异常的 loading

* feat: 添加用于显示回复消息原文的选项 (Chanzhaoyu#672)

* feat: 添加显示用于原文的选项

* chore: 修复暗色主题下文本颜色问题

给输入和输出气泡添加了 css 类,用来处理在暗色主题下聊天气泡的文本颜色

* feat: 用户输入不应该被渲染,防止 xss

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* feat: 新增限流功能 (Chanzhaoyu#718)

* 请求速率限制

* perf: 优化代码

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* feat: 添加角色设定预留API 设定页(Chanzhaoyu#768)

* add systemMessage

* perf: 优化代码和类型

* perf: 补全翻译和为以后做准备

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* perf: 重置回答时滚动定位至该回答 (Chanzhaoyu#781)

* chore: 重置回答时滚动定位至该回答

* perf: format code

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* perf: scrollToBottom 改成 scrollToBottomIfAtBottom (Chanzhaoyu#771)

* feat: 更新依赖并兼容已存在的代理

* feat: 当用gpt-4的API 时增加可用的 Max Tokens (Chanzhaoyu#729)

* fix: 用GPT-4 API时增加max token

* style: eslint fix

---------

Co-authored-by: Redon <790348264@qq.com>

* feat: Create start.cmd (Chanzhaoyu#656)

在windows下也可以运行

* chore(vsc-debug): 增加 visual-studio-code 的 debug 启动文件 (Chanzhaoyu#296)

* fix line end with new-line in some backend (Chanzhaoyu#474)

* fix line end with new-line in some backend

In backend with golang (like https://github.com/sashabaranov/go-openai), the responseText always has '\n'.

* feat: 补全遗漏

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置 (Chanzhaoyu#632)

* feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置(Chanzhaoyu#618)

* perf: 修改判断

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>

* chore: 显示原文时使用 .whitespace-pre-wrap (Chanzhaoyu#779)

显示 ChatGPT 输出的原文时保留空格和换行

* feat:  PWA 默认不开启

* feat:  切换 history 时自动聚焦输入框 (Chanzhaoyu#735)

* feat: 修改 scrollToBottom 行为(当滚动条在底部或发送问题时才会进入自动滚动,滚轮向上滚动会中止自动滚动,方便复制和查看之前的代码; 切换 history 时自动聚焦输入框,方便直接输入文字,不用再次去点击输入框;)

* chore: 通过eslint检查

* perf: 清理重复功能

---------

Co-authored-by: Redon <790348264@qq.com>

* perf: 网络连接时 500 自动跳转到主页

* docs: fix docker port to private (Chanzhaoyu#802)

* feat: add zh-TW prompts in the Promt Store (Chanzhaoyu#796)

* fix: prompt store 样式问题

* chore: v2.10.8

* fix: 重置时应该移除本地储存

* fix: PWA 未添加的问题 (Chanzhaoyu#807)

Co-authored-by: bingo235 <>

* fix: 移动端新建会话关闭侧边栏 (Chanzhaoyu#813)

* perf: 移动端删除 chat 时,侧边栏应该收起

* fix: ESM error (Chanzhaoyu#826)

* perf: 自动焦点时移动端上的不便

* fix: 移动端焦点不触发的问题

* perf: 本地地址

* fix: 反向代理限流失效 (Chanzhaoyu#863)

https://docs.colyseus.io/zh_hk/colyseus/how-to/rate-limit/

使用nginx限流会只识别为服务器ip,需启用trust proxy

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>
Co-authored-by: Nothing1024 <78358913+Nothing1024@users.noreply.github.com>
Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org>
Co-authored-by: Yige <a@wyr.me>
Co-authored-by: Eason <tobewhatwewant@gmail.com>
Co-authored-by: 吴杉(Shan Wu) <Shan.Wu.1995@gmail.com>
Co-authored-by: Wisdom <pdsu.wwz@foxmail.com>
Co-authored-by: Hayden Chen <hayden.chen.b612@gmail.com>
Co-authored-by: 碎花爱洋裙 <44236581+lizhongyuan3@users.noreply.github.com>
Co-authored-by: CornerSkyless <573196853@qq.com>
Co-authored-by: Kirk Lin <linkirk@163.com>
Co-authored-by: pzcn <sdustpedro@gmail.com>
Co-authored-by: Yi <32430186+yilozt@users.noreply.github.com>
Co-authored-by: xiaozhu <501801307@qq.com>
Co-authored-by: quzard <1191890118@qq.com>
Co-authored-by: 舜岳 <1277952981@qq.com>
Co-authored-by: 吴杉(Shan Wu) <Shan.Wu@ut.ee>
Co-authored-by: vulgate <vulgate@qq.com>
Co-authored-by: KeepRunning <ChandlerVer5@gmail.com>
Co-authored-by: Liut <Eagle.L@gmail.com>
Co-authored-by: hncboy <619452863@qq.com>
Co-authored-by: Allen <987425154@qq.com>
Co-authored-by: 东子 <16423601+kilvn@users.noreply.github.com>
Co-authored-by: Bing <bingo235@users.noreply.github.com>
Co-authored-by: Kid <44045911+kidonng@users.noreply.github.com>
Co-authored-by: gitgitgogogo <gitgitgogogo@users.noreply.github.com>
jingChen55 pushed a commit to jingChen55/chatgpt-web that referenced this issue Mar 27, 2023
…oyu#521)

* fix(PromptStore): import prompt template using different dict keys

* chore(PromptStore): clear url field after downloading
jingChen55 pushed a commit to jingChen55/chatgpt-web that referenced this issue Mar 27, 2023
…oyu#521)

* fix(PromptStore): import prompt template using different dict keys

* chore(PromptStore): clear url field after downloading
suikodev referenced this issue in AstraSurge/gpteams Mar 27, 2023
* fix(PromptStore): import prompt template using different dict keys

* chore(PromptStore): clear url field after downloading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: terrible 听起来好像有点糟糕
Projects
None yet
Development

No branches or pull requests

6 participants
@i-iooi-i @Chanzhaoyu @simonwu53 @Nothing1024 @xiaosaaaa and others