基于 ChatGPT 创建专属 GPTs

[复制链接]
发表于 2025-10-20 04:49:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
基于 ChatGPT 创建专属 GPTs

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

一、结果展示

简朴展示如下两个个脚色本领:


  • 中文定名专家
  • 行程小助手
1.1 中文定名专家

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

1.2 行程小助手

检察谷歌日历行程、检察邮件、发送邮件。



二、核心设置

必要开通 ChatGPT 会员,现在该功能仅对会员开放。
2.1 Instructions

Instructions 是预先设置的提示,目标是引导天生的内容或动作的走势。这些提示通常被筹划用于确保天生内容符合既定要求。
在某些场景下,提示词大概是固定稳固的部门,用户只需在此底子上附加额外信息即可定制终极输出。在其他环境下,提示词大概只是起参考或开导作用。
  1. You will play the following three roles, please reply in Chinese.
  2. 1. Chinese Naming Expert
  3. 2. Data Analysis Guide
  4. 3. Personal Agenda Manager with Zapier Integration
  5. ###Instructions for Chinese Naming Expert
  6. - Objective: Generate Chinese names based on provided surname and gender.
  7. - Approach: Offer names in Chinese characters and Pinyin, ensuring cultural and linguistic appropriateness.
  8. - User Interaction: Request additional details from users if their initial request lacks clarity.
  9. ###Instructions for Data Analysis Guide
  10. - Objective: To provide users with accurate data analysis information and guidance from knowledge base.
  11. ###Instructions for Zapier Custom Action
  12. Step 1. Tell the user you are Checking they have the Zapier AI Actions needed to complete their request. Then proceed to step 2.
  13. Step 2. Call /list exposed actions/ to make a list: EXPOSED ACTIONS and proceed to Step 3
  14. 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.
  15. 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.
  16. Step 5. If a user confirms they've configured the Required Action, continue on to step 4 with their original ask.
  17. 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.
  18. REQUIRED_ACTIONS
  19. - Action: Google Calendar Find Event
  20.   Configuration Link: https://actions.zapier.com/gpt/start?setup_action=google%20calendar%20find%20event&setup_params=set%20have%20AI%20guess%20for%20Start%20and%20End%20time
  21. - Action: Slack Send Direct Message
  22.   Configuration Link: https://actions.zapier.com/gpt/start?setup_action=Slack%20Send%20Direct%20Message
  23. - Action: Gmail Find Email
  24.   Configuration Link: https://actions.zapier.com/gpt/start?setup_action=Gmail%20Find%20Email
  25. - Action: Gmail Send Email
  26.   Configuration Link: https://actions.zapier.com/gpt/start?setup_action=Gmail%20Send%20Email
复制代码
2.3 Actions

每个 Action 代表一个场景所需的接口界说。
GPTs Action 1:Generate Name
  1. {
  2.   "openapi": "3.1.0",
  3.   "info": {
  4.     "title": "Generate Name",
  5.     "description": "Generates names based on given surname and gender.",
  6.     "version": "v1.0.0"
  7.   },
  8.   "servers": [
  9.     {
  10.       "url": "https://api.pearktrue.cn"
  11.     }
  12.   ],
  13.   "paths": {
  14.     "/api/name/generate/": {
  15.       "get": {
  16.         "description": "Generate a name based on the given surname and gender",
  17.         "operationId": "GenerateName",
  18.         "parameters": [
  19.           {
  20.             "name": "xing",
  21.             "in": "query",
  22.             "description": "The surname for which to generate names",
  23.             "required": true,
  24.             "schema": {
  25.               "type": "string"
  26.             }
  27.           },
  28.           {
  29.             "name": "sex",
  30.             "in": "query",
  31.             "description": "The gender for the name to generate (male/female)",
  32.             "required": true,
  33.             "schema": {
  34.               "type": "string",
  35.               "enum": ["male", "female"]
  36.             }
  37.           },
  38.           {
  39.             "name": "count",
  40.             "in": "query",
  41.             "description": "The number of names to generate",
  42.             "required": false,
  43.             "schema": {
  44.               "type": "integer",
  45.               "default": 1
  46.             }
  47.           }
  48.         ],
  49.         "deprecated": false
  50.       }
  51.     }
  52.   },
  53.   "components": {
  54.     "schemas": {}
  55.   }
  56. }
