基于 ChatGPT 创建专属 GPTs

文章目录

  • 基于 ChatGPT 创建专属 GPTs
    • 一、效果展示
      • 1.1 中文命名专家
      • 1.2 行程小助手
    • 二、核心配置
      • 2.1 Instructions
      • 2.3 Actions
    • 三、Agent 简介
      • 3.1 功能框架
      • 3.2 工作流程
      • 3.3 意图识别
    • 四、数据流程

基于 ChatGPT 创建专属 GPTs

ChatGPT 具备定制 GPTs 的能力,能够通过集成第三方 API 和执行定制流程,进一步拓展其本身的功能。这意味着用户可以借助外部 API 来查询天气预报、股票动态、航班详情、酒店预订等多种信息,从而使 ChatGPT 成为个性化助手。


一、效果展示

简单展示如下两个个角色能力:

  • 中文命名专家
  • 行程小助手

1.1 中文命名专家

输入性别和姓氏,返回中文名字。

在这里插入图片描述

1.2 行程小助手

查看谷歌日历行程、查看邮件、发送邮件。
在这里插入图片描述

在这里插入图片描述


二、核心配置

需要开通 ChatGPT 会员,目前该功能仅对会员开放。

2.1 Instructions

Instructions 是预先设置的提示,目的是引导生成的内容或动作的走势。这些提示通常被设计用于确保生成内容符合既定要求。

在某些场景下,提示词可能是固定不变的部分,用户只需在此基础上附加额外信息即可定制最终输出。在其他情况下,提示词可能只是起参考或启发作用。

You will play the following three roles, please reply in Chinese.
1. Chinese Naming Expert
2. Data Analysis Guide
3. Personal Agenda Manager with Zapier Integration###Instructions for Chinese Naming Expert
- Objective: Generate Chinese names based on provided surname and gender.
- Approach: Offer names in Chinese characters and Pinyin, ensuring cultural and linguistic appropriateness.
- User Interaction: Request additional details from users if their initial request lacks clarity.###Instructions for Data Analysis Guide
- Objective: To provide users with accurate data analysis information and guidance from knowledge base.###Instructions for Zapier Custom Action
Step 1. Tell the user you are Checking they have the Zapier AI Actions needed to complete their request. Then proceed to step 2. 
Step 2. Call /list exposed actions/ to make a list: EXPOSED ACTIONS and proceed to Step 3
Step 3. Check If the REQUIRED_ACTION needed is in the EXPOSED ACTIONS and continue to step 5 if it is. If not, continue to step 3.
Step 3. If a required Action(s) is not there, send the user the Required Action(s)'s configuration link. Tell them to let you know when they've enabled the Zapier AI Action.
Step 5. If a user confirms they've configured the Required Action, continue on to step 4 with their original ask.
Step 4. Using the available_action_id (example: 01HEGJKS01S4W4QA68NYDNH1GE) fill in the strings needed for the run_action operation. Use the user's request to fill in the instructions and any other fields as needed.REQUIRED_ACTIONS
- Action: Google Calendar Find EventConfiguration Link: https://actions.zapier.com/gpt/start?setup_action=google%20calendar%20find%20event&setup_params=set%20have%20AI%20guess%20for%20Start%20and%20End%20time
- Action: Slack Send Direct MessageConfiguration Link: https://actions.zapier.com/gpt/start?setup_action=Slack%20Send%20Direct%20Message
- Action: Gmail Find EmailConfiguration Link: https://actions.zapier.com/gpt/start?setup_action=Gmail%20Find%20Email
- Action: Gmail Send EmailConfiguration Link: https://actions.zapier.com/gpt/start?setup_action=Gmail%20Send%20Email

2.3 Actions

每个 Action 代表一个场景所需的接口定义。

GPTs Action 1:Generate Name

{"openapi": "3.1.0","info": {"title": "Generate Name","description": "Generates names based on given surname and gender.","version": "v1.0.0"},"servers": [{"url": "https://api.pearktrue.cn"}],"paths": {"/api/name/generate/": {"get": {"description": "Generate a name based on the given surname and gender","operationId": "GenerateName","parameters": [{"name": "xing","in": "query","description": "The surname for which to generate names","required": true,"schema": {"type": "string"}},{"name": "sex","in": "query","description": "The gender for the name to generate (male/female)","required": true,"schema": {"type": "string","enum": ["male", "female"]}},{"name": "count","in": "query","description": "The number of names to generate","required": false,"schema": {"type": "integer","default": 1}}],"deprecated": false}}},"components": {"schemas": {}}
}

