基于 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.pswp.cn/bicheng/72633.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/72633.shtml
英文地址,請注明出處:http://en.pswp.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…