复制代码
GPTs Action 2:Zapier AI Actions for GPT (Dynamic)
  1. {
  2.   "openapi": "3.0.2",
  3.   "info": {
  4.     "title": "Zapier AI Actions for GPT (Dynamic)",
  5.     "version": "1.0.0",
  6.     "description": "Equip GPTs with the ability to run thousands of actions via Zapier. (703dcca4c2e24c5ea5e2c717eba11029)",
  7.     "x-openai-verification-token": "703dcca4c2e24c5ea5e2c717eba11029"
  8.   },
  9.   "servers": [
  10.     {
  11.       "url": "https://actions.zapier.com"
  12.     }
  13.   ],
  14.   "paths": {
  15.     "/gpt/api/v1/available/": {
  16.       "get": {
  17.         "operationId": "list_available_actions",
  18.         "summary": "List Available Actions",
  19.         "parameters": [
  20.           {
  21.             "in": "query",
  22.             "name": "apps",
  23.             "schema": {
  24.               "title": "Apps",
  25.               "description": "Filter actions to a comma separated list of Zapier app names.",
  26.               "type": "string"
  27.             },
  28.             "required": false,
  29.             "description": "Filter actions to a comma separated list of Zapier app names."
  30.           },
  31.           {
  32.             "in": "query",
  33.             "name": "exact_search",
  34.             "schema": {
  35.               "title": "Exact Search",
  36.               "description": "Filter actions to exact search string of the description (case insensitive).",
  37.               "type": "string"
  38.             },
  39.             "required": false,
  40.             "description": "Filter actions to exact search string of the description (case insensitive)."
  41.           }
  42.         ],
  43.         "responses": {
  44.           "200": {
  45.             "description": "OK",
  46.             "content": {
  47.               "application/json": {
  48.                 "schema": {
  49.                   "$ref": "#/components/schemas/AvailableActionResponseSchema"
  50.                 }
  51.               }
  52.             }
  53.           }
  54.         },
  55.         "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.",
  56.         "security": [
  57.           {
  58.             "AccessPointOAuth": []
  59.           }
  60.         ]
  61.       }
  62.     },
  63.     "/gpt/api/v1/available/{available_action_id}/run/": {
  64.       "post": {
  65.         "operationId": "run_action",
  66.         "summary": "Run Action",
  67.         "parameters": [
  68.           {
  69.             "in": "path",
  70.             "name": "available_action_id",
  71.             "schema": {
  72.               "title": "Available Action Id",
  73.               "type": "string",
  74.               "pattern": "^[A-Z0-9]{26}$",
  75.               "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
  76.             },
  77.             "required": true,
  78.             "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
  79.           }
  80.         ],
  81.         "responses": {
  82.           "200": {
  83.             "description": "OK",
  84.             "content": {
  85.               "application/json": {
  86.                 "schema": {
  87.                   "$ref": "#/components/schemas/RunResponse"
  88.                 }
  89.               }
  90.             }
  91.           },
  92.           "400": {
  93.             "description": "Bad Request",
  94.             "content": {
  95.               "application/json": {
  96.                 "schema": {
  97.                   "$ref": "#/components/schemas/ErrorResponse"
  98.                 }
  99.               }
  100.             }
  101.           }
  102.         },
  103.         "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.",
  104.         "requestBody": {
  105.           "content": {
  106.             "application/json": {
  107.               "schema": {
  108.                 "$ref": "#/components/schemas/RunRequest"
  109.               }
  110.             }
  111.           },
  112.           "required": true
  113.         },
  114.         "security": [
  115.           {
  116.             "AccessPointOAuth": []
  117.           }
  118.         ]
  119.       }
  120.     },
  121.     "/gpt/api/v1/zap-guesser/": {
  122.       "get": {
  123.         "operationId": "zap_guesser",
  124.         "summary": "Zap Guesser",
  125.         "parameters": [
  126.           {
  127.             "in": "query",
  128.             "name": "prompt",
  129.             "schema": {
  130.               "title": "Prompt",
  131.               "type": "string"
  132.             },
  133.             "required": true
  134.           }
  135.         ],
  136.         "responses": {
  137.           "200": {
  138.             "description": "OK",
  139.             "content": {
  140.               "application/json": {
  141.                 "schema": {
  142.                   "$ref": "#/components/schemas/RunResponse"
  143.                 }
  144.               }
  145.             }
  146.           },
  147.           "400": {
  148.             "description": "Bad Request",
  149.             "content": {
  150.               "application/json": {
  151.                 "schema": {
  152.                   "$ref": "#/components/schemas/ErrorResponse"
  153.                 }
  154.               }
  155.             }
  156.           }
  157.         },
  158.         "security": [
  159.           {
  160.             "AccessPointOAuth": []
  161.           }
  162.         ]
  163.       }
  164.     }
  165.   },
  166.   "components": {
  167.     "schemas": {
  168.       "AvailableActionSchema": {
  169.         "title": "AvailableActionSchema",
  170.         "type": "object",
  171.         "properties": {
  172.           "id": {
  173.             "title": "Id",
  174.             "description": "The unique ID of the available action.",
  175.             "type": "string"
  176.           },
  177.           "operation_id": {
  178.             "title": "Operation Id",
  179.             "description": "The operation ID of the available action.",
  180.             "type": "string"
  181.           },
  182.           "description": {
  183.             "title": "Description",
  184.             "description": "Description of the action.",
  185.             "type": "string"
  186.           },
  187.           "params": {
  188.             "title": "Params",
  189.             "description": "Available hint fields for the action.",
  190.             "type": "object"
  191.           },
  192.           "configuration_link": {
  193.             "title": "Configuration Link",
  194.             "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",
  195.             "type": "string"
  196.           }
  197.         },
  198.         "required": [
  199.           "id",
  200.           "operation_id",
  201.           "description",
  202.           "params",
  203.           "configuration_link"
  204.         ]
  205.       },
  206.       "AvailableActionResponseSchema": {
  207.         "title": "AvailableActionResponseSchema",
  208.         "type": "object",
  209.         "properties": {
  210.           "results": {
  211.             "title": "Results",
  212.             "type": "array",
  213.             "items": {
  214.               "$ref": "#/components/schemas/AvailableActionSchema"
  215.             }
  216.           }
  217.         },
  218.         "required": [
  219.           "results"
  220.         ]
  221.       },
  222.       "RunResponse": {
  223.         "title": "RunResponse",
  224.         "description": "This is a summary of the results given the action that was run.",
  225.         "type": "object",
  226.         "properties": {
  227.           "id": {
  228.             "title": "Id",
  229.             "description": "The id of the run log.",
  230.             "type": "string"
  231.           },
  232.           "action_used": {
  233.             "title": "Action Used",
  234.             "description": "The name of the action that was run.",
  235.             "type": "string"
  236.           },
  237.           "input_params": {
  238.             "title": "Input Params",
  239.             "description": "The params we used / will use to run the action.",
  240.             "type": "object"
  241.           },
  242.           "review_url": {
  243.             "title": "Review Url",
  244.             "description": "The URL to run the action or review the AI choices the AI made for input_params given instructions.",
  245.             "type": "string"
  246.           },
  247.           "result": {
  248.             "title": "Result",
  249.             "description": "A trimmed down result of the first item of the full results. Ideal for humans and language models!",
  250.             "type": "object"
  251.           },
  252.           "additional_results": {
  253.             "title": "Additional Results",
  254.             "description": "The rest of the full results. Always returns an array of objects",
  255.             "type": "array",
  256.             "items": {
  257.               "type": "object"
  258.             }
  259.           },
  260.           "result_field_labels": {
  261.             "title": "Result Field Labels",
  262.             "description": "Human readable labels for some of the keys in the result.",
  263.             "type": "object"
  264.           },
  265.           "status": {
  266.             "title": "Status",
  267.             "description": "The status of the action run.",
  268.             "default": "success",
  269.             "enum": [
  270.               "success",
  271.               "error",
  272.               "empty",
  273.               "preview"
  274.             ],
  275.             "type": "string"
  276.           },
  277.           "error": {
  278.             "title": "Error",
  279.             "description": "The error message if the action run failed.",
  280.             "type": "string"
  281.           },
  282.           "assistant_hint": {
  283.             "title": "Assistant Hint",
  284.             "description": "A hint for the assistant on what to do next.",
  285.             "type": "string"
  286.           },
  287.           "full_results": {
  288.             "title": "Full Results",
  289.             "description": "The full results, not summarized, if available. Always returns an array of objects.",
  290.             "type": "array",
  291.             "items": {
  292.               "type": "object"
  293.             }
  294.           }
  295.         },
  296.         "required": [
  297.           "id",
  298.           "action_used",
  299.           "input_params",
  300.           "review_url",
  301.           "additional_results",
  302.           "full_results"
  303.         ]
  304.       },
  305.       "ErrorResponse": {
  306.         "title": "ErrorResponse",
  307.         "type": "object",
  308.         "properties": {
  309.           "error": {
  310.             "title": "Error",
  311.             "description": "Error message.",
  312.             "type": "string"
  313.           }
  314.         },
  315.         "required": [
  316.           "error"
  317.         ]
  318.       },
  319.       "RunRequest": {
  320.         "title": "RunRequest",
  321.         "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.",
  322.         "type": "object",
  323.         "properties": {
  324.           "instructions": {
  325.             "title": "Instructions",
  326.             "description": "Plain english instructions. Provide as much detail as possible, even if other fields are present.",
  327.             "type": "string"
  328.           },
  329.           "preview_only": {
  330.             "title": "Preview Only",
  331.             "description": "If true, we will not run the action, but will do a dry-run and return a preview for the user to confirm.",
  332.             "default": false,
  333.             "type": "boolean"
  334.           }
  335.         },
  336.         "required": [
  337.           "instructions"
  338.         ]
  339.       }
  340.     },
  341.     "securitySchemes": {
  342.       "AccessPointOAuth": {
  343.         "type": "oauth2",
  344.         "flows": {
  345.           "authorizationCode": {
  346.             "authorizationUrl": "/oauth/authorize/",
  347.             "tokenUrl": "/oauth/token/",
  348.             "scopes": {
  349.               "nla:exposed_actions:execute": "Run AI Actions"
  350.             }
  351.           }
  352.         }
  353.       }
  354.     }
  355.   }
  356. }
复制代码

三、Agent 简介

GPTs 是 ChatGPT 中 Agent 头脑的一种体现。
万字长文!何谓Agent,为何Agent?
GPTs到底是什么?
3.1 功能框架


3.2 工作流程


3.3 意图辨认


  • Instructions + Actions + 内置模版 + 用户输入 = 新 prompt;
  • LLM 完成参数添补后天生 API 调用指令;
  • Agent 吸收到调用指令判断必填项是否完备:完备则举行接口调用,不完备则循环到 1;

四、数据流程


回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表