Open main menu
首页
专栏
课程
分类
归档
Chat
Sci-Hub
谷歌学术
Libgen
GitHub镜像
登录/注册
搜索
搜索
关闭
Previous
Previous
Next
Next
OpenAI最新官方ChatGPT聊天插件接口《智能聊天插件引言》全网最详细中英文实用指南和教程,助你零基础快速轻松掌握全新技术(一)(附源码)
sockstack
/
259
/
2023-12-14 12:02:40
<p><span style="color: red; font-size: 18px">ChatGPT 可用网址,仅供交流学习使用,如对您有所帮助,请收藏并推荐给需要的朋友。</span><br><a href="https://ckai.xyz/?sockstack§ion=detail" target="__blank">https://ckai.xyz</a><br><br></p> <article class="baidu_pl"><div id="article_content" class="article_content clearfix"> <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css"> <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-25cebea3f9.css"> <div id="content_views" class="markdown_views prism-atom-one-dark"> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path></svg><p></p> <div class="toc"> <h3>Chat Plugins <sup>Limited Alpha</sup> 聊天插件</h3> <ul> <li>前言</li> <li>Introduction</li> <li>Plugin flow 插件流</li> <li>其它资料下载</li> </ul> </div> <p></p> <p><img referrerpolicy="no-referrer" src="https://img-blog.csdnimg.cn/1d86f855288a43a48682a25bec51de8b.jpeg#pic_center" alt="在这里插入图片描述"></p> <p>Learn how to build a plugin that allows ChatGPT to intelligently call your API.<br> 了解如何构建允许ChatGPT智能调用API的插件。</p> <h1> <a id="_8"></a>前言</h1> <p>在现代的软件开发环境中,使用第三方插件已成为非常常见的做法。对于ChatGPT这样的大型语言模型而言,OpenAI公司深知在不断满足客户需求、提供更丰富的功能和缩短开发周期之间的平衡是多么重要。因此,OpenAI公司充分支持用户使用OpenAI认证的各种第三方插件,这使得ChatGPT可以充分利用已有的功能来快速推出复杂多变的产品,并大幅提高大型语言模型应用的场景。</p> <p>然而,OpenAI公司也清楚意识到选择合适的第三方插件以确保系统的可靠性和安全性非常重要。所以OpenAI公司也采取了一系列措施,并对每个想要整合进ChatGPT的第三方插件都进行了细致的评估和审核,只有符合其标准和要求的插件才有可以被集成到ChatGPT语言模型中。</p> <h1> <a id="Introduction_14"></a>Introduction</h1> <p>OpenAI plugins connect ChatGPT to third-party applications. These plugins enable ChatGPT to interact with APIs defined by developers, enhancing ChatGPT’s capabilities and allowing it to perform a wide range of actions.<br> OpenAI插件将ChatGPT连接到第三方应用程序。这些插件使ChatGPT能够与开发人员定义的API进行交互,增强ChatGPT的功能并允许其执行广泛的操作。</p> <p>Plugins can allow ChatGPT to do things like:<br> 插件可以允许ChatGPT执行以下操作:</p> <ul> <li>Retrieve real-time information; e.g., sports scores, stock prices, the latest news, etc.<br> 检索实时信息;例如,体育比分、股票价格、最新消息等。</li> <li>Retrieve knowledge-base information; e.g., company docs, personal notes, etc.<br> 检索知识库信息;例如,公司文档、个人笔记等。</li> <li>Perform actions on behalf of the user; e.g., booking a flight, ordering food, etc.<br> 代表用户执行操作;例如,预订航班、订购食物等。</li> </ul> <blockquote> <p>Plugins are in a limited alpha and may not yet be accessible to you. Please join the waitlist to get access. During the alpha, we will be working closely with users and developers to iterate on the plugin system, which may evolve significantly.<br> 插件是在一个限制的alpha版本,可能还没有访问到你。请加入等待列表以获得访问权限。在alpha期间,我们将与用户和开发人员密切合作,迭代插件系统,这可能会发生重大变化。</p> </blockquote> <p>Plugin developers expose one or more API endpoints, accompanied by a standardized manifest file and an OpenAPI specification. These define the plugin’s functionality, allowing ChatGPT to consume the files and make calls to the developer-defined APIs.<br> 插件开发人员公开一个或多个API端点,并附带一个标准化的清单文件和OpenAPI规范。这些定义了插件的功能,允许ChatGPT使用文件并调用开发人员定义的API。</p> <p>The AI model acts as an intelligent API caller. Given an API spec and a natural-language description of when to use the API, the model proactively calls the API to perform actions. For instance, if a user asks, “Where should I stay in Paris for a couple nights?”, the model may choose to call a hotel reservation plugin API, receive the API response, and generate a user-facing answer combining the API data and its natural language capabilities.<br> AI模型充当智能API调用者。给定API规范和何时使用API的自然语言描述,模型会主动调用API来执行操作。例如,如果用户问,“我应该在巴黎的哪里住几晚?””,模型可以选择调用酒店预订插件API,接收API响应,并且生成组合API数据及其自然语言能力的面向用户的回答。</p> <p>Over time, we anticipate the system will evolve to accommodate more advanced use cases.<br> 随着时间的推移,我们预计系统将发展以适应更高级的用例。</p> <h1> <a id="Plugin_flow__39"></a>Plugin flow 插件流</h1> <p>To build a plugin, it is important to understand the end-to-end flow.<br> 要构建一个插件,理解端到端的流程是很重要的。</p> <ol><li>Create a manifest file and host it at <code>yourdomain.com/.well-known/ai-plugin.json</code><br> 创建清单文件并将其托管在 <code>yourdomain.com/.well-known/ai-plugin.json</code> </li></ol> <ul> <li>The file includes metadata about your plugin (name, logo, etc.), details about authentication required (type of auth, OAuth URLs, etc.), and an OpenAPI spec for the endpoints you want to expose.<br> 该文件包括有关插件的元数据(名称、徽标等),关于所需身份验证的详细信息(auth类型、OAuth URL等),以及要公开的端点的OpenAPI规范。</li> <li>The model will see the OpenAPI description fields, which can be used to provide a natural language description for the different fields.<br> 模型将看到OpenAPI描述字段,这些字段可用于为不同字段提供自然语言描述。</li> <li>We suggest exposing only 1-2 endpoints in the beginning with a minimum number of parameters to minimize the length of the text. The plugin description, API requests, and API responses are all inserted into the conversation with ChatGPT. This counts against the context limit of the model.<br> 我们建议在开始时只暴露1-2个端点,并使用最少数量的参数来最小化文本的长度。插件描述、API请求和API响应都被插入到与ChatGPT的对话中。这会影响模型的上下文限制。</li> </ul> <ol start="2"><li>Register your plugin in the ChatGPT UI<br> 在ChatGPT UI中注册插件</li></ol> <ul> <li>Select the plugin model from the top drop down, then select “Plugins”, “Plugin Store”, and finally “Install an unverified plugin” or “Develop your own plugin”.<br> 从顶部下拉菜单中选择插件模型,然后选择“插件”,“插件商店”,最后选择“安装未验证的插件”或“开发自己的插件”。</li> <li>If authentication is required, provide an OAuth 2 client_id and client_secret or an API key<br> 如果需要身份验证,请提供OAuth2client_id和client_secret或API密钥</li> </ul> <ol start="3"><li>Users activate your plugin 用户激活您的插件</li></ol> <ul> <li>Users must manually activate your plugin in the ChatGPT UI. (ChatGPT will not use your plugin by default.)<br> 用户必须在ChatGPT UI中手动激活您的插件。(默认情况下,ChatGPT不会使用您的插件。)</li> <li>During the alpha, plugin developers will be able to share their plugin with 15 additional users (only other developers can install unverified plugins currently). Overtime we will roll out a way to submit your plugin for review to be exposed to all of ChatGPT’s user base.<br> 在alpha测试期间,插件开发人员将能够与15个额外的用户共享他们的插件(目前只有其他开发人员可以安装未经验证的插件)。超时,我们将推出一种方法来提交您的插件进行审查,以暴露给所有ChatGPT的用户群.</li> <li>If auth is required, users will be redirected via OAuth to your plugin; you can optionally create new accounts here as well.<br> 如果需要授权,用户将通过OAuth重定向到您的插件;您也可以选择在此处创建新帐户。</li> <li>In the future, we hope to build features to help users discover useful & popular plugins.<br> 在未来,我们希望构建功能来帮助用户发现有用的和流行的插件。</li> </ul> <ol start="4"><li>Users begin a conversation 用户开始对话</li></ol> <ul> <li>OpenAI will inject a compact description of your plugin in a message to ChatGPT, invisible to end users. This will include the plugin description, endpoints, and examples.<br> OpenAI将在ChatGPT的消息中注入插件的紧凑描述,最终用户不可见。这将包括插件描述、端点和示例。</li> <li>When a user asks a relevant question, the model may choose to invoke an API call from your plugin if it seems relevant; for POST requests, we require that developers build a user confirmation flow.<br> 当用户问一个相关的问题时,模型可能会选择从你的插件调用一个API调用,如果它看起来相关的话;对于POST请求,我们要求开发人员构建用户确认流。</li> <li>The model will incorporate the API results into its response to the user.<br> 模型将把API结果合并到对用户的响应中。</li> <li>The model might include links returned from API calls in its response. These will be displayed as rich previews (using the OpenGraph protocol, where we pull the site_name, title, description, image, and url fields)"<br> 模型可能在其响应中包含从API调用返回的链接。这些将显示为丰富的预览(使用OpenGraph协议,其中我们提取site_name,title,description,image和url字段)</li> </ul> <p>Currently, we will be sending the user’s country and state in the Plugin conversation header (if you are in California for example, it would look like <code>{"openai-subdivision-1-iso-code": "US-CA"}.</code> For further data sources, users will have to opt in via a consent screen. This is useful for shopping, restaurants, weather, and more. You can read more in our developer terms of use.<br> 目前,我们将在插件对话标题中发送用户的国家和州(例如,如果您在加利福尼亚 州,它将看起来像 <code>{"openai-subdivision-1-iso-code": "US-CA"}</code> 。对于其他数据源,用户必须通过同意屏幕选择加入。这对购物、餐馆、天气等都很有用。您可以在我们的开发人员使用条款中内容。</p> <h1> <a id="_87"></a>其它资料下载</h1> <p>如果大家想继续了解人工智能相关学习路线和知识体系,欢迎大家翻阅我的另外一篇博客《重磅 | 完备的人工智能AI 学习——基础知识学习路线,所有资料免关注免套路直接网盘下载》<br> 这篇博客参考了Github知名开源平台,AI技术平台以及相关领域专家:Datawhale,ApacheCN,AI有道和黄海广博士等约有近100G相关资料,希望能帮助到所有小伙伴们。</p> </div> <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/markdown_views-98b95bb57c.css" rel="stylesheet"> <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/style-c216769e99.css" rel="stylesheet"> </div> <div id="treeSkill"></div> </article>
OpenAI最新官方ChatGPT聊天插件接口《智能聊天插件引言》全网最详细中英文实用指南和教程,助你零基础快速轻松掌握全新技术(一)(附源码)
作者
sockstack
许可协议
CC BY 4.0
发布于
2023-12-14
修改于
2024-11-24
上一篇:软件:常用 Linux 软件汇总,值得收藏
下一篇:【AI聊天丨 ChatGPT应用案例一】— 仅用30分钟,ChatGPT帮你完成专利交底书!
尚未登录
登录 / 注册
文章分类
博客重构之路
5
Spring Boot简单入门
4
k8s 入门教程
0
MySQL 知识
1
NSQ 消息队列
0
ThinkPHP5 源码分析
5
使用 Docker 从零开始搭建私人代码仓库
3
日常开发汇总
3
标签列表
springboot
hyperf
swoole
webman
php
多线程
数据结构
docker
k8s
thinkphp
mysql
tailwindcss
flowbite
css
前端