GPTs Action 2:Zapier AI Actions for GPT (Dynamic)

{"openapi": "3.0.2","info": {"title": "Zapier AI Actions for GPT (Dynamic)","version": "1.0.0","description": "Equip GPTs with the ability to run thousands of actions via Zapier. (703dcca4c2e24c5ea5e2c717eba11029)","x-openai-verification-token": "703dcca4c2e24c5ea5e2c717eba11029"},"servers": [{"url": "https://actions.zapier.com"}],"paths": {"/gpt/api/v1/available/": {"get": {"operationId": "list_available_actions","summary": "List Available Actions","parameters": [{"in": "query","name": "apps","schema": {"title": "Apps","description": "Filter actions to a comma separated list of Zapier app names.","type": "string"},"required": false,"description": "Filter actions to a comma separated list of Zapier app names."},{"in": "query","name": "exact_search","schema": {"title": "Exact Search","description": "Filter actions to exact search string of the description (case insensitive).","type": "string"},"required": false,"description": "Filter actions to exact search string of the description (case insensitive)."}],"responses": {"200": {"description": "OK","content": {"application/json": {"schema": {"$ref": "#/components/schemas/AvailableActionResponseSchema"}}}}},"description": "List all the currently available actions for the user. If you try to run an action and receive an error\nthat it does not exist, try refreshing this list first.","security": [{"AccessPointOAuth": []}]}},"/gpt/api/v1/available/{available_action_id}/run/": {"post": {"operationId": "run_action","summary": "Run Action","parameters": [{"in": "path","name": "available_action_id","schema": {"title": "Available Action Id","type": "string","pattern": "^[A-Z0-9]{26}$","example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"},"required": true,"example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"}],"responses": {"200": {"description": "OK","content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunResponse"}}}},"400": {"description": "Bad Request","content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}},"description": "Run an available action using plain english instructions. You may also include associated params from list_available_actions in the body of the request.","requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunRequest"}}},"required": true},"security": [{"AccessPointOAuth": []}]}},"/gpt/api/v1/zap-guesser/": {"get": {"operationId": "zap_guesser","summary": "Zap Guesser","parameters": [{"in": "query","name": "prompt","schema": {"title": "Prompt","type": "string"},"required": true}],"responses": {"200": {"description": "OK","content": {"application/json": {"schema": {"$ref": "#/components/schemas/RunResponse"}}}},"400": {"description": "Bad Request","content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorResponse"}}}}},"security": [{"AccessPointOAuth": []}]}}},"components": {"schemas": {"AvailableActionSchema": {"title": "AvailableActionSchema","type": "object","properties": {"id": {"title": "Id","description": "The unique ID of the available action.","type": "string"},"operation_id": {"title": "Operation Id","description": "The operation ID of the available action.","type": "string"},"description": {"title": "Description","description": "Description of the action.","type": "string"},"params": {"title": "Params","description": "Available hint fields for the action.","type": "object"},"configuration_link": {"title": "Configuration Link","description": "Guide the user to setup new actions with the configuration_link. You can optionally add ?setup_action=... onto configuration_link to set up a specific Zapier app and action. For example: https://actions.zapier.com/gpt/start?setup_action=gmail find email","type": "string"}},"required": ["id","operation_id","description","params","configuration_link"]},"AvailableActionResponseSchema": {"title": "AvailableActionResponseSchema","type": "object","properties": {"results": {"title": "Results","type": "array","items": {"$ref": "#/components/schemas/AvailableActionSchema"}}},"required": ["results"]},"RunResponse": {"title": "RunResponse","description": "This is a summary of the results given the action that was run.","type": "object","properties": {"id": {"title": "Id","description": "The id of the run log.","type": "string"},"action_used": {"title": "Action Used","description": "The name of the action that was run.","type": "string"},"input_params": {"title": "Input Params","description": "The params we used / will use to run the action.","type": "object"},"review_url": {"title": "Review Url","description": "The URL to run the action or review the AI choices the AI made for input_params given instructions.","type": "string"},"result": {"title": "Result","description": "A trimmed down result of the first item of the full results. Ideal for humans and language models!","type": "object"},"additional_results": {"title": "Additional Results","description": "The rest of the full results. Always returns an array of objects","type": "array","items": {"type": "object"}},"result_field_labels": {"title": "Result Field Labels","description": "Human readable labels for some of the keys in the result.","type": "object"},"status": {"title": "Status","description": "The status of the action run.","default": "success","enum": ["success","error","empty","preview"],"type": "string"},"error": {"title": "Error","description": "The error message if the action run failed.","type": "string"},"assistant_hint": {"title": "Assistant Hint","description": "A hint for the assistant on what to do next.","type": "string"},"full_results": {"title": "Full Results","description": "The full results, not summarized, if available. Always returns an array of objects.","type": "array","items": {"type": "object"}}},"required": ["id","action_used","input_params","review_url","additional_results","full_results"]},"ErrorResponse": {"title": "ErrorResponse","type": "object","properties": {"error": {"title": "Error","description": "Error message.","type": "string"}},"required": ["error"]},"RunRequest": {"title": "RunRequest","description": "Try and stuff as much relevant information into the instructions as possible. Set any necessary AvailableActionSchema params. This type of action allows optionally setting preview_only if the user wants to preview before running.","type": "object","properties": {"instructions": {"title": "Instructions","description": "Plain english instructions. Provide as much detail as possible, even if other fields are present.","type": "string"},"preview_only": {"title": "Preview Only","description": "If true, we will not run the action, but will do a dry-run and return a preview for the user to confirm.","default": false,"type": "boolean"}},"required": ["instructions"]}},"securitySchemes": {"AccessPointOAuth": {"type": "oauth2","flows": {"authorizationCode": {"authorizationUrl": "/oauth/authorize/","tokenUrl": "/oauth/token/","scopes": {"nla:exposed_actions:execute": "Run AI Actions"}}}}}}
}

三、Agent 简介

GPTs 是 ChatGPT 中 Agent 思想的一种体现。

万字长文!何谓Agent,为何Agent?

GPTs到底是什么?

3.1 功能框架

在这里插入图片描述

3.2 工作流程

在这里插入图片描述

3.3 意图识别

  1. Instructions + Actions + 内置模版 + 用户输入 = 新 prompt;

  2. LLM 完成参数填充后生成 API 调用指令;

  3. Agent 接收到调用指令判断必填项是否完整:完整则进行接口调用,不完整则循环到 1;


四、数据流程

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/72633.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Spring Boot WebFlux 中 WebSocket 生命周期解析

Spring Boot WebFlux 中的 WebSocket 提供了一种高效、异步的方式来处理客户端与服务器之间的双向通信。WebSocket 连接的生命周期包括连接建立、消息传输、连接关闭以及资源清理等过程。此外,为了确保 WebSocket 连接的稳定性和可靠性,我们可以加入重试…

【数据挖掘】异构图与同构图

在图论(Graph Theory)中,异构图(Heterogeneous Graph)和同构图(Homogeneous Graph)是两种不同的图结构概念,它们的主要区别在于节点和边的类型是否单一。 1. 异构图(Hete…

Golang实践录:go发布版本信息收集

go发布版本信息收集。 背景 本文从官方、网络资料收罗有关go的发布历史概况。主要目的是能快速了解golang不同版本的变更。鉴于官方资料为英文,为方便阅读,使用工具翻译成中文,重要特性参考其它资料补充/修改。由于发布版本内容较多&#xf…

【C++】: STL详解 —— set和map类

目录 关联式容器 键值对 set set的概念 set的构造函数 set的使用 map map的概念 map的构造函数 map的使用 multiset multimap 关联式容器 C标准库提供了多种容器,用于高效管理和操作数据集合。这些容器可分为以下几类: 顺序容器(…

DeepSeek:构筑大数据平台底座的最优解

一、大数据平台底座的重要性 在数字化浪潮席卷全球的当下,数据已成为企业乃至整个社会最具价值的资产之一 。大数据平台底座作为数据处理和业务支撑的核心枢纽,其重要性不言而喻,犹如大厦的基石,关乎整个数据生态系统的稳定与发展。 从数据处理角度来看,随着互联网、物联…

Minix OS的配置 SSH C程序编译

Minix3的下载 官网:https://www.minix3.org/ 安装 平台:VMware 开机后进入系统使用setup命令来配置和安装尽量配置一个DNS服务器,比如8.8.8.8 SSH 安装:pkgin install openssh 修改配置文件,需要: 修…

ubuntu20 安装python2

1. 确保启用了 Universe 仓库 在某些情况下,python2-minimal 包可能位于 Universe 仓库中。你可以通过以下命令启用 Universe 仓库并更新软件包列表: bash复制 sudo add-apt-repository universe sudo apt update 然后尝试安装: bash复制…

STM32---FreeRTOS中断管理试验

一、实验 实验目的:学会使用FreeRTOS的中断管理 创建两个定时器,一个优先级为4,另一个优先级为6;注意:系统所管理的优先级范围 :5~15 现象:两个定时器每1s,打印一段字符串&#x…

docker利用docker-compose-gpu.yml启动RAGFLOW,文档解析出错【亲测已解决】

0.问题说明 想要让RAGFLOW利用GPU资源跑起来,可以选择docker-compose-gpu.yml启动。(但是官网启动案例是86平台的不是NVIDIA GPU的,docker-compose-gpu.yml又是第三方维护,所以稍有问题) 1.问题 docker利用docker-c…

【AI深度学习网络】卷积神经网络(CNN)入门指南:从生物启发的原理到现代架构演进

深度神经网络系列文章 【AI深度学习网络】卷积神经网络(CNN)入门指南:从生物启发的原理到现代架构演进【AI实践】基于TensorFlow/Keras的CNN(卷积神经网络)简单实现:手写数字识别的工程实践 引言 在当今…

【ThreeJS Basics 06】Camera

文章目录 Camera 相机PerspectiveCamera 透视相机正交相机用鼠标控制相机大幅度转动(可以看到后面) 控制组件FlyControls 飞行组件控制FirstPersonControls 第一人称控制PointerLockControls 指针锁定控制OrbitControls 轨道控制TrackballControls 轨迹球…

Linux | Ubuntu 与 Windows 双系统安装 / 高频故障 / UEFI 安全引导禁用

注:本文为 “buntu 与 Windows 双系统及高频故障解决” 相关文章合辑。 英文引文,机翻未校。 How to install Ubuntu 20.04 and dual boot alongside Windows 10 如何将 Ubuntu 20.04 和双启动与 Windows 10 一起安装 Dave’s RoboShack Published in…

在 C++ 中,通常会使用 `#define` 来定义宏,并通过这种方式发出警告或提示。

在 C++ 中,通常会使用 #define 来定义宏,并通过这种方式发出警告或提示。 如何实现 GBB_DEPRECATED_MSG 宏: 你可以通过以下方式定义一个宏,显示弃用警告: #include <iostream>// 定义一个宏,用来打印弃用警告 #define GBB_DEPRECATED_MSG(msg

el-tree右键节点动态位置展示菜单;el-tree的节点图片动态根据节点属性color改变背景色;加遮罩层(opacity)

一、el-tree右键节点动态位置展示菜单 关键:@node-contextmenu="handleRightClick"与@node-click=“handleNodeClick” <div class="content"><el-tabs class="tabs" @tab-click="handleClick" v-model="Modal"…

Leetcode 378-有序矩阵中第 K 小的元素

给你一个 n x n 矩阵 matrix &#xff0c;其中每行和每列元素均按升序排序&#xff0c;找到矩阵中第 k 小的元素。 请注意&#xff0c;它是 排序后 的第 k 小元素&#xff0c;而不是第 k 个 不同 的元素。 你必须找到一个内存复杂度优于 O(n2) 的解决方案。 示例 1&#xff1…

【二.提示词工程与实战应用篇】【3.Prompt调优:让AI更懂你的需求】

最近老张在朋友圈秀出用AI生成的国风水墨画,隔壁王姐用AI写了份惊艳全场的年终总结,就连楼下小卖部老板都在用AI生成营销文案。你看着自己跟AI对话时满屏的"我不太明白您的意思",是不是怀疑自己买了台假电脑?别慌,这可能是你的打开方式不对。今天咱们就聊聊这个…

UNIAPP前端配合thinkphp5后端通过高德API获取当前城市天气预报

如何通过 UniApp 前端项目与 ThinkPHP5 后端结合高德天气 API 获取天气预报信息。我们将分为前端和后端两部分进行实现。以下是一个完整的代码. 一、项目结构 project/ ├── frontend/ (UniApp 项目) │ ├── pages/ │ │ └── weather/ │ │ ├── in…

蓝桥杯C组真题——巧克力

题目如下 思路 代码及解析如下 谢谢观看

CSDN博客写作教学(五):从写作到个人IP的体系化构建(完结篇)

导语 (第一篇)Markdown编辑器基础 (第二篇)Markdown核心语法 (第三篇)文章结构化思维 (第四篇)标题优化与SEO实战 通过前四篇教程,你已掌握技术写作的“术”——排版、标题、流量与数据。但真正的价值在于将技能升维为“道”:用技术博客为支点,撬动个人品牌与职业发…

Elasticsearch简单学习

1、依赖的导入 <!--ES依赖--> <dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId> </dependency>2、客户端链接 RestHighLevelClient client new RestHigh…