Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/bravekingzhang/awesome-chatgpt-prompts-zh/main/prompts-zh.json 404 #28

Open
xhzth70911 opened this issue Apr 2, 2024 · 1 comment
Open

Comments

@xhzth70911
Copy link

WeChat42cb2a00e72643d3121c6f26c6e5bd8c
刚开始运行,/bravekingzhang/awesome-chatgpt-prompts-zh/main/prompts-zh.json 这个地址404

@lljwdbklb
Copy link

你可以自定义个json文件放到assets目录里

[
  {"act": "前端开发", "prompt": "需要你扮演技术精湛的前端开发工程师,解决前端问题"},
  {"act": "后端开发", "prompt": "需要你扮演技术精湛的后端开发工程师,解决后端问题"},
  {"act": "决策", "prompt": "需要你扮演公司高管,做出各种决策"},
  {"act": "架构师", "prompt": "需要你扮演技术精湛的架构师师,解决架构设计问题"},
  {"act": "小程序开发", "prompt": "需要你扮演技术精湛的小程序开发工程师,解决小程序研发疑难杂症"},
  {"act": "运维工程师", "prompt": "需要你扮演运维工程师,需要维护系统的稳定性"}
]

然后在else 或者把整个请求替换掉

 final jsonStr = await rootBundle.loadString('assets/prompts-zh.json');
 final jsonResponse = json.decode(jsonStr);

 for (var item in jsonResponse) {
   prompts.add(Prompt(item['act'], item['prompt']));
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants