直接官网范例跑出来就这样 加了很多注释 本身是需要plugin调用现存API的, 但是这个简单就是临时存储数据在拿出 没有用API 直接plugin内部保存
.well-known/ai-plugin.json
"schema_version": "v1",
"name_for_human": "puyue TODO",//不能太长
"name_for_model": "puyuetodo",
"description_for_human": "puyue TODO list.",//不能太长
"description_for_model": "puyue Plugin TODO list",//不能太长
"auth": {
"type": "none" // 没有验证 https://techdiylife.github.io/ChatGPT-programming-handbook/contents/chat-plugins-overview.html#27-%E6%8F%92%E4%BB%B6%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81
},
"api": {
"type": "openapi",
"url": "https://puyue-todo-list-plugin-armkas.replit.app/openapi.yaml"//这里是花括号中最后一个不能带逗号
},
"logo_url": "https://puyue-todo-list-plugin-armkas.replit.app/logo.png",//可以是任何网络图片连接
"contact_email": "[email protected]",//无视
"legal_info_url": "http://example.com/legal"//无视
}
openapi.yaml文件中url别忘了设定
(我这里用的是在线编译器replit这样就能直接deploy(部署)到服务器)
openapi.yaml 是让chatgpt读的详细式样书 输入什么 输出什么 格式属什么 等等
#replit
收费 一个仓库单独最低0.2美元一天,但是太差0.4的才能用
仓库必须是自己名下的,或者自己github仓库导入过来的,别人的仓库invite你进去能修改但是不能deploy
deploy和run是独立的 run是localhost
deploy时候有一个可选设置是build 要加 pip install -r requirements.txt
导入包
Get a todo list ChatGPT plugin up and running in under 5 minutes using Python. If you do not already have plugin developer access, please join the waitlist.
To install the required packages for this plugin, run the following command:
pip install -r requirements.txt
To run the plugin, enter the following command:
python main.py
Once the local server is running:
- Navigate to https://chat.openai.com.
- In the Model drop down, select "Plugins" (note, if you don't see it there, you don't have access yet).
- Select "Plugin store"
- Select "Develop your own plugin"
- Enter in
since this is the URL the server is running on locally, then select "Find manifest file".(大坑!!!! 因该输入的是http://localhost:5003要和openapi.yaml文件中的url保持一致)localhost:5003
The plugin should now be installed and enabled! You can start with a question like "What is on my todo list" and then try adding something to it as well!
If you run into issues or have questions building a plugin, please join our Developer community forum.