昨天分享了 ChatGPT plugins调研报告,最后提到目前 ChatGPT plugins 官方已经不再推荐了,后续会逐渐被 GPTs Actions 代替。今天就来补一个 GPTs Actions 的调研,注意,GPTs Actions 的很多概念是从 ChatGPT plugins 演化来的,所以 ChatGPT plugins调研报告 这篇文最好还是要读一下。
一、如何创建一个GPTs
(一)创建一个简单的GPTs
创建 GPTs 完全是一个不用写代码的过程,通过官方界面创建即可。有两种创建方式:1. 通过聊天的方式创建(适合小白使用)2. 通过配置创建(比较精准)。GPTs 与 GPT plugins 一样,目前(2023/12/7)需要 ChatGPT Plus 才能使用。
(二)GPTs的高级玩法 Actions
跟上面 GPT plugins 玩法一样,也是向 GPT 注册一些接口,把每个接口的功能描述、输入输出定义好,GPT在适当的时机会调用这些接口。
描述接口的yaml文件与插件中的基本一致:
openapi: 3.0.1
info:
title: TODO Plugin
description: A plugin that allows the user to create and manage a TODO list using ChatGPT. If you do not know the user's username, ask them first before making queries to the plugin. Otherwise, use the username "global".
version: "v1"
servers:
- url: https://example.com
paths:
/todos/{username}:
get:
operationId: getTodos
summary: Get the list of todos
parameters:
- in: path
name: username
schema:
type: string
required: true
description: The name of the user.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/getTodosResponse"
components:
schemas:
getTodosResponse:
type: object
properties:
todos:
type: array
items:
type: string
description: The list of todos.
导入ymal文件后 GPT 就识别到里面的接口了,如下图:
(三)GPTs Actions vs GPT plugins
- GPTs 更加轻量级,所有接口都单独是一个实体,自己有鉴权。
- GPTs 各接口相互间可以没有关系,GPT为了完成一个任务,可能会根据需要顺序调多个接口。
- GPTs 更符合当下“函数即服务”的思想。
- 虽然 GPT plugins 对接起来已经很简单了,GPTs Actions 相比之下更简单。
- 官方宣称 GPT plugins 后续会逐渐被 GPTs Actions 取代。
二、发布
创建好的 GPTs 可以公开或私人使用。