OpenAI最新官方ChatGPT聊天插件接口《接入插件快速开始》全网最详细中英文实用指南和教程,助你零基础快速轻松掌握全新技术(二)(附源码)

Getting started 快速开始

  • 前言
  • Introduction 导言
  • Plugin manifest 插件清单
  • OpenAPI definition OpenAPI定义
  • Running a plugin 运行插件
    • Setup a local proxy of your public API 设置公共API的本地代理
  • Writing descriptions 书写描述
    • Best practices
  • Debugging 排除故障
  • 其它资料下载

在这里插入图片描述

前言

ChatGPT正在经历着一次革命性的改变,随着越来越多的小程序和第三方插件的引入,ChatGPT将变得更加强大、灵活和自由。这些插件不仅能够让用户实现更多更复杂的AI任务和目标,还会带来类似国内微信小程序般的疯狂,为用户和开发者带来更多惊喜和创新。

想象一下,当您需要一个特定的功能时,只需轻松安装一个插件,就能立即体验到它的好处和便利。无论是语音识别、图像处理,还是智能推荐等等,插件可以让您的使用体验更加高效和顺畅。

随着全球范围内各种第三方插件的接入,ChatGPT将成为一个更加强大、灵活和自由的AI平台,为用户和开发者带来更多机会和挑战。而且,通过简单的几个步骤,您也可以在ChatGPT中创建一个高度定制化的插件,实现自己的愿景和目标。让我们一起期待ChatGPT的未来吧!

Introduction 导言

Creating a plugin takes 3 steps:
创建插件需要3个步骤:

  1. Build an API 构建API
  2. Document the API in the OpenAPI yaml or JSON format 以OpenAPI yaml或JSON格式记录API
  3. Create a JSON manifest file that will define relevant metadata for the plugin
    创建一个JSON清单文件,该文件将定义插件的相关元数据

The focus of the rest of this section will be creating a todo list plugin by defining the OpenAPI specification along with the manifest file.
本节其余部分的重点将是通过定义OpenAPI规范沿着清单文件来创建一个待办事项列表插件。

Explore example plugins 浏览示例插件
Explore example plugins covering multiple use cases and authentication methods.
探索涵盖多个用例和身份验证方法的示例插件。

Plugin manifest 插件清单

Every plugin requires a ai-plugin.json file, which needs to be hosted on the API’s domain. For example, a company called example.com would make the plugin JSON file accessible via an https://example.com domain since that is where their API is hosted. When you install the plugin via the ChatGPT UI, on the backend we look for a file located at /.well-known/ai-plugin.json. The /.well-known folder is required and must exist on your domain in order for ChatGPT to connect with your plugin. If there is no file found, the plugin cannot be installed. For local development, you can use HTTP but if you are pointing to a remote server, HTTPS is required.
每个插件都需要一个 ai-plugin.json 文件,该文件需要托管在API的域中。例如,一家名为 example.com 的公司将通过 https://example.com 域访问插件JSON文件,因为这是他们的API托管的地方。当您通过ChatGPT UI安装插件时,在后端我们会查找位于 /.well-known/ai-plugin.json 的文件。 /.well-known 文件夹是必需的,并且必须存在于您的域中,以便ChatGPT与您的插件连接。如果找不到文件,则无法安装插件。对于本地开发,您可以使用HTTP,但如果您指向远程服务器,则需要HTTPS。

The minimal definition of the required ai-plugin.json file will look like the following:
所需的 ai-plugin.json 文件的最小定义如下所示:

{"schema_version": "v1","name_for_human": "TODO Plugin","name_for_model": "todo","description_for_human": "Plugin for managing a TODO list. You can add, remove and view your TODOs.","description_for_model": "Plugin for managing a TODO list. You can add, remove and view your TODOs.","auth": {"type": "none"},"api": {"type": "openapi","url": "http://localhost:3333/openapi.yaml","is_user_authenticated": false},"logo_url": "http://localhost:3333/logo.png","contact_email": "support@example.com","legal_info_url": "http://www.example.com/legal"
}

If you want to see all of the possible options for the plugin file, you can refer to the definition below.
如果你想查看插件文件的所有可能选项,你可以参考下面的定义。

FIELD 名称TYPE 类型DESCRIPTION / OPTIONS 描述/选项REQUIRED是否必须
schema_versionStringManifest schema version 清单架构版本
name_for_modelStringName the model will used to target the plugin命名用于定位插件的模型
name_for_humanStringHuman-readable name, such as the full company name 人类可读的名称,如完整的公司名称
description_for_modelStringDescription better tailored to the model, such as token context length considerations or keyword usage for improved plugin prompting. 更好地为模型定制描述,例如token上下文长度考虑或关键字使用以改进插件提示。
description_for_humanStringHuman-readable description of the plugin 人类可读的插件描述
authManifestAuthAuthentication schema 身份验证模式
apiObjectAPI specification API详述
logo_urlStringURL used to fetch the plugin’s logo 用于获取插件logo的URL
contact_emailStringEmail contact for safety/moderation reachout, support, and deactivation 通过电子邮件联系安全/适度联系、支持和停用
legal_info_urlStringRedirect URL for users to view plugin information重定向URL以供用户查看插件信息
HttpAuthorizationTypeHttpAuthorizationType“bearer” or “basic” “无记名”或“基本”
ManifestAuthTypeManifestAuthType“none”, “user_http”, “service_http”, or “oauth”
interface BaseManifestAuthBaseManifestAuthtype: ManifestAuthType; instructions: string; 类型:ManifestAuthType;说明:string;
ManifestNoAuthManifestNoAuthNo authentication required: BaseManifestAuth & { type: ‘none’, }无需身份验证:BaseManifestAuth & { type:‘none’,}
ManifestAuthManifestAuthManifestNoAuth, ManifestServiceHttpAuth, ManifestUserHttpAuth, ManifestOAuthAuth

The following are examples with different authentication methods:
以下是不同身份验证方法的示例:

# App-level API keys 应用级API密钥
type ManifestServiceHttpAuth  = BaseManifestAuth & {type: 'service_http';authorization_type: HttpAuthorizationType;verification_tokens: {[service: string]?: string;};
}# User-level HTTP authentication  用户级HTTP认证
type ManifestUserHttpAuth  = BaseManifestAuth & {type: 'user_http';authorization_type: HttpAuthorizationType;
}type ManifestOAuthAuth  = BaseManifestAuth & {type: 'oauth';# OAuth URL where a user is directed to for the OAuth authentication flow to begin. OAuth URL,用户被定向到该URL以开始OAuth身份验证流。client_url: string;# OAuth scopes required to accomplish operations on the user's behalf. 代表用户完成操作所需的OAuth范围。scope: string;# Endpoint used to exchange OAuth code with access token. 用于与访问token交换OAuth代码的端点。authorization_url: string;# When exchanging OAuth code with access token, the expected header 'content-type'. For example: 'content-type: application/json' 当与访问token交换OAuth代码时,期望的标头'content-type'。例如:'content-type: application/json'authorization_content_type: string;# When registering the OAuth client ID and secrets, the plugin service will surface a unique token. 当注册OAuth客户端ID和秘密时,插件服务将显示一个唯一的token。verification_tokens: {[service: string]?: string;};
}

There are also some limits to the length of certain field in the manifest file that are subject to change over time:
清单文件中的某些字段的长度也有一些限制,这些限制会随时间变化:

  • 50 character max for name_for_human
    name_for_human 最多50个字符
  • 50 character max for name_for_model
    name_for_model 最多50个字符
  • 120 character max for description_for_human
    description_for_human 最多120个字符
  • 8000 character max just for description_for_model (will decrease over time)
    description_for_model 最多8000个字符(将随时间减少)

Separately, we also have a 100k character limit (will decrease over time) on the API response body length which is also subject to change.
另外,我们对API响应正文长度也有100k字符的限制(会随着时间的推移而减少),这也会发生变化。

OpenAPI definition OpenAPI定义

The next step is to build the OpenAPI specification to document the API. The model in ChatGPT does not know anything about your API other than what is defined in the OpenAPI specification and manifest file. This means that if you have an extensive API, you need not expose all functionality to the model and can choose specific endpoints. For example, if you have a social media API, you might want to have the model access content from the site through a GET request but prevent the model from being able to comment on users posts in order to reduce the chance of spam.
下一步是构建OpenAPI规范以记录API。ChatGPT中的模型除了OpenAPI规范和清单文件中定义的内容外,不知道任何关于您的API的信息。这意味着,如果您有一个扩展的API,则不需要将所有功能都公开给模型,而是可以选择特定的端点。例如,如果您有一个社交媒体API,您可能希望让模型通过GET请求从网站访问内容,但防止模型能够评论用户的帖子,以减少垃圾邮件的机会。

The OpenAPI specification is the wrapper that sits on top of your API. A basic OpenAPI specification will look like the following:
OpenAPI规范是位于API之上的包装器。基本的OpenAPI规范如下所示:

openapi: 3.0.1
info:title: TODO Plugindescription: A plugin that allows the user to create and manage a TODO list using ChatGPT.version: 'v1'
servers:- url: http://localhost:3333
paths:/todos:get:operationId: getTodossummary: Get the list of todosresponses:"200":description: OKcontent:application/json:schema:$ref: '#/components/schemas/getTodosResponse'
components:schemas:getTodosResponse:type: objectproperties:todos:type: arrayitems:type: stringdescription: The list of todos.

We start by defining the specification version, the title, description, and version number. When a query is run in ChatGPT, it will look at the description that is defined in the info section to determine if the plugin is relevant for the user query. You can read more about prompting in the writing descriptions section.
我们首先定义规范版本、标题、描述和版本号。当在ChatGPT中运行查询时,它将查看在info部分中定义的描述,以确定插件是否与用户查询相关。您可以在写作说明部分阅读有关提示的更多信息。

Keep in mind the following limits in your OpenAPI specification, which are subject to change:
请记住OpenAPI规范中的以下限制,这些限制可能会发生变化:

  • 200 characters max for each API endpoint description/summary field in API specification
    API规范中每个API端点描述/摘要字段最多200个字符
  • 200 characters max for each API param description field in API specification
    API规范中每个API参数描述字段最多200个字符

Since we are running this example locally, we want to set the server to point to your localhost URL. The rest of the OpenAPI specification follows the traditional OpenAPI format, you can learn more about OpenAPI formatting through various online resources. There are also many tools that auto generate OpenAPI specifications based on your underlying API code.
由于我们是在本地运行这个示例,我们希望将服务器设置为指向您的localhost URL。OpenAPI规范的其余部分遵循传统的OpenAPI格式,您可以通过各种在线资源了解有关OpenAPI格式的更多信息。还有许多工具可以根据底层API代码自动生成OpenAPI规范。

Running a plugin 运行插件

Once you have created an API, manifest file, and OpenAPI specification for your API, you are now ready to connect the plugin via the ChatGPT UI. There are two different places your plugin might be running, either locally in a development environment or on a remote server.
一旦您为API创建了API、清单文件和OpenAPI规范,现在就可以通过ChatGPT UI连接插件了。您的插件可能在两个不同的地方运行,要么在本地开发环境中,要么在远程服务器上。

If you have a local version of your API running, you can point the plugin interface to your localhost server. To connect the plugin with ChatGPT, navigate to the plugin store and select “Develop your own plugin”. Enter your localhost and port number (e.g localhost:3333). Note that only auth type none is currently supported for localhost development.
如果您运行的是本地版本的API,则可以将插件接口指向本地主机服务器。要将插件与ChatGPT连接,请导航到插件商店并选择“开发您自己的插件”。输入本地主机和端口号(例如 localhost:3333 )。请注意,目前只有授权类型 none 支持本地主机开发。

If the plugin is running on a remote server, you will need to first select “Develop your own plugin” to set it up and then “Install an unverified plugin” to install it for yourself. You can simply add the plugin manifest file to the yourdomain.com/.well-known/ path and start testing your API. However, for subsequent changes to your manifest file, you will have to deploy the new changes to your public site which might take a long time. In that case, we suggest setting up a local server to act as a proxy for your API. This allows you to quickly prototype changes to your OpenAPI spec and manifest file.
如果插件运行在远程服务器上,您需要首先选择“开发您自己的插件”进行设置,然后选择“安装未验证的插件”为自己安装。您可以简单地将插件清单文件添加到 yourdomain.com/.well-known/ 路径并开始测试您的API。但是,对于清单文件的后续更改,您必须将新更改部署到公共站点,这可能需要很长时间。在这种情况下,我们建议设置一个本地服务器作为API的代理。这允许您快速对OpenAPI规范和清单文件的更改进行原型化。

Setup a local proxy of your public API 设置公共API的本地代理

The following Python code is an example of how you can set up a simple proxy of your public facing API.
下面的Python代码是一个示例,说明如何设置面向公共API的简单代理。

import requests
import osimport yaml
from flask import Flask, jsonify, Response, request, send_from_directory
from flask_cors import CORSapp = Flask(__name__)PORT = 3333# Note: Setting CORS to allow chat.openapi.com is required for ChatGPT to access your plugin
CORS(app, origins=[f"http://localhost:{PORT}", "https://chat.openai.com"])api_url = 'https://example.com'@app.route('/.well-known/ai-plugin.json')
def serve_manifest():return send_from_directory(os.path.dirname(__file__), 'ai-plugin.json')@app.route('/openapi.yaml')
def serve_openapi_yaml():with open(os.path.join(os.path.dirname(__file__), 'openapi.yaml'), 'r') as f:yaml_data = f.read()yaml_data = yaml.load(yaml_data, Loader=yaml.FullLoader)return jsonify(yaml_data)@app.route('/openapi.json')
def serve_openapi_json():return send_from_directory(os.path.dirname(__file__), 'openapi.json')@app.route('/<path:path>', methods=['GET', 'POST'])
def wrapper(path):headers = {'Content-Type': 'application/json',}url = f'{api_url}/{path}'print(f'Forwarding call: {request.method} {path} -> {url}')if request.method == 'GET':response = requests.get(url, headers=headers, params=request.args)elif request.method == 'POST':print(request.headers)response = requests.post(url, headers=headers, params=request.args, json=request.json)else:raise NotImplementedError(f'Method {request.method} not implemented in wrapper for {path=}')return response.contentif __name__ == '__main__':app.run(port=PORT)

Writing descriptions 书写描述

When a user makes a query that might be a potential request that goes to a plugin, the model looks through the descriptions of the endpoints in the OpenAPI specification along with the description_for_model in the manifest file. Just like with prompting other language models, you will want to test out multiple prompts and descriptions to see what works best.
当用户进行可能是去往插件的潜在请求的查询时,模型会查看OpenAPI规范中的端点描述沿着清单文件中的 description_for_model 。就像提示其他语言模型一样,您可能希望测试多个提示和描述,以查看哪些最有效。

The OpenAPI spec itself is a great place to give the model information about the diverse details of your API – what functions are available, with what parameters, etc. Besides using expressive, informative names for each field, the spec can also contain “description” fields for every attribute. These can be used to provide natural language descriptions of what a function does or what information a query field expects, for example. The model will be able to see these, and they will guide it in using the API. If a field is restricted to only certain values, you can also provide an “enum” with descriptive category names.
OpenAPI规范本身是一个很好的地方,可以为模型提供有关API的各种细节的信息-哪些函数可用,具有哪些参数等。除了为每个字段使用富有表现力的信息名称外,规范还可以为每个属性包含“描述”字段。例如,这些可以用于提供关于函数做什么或查询字段期望什么信息的自然语言描述。模型将能够看到这些,它们将指导它使用API。如果字段仅限于某些值,则还可以提供具有描述性类别名称的“枚举”。

The description_for_model attribute gives you the freedom to instruct the model on how to use your plugin generally. Overall, the language model behind ChatGPT is highly capable of understanding natural language and following instructions. Therefore, this is a good place to put in general instructions on what your plugin does and how the model should use it properly. Use natural language, preferably in a concise yet descriptive and objective tone. You can look at some of the examples to have an idea of what this should look like. We suggest starting the description_for_model with “Plugin for …” and then enumerating all of the functionality that your API provides.
description_for_model 属性让你可以自由地指导模型如何使用你的插件。总的来说,ChatGPT背后的语言模型非常能够理解自然语言并遵循指令。因此,这是一个很好的地方,可以放置关于插件功能以及模型应该如何正确使用它的一般说明。使用自然语言,最好使用简洁、描述性和客观的语气。您可以查看一些示例,以了解这应该是什么样子。我们建议以“Plugin for …”开始 description_for_model ,然后枚举您的API提供的所有功能。

Best practices

Here are some best practices to follow when writing your description_for_model and descriptions in your OpenAPI specification, as well as when designing your API responses:
以下是在OpenAPI规范中编写 description_for_model 和描述以及设计API响应时需要遵循的一些最佳实践:

  1. Your descriptions should not attempt to control the mood, personality, or exact responses of ChatGPT. ChatGPT is designed to write appropriate responses to plugins.
    您的描述不应试图控制情绪、个性或ChatGPT的确切反应。ChatGPT旨在为插件编写适当的响应。

Bad example:

When the user asks to see their todo list, always respond with “I was able to find your todo list! You have [x] todos: [list the todos here]. I can add more todos if you’d like!”
当用户要求查看他们的待办事项列表时,总是回答“我能够找到您的待办事项列表!您有[x]个待办事项:[此处列出todos]。如果你喜欢我可以添加更多的todos!”

Good example:

[no instructions needed for this]
[对此不需要说明]

  1. Your descriptions should not encourage ChatGPT to use the plugin when the user hasn’t asked for your plugin’s particular category of service.
    您的描述不应该鼓励ChatGPT在用户没有要求您的插件的特定服务类别时使用该插件。

Bad example:

Whenever the user mentions any type of task or plan, ask if they would like to use the TODOs plugin to add something to their todo list.
每当用户提到任何类型的任务或计划时,询问他们是否愿意使用待办事项插件将某些内容添加到他们的待办事项列表中。

Good example:

The TODO list can add, remove and view the user’s TODOs.
待办事项列表可以添加、删除和查看用户的待办事项。

  1. Your descriptions should not prescribe specific triggers for ChatGPT to use the plugin. ChatGPT is designed to use your plugin automatically when appropriate.
    您的描述不应规定ChatGPT使用插件的特定触发器。ChatGPT旨在在适当的时候自动使用您的插件。

Bad example:

When the user mentions a task, respond with “Would you like me to add this to your TODO list? Say ‘yes’ to continue.”
当用户提到一个任务时,用“你想让我把这个添加到你的TODO列表中吗?说“是”以继续。”

Good example:

[no instructions needed for this]
[对此不需要说明]

  1. Plugin API responses should return raw data instead of natural language responses unless it’s necessary. ChatGPT will provide its own natural language response using the returned data.
    插件API响应应该返回原始数据,而不是自然语言响应,除非有必要。ChatGPT将使用返回的数据提供自己的自然语言响应。

Bad example:

I was able to find your todo list! You have 2 todos: get groceries and walk the dog. I can add more todos if you’d like!
我能找到你的待办事项清单!你有两个待办事项:买点东西和遛狗。我可以添加更多的待办事项如果你喜欢!

Good example:

{ “todos”: [ “get groceries”, “walk the dog” ] }
{“todos”:[“买杂货”,“遛狗”] }

Debugging 排除故障

By default, the chat will not show plugin calls and other information that is not surfaced to the user. In order to get a more complete picture of how the model is interacting with your plugin, you can see the request and response by clicking the down arrow on the plugin name after interacting with the plugin.
默认情况下,聊天不会显示插件调用和其他未向用户显示的信息。为了更完整地了解模型如何与插件交互,您可以在与插件交互后单击插件名称上的向下箭头来查看请求和响应。

A model call to the plugin will usually consist of a message from the model containing JSON-like parameters which are sent to the plugin, followed by a response from the plugin, and finally a message from the model utilizing the information returned by the plugin.
对插件的模型调用通常包括来自模型的消息,该消息包含发送到插件的类JSON参数,随后是来自插件的响应,最后是来自模型的消息,该消息利用插件返回的信息。

If you are developing a localhost plugin, you can also open the developer console by going to “Settings” and toggling “Open plugin devtools”. From there, you can see more verbose logs and “refresh plugin” which re-fetches the Plugin and OpenAPI specification.
如果你正在开发一个本地主机插件,你也可以打开开发者控制台,进入“设置”并切换“打开插件devtools”。从那里,您可以看到更多详细的日志和“刷新插件”,它重新获取插件和OpenAPI规范。

其它资料下载

如果大家想继续了解人工智能相关学习路线和知识体系,欢迎大家翻阅我的另外一篇博客《重磅 | 完备的人工智能AI 学习——基础知识学习路线,所有资料免关注免套路直接网盘下载》
这篇博客参考了Github知名开源平台,AI技术平台以及相关领域专家:Datawhale,ApacheCN,AI有道和黄海广博士等约有近100G相关资料,希望能帮助到所有小伙伴们。

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

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

相关文章

十分钟教你搭建ChatGPT 图片生成的安卓应用

十分钟教你搭建ChatGPT 图片生成的安卓应用 大家好&#xff0c;我是易安&#xff01; 今天&#xff0c;我们将集成 OpenAI API (ChatGPT)来构建一个简单的类似 ChatGPT 的 android 应用程序&#xff0c;让它返回我们想要的图片&#xff0c;本文是上一篇的姊妹篇。 详细步骤 第…

ChatGpt学习辅助挑战网络工程师001

ChatGpt学习辅助挑战网络工程师001 书接上回,询问ChatGpt后,来点亮第一个技能树 成为一个网络工程师ChatGpt提出的的第一步,需要熟悉网络架构. Network Architecture: You should have a good understanding of network architectures and how different components of a net…

VisualChatGPT: 微软发布可发送和接收图片的 ChatGPT

公众号关注 「奇妙的 Linux 世界」 设为「星标」&#xff0c;每天带你玩转 Linux &#xff01; ​ Visual ChatGPT 连接了 ChatGPT 和一系列的 Visual Foundation 模型&#xff0c;以便在聊天过程中发送和接收图像。 下图为演示效果&#xff1a; 对该应用实现感兴趣的可以查看其…

调用chatgpt官方api实现聊天和绘图

首先要学会科学上网 1官方api文档 https://platform.openai.com/docs/api-reference/chat/create 2 获取key https://platform.openai.com/ 登录账号 之后点击右上角的头像&#xff0c;再点击View API keys 3 http调用聊天接口 调用地址https://api.openai.com/v1/chat/com…

解决chatgpt网络错误,频繁掉线的问题,那就使用KeepChatGPT

文章目录 解决chatgpt出现An error occurred. If this issue persists please contact us through our help center at help.openai.com问题起因对比原作者github地址安装步骤浏览器要求安装油猴安装KeepChatGPT插件使用方法功能栏说明功能说明如下关于 取消审计 功能关于 调整…

ChatGPT 速通手册——让 ChatGPT 来写正则表达式

regex 生成 正则表达式可谓是一门让广大程序员们又爱又恨的技术。它易学难精&#xff0c;而且可维护性又差&#xff0c;别说交接给其他同事&#xff0c;同一个人写的正则表达式&#xff0c;三个月后回头再看&#xff0c;也可能完全不知所云。 因此&#xff0c;让 ChatGPT 来写…

轻松解决ChatGPT网络报错,畅享沟通

ChatGPT的确很不错&#xff0c;无论是在什么岗位&#xff0c;使用它都可以让工作的你提升效率&#xff0c;可是我们经常会遇到一个神奇的网络报错&#xff08;当我们一会不使用就来个这样的效果提示&#xff09;&#xff0c;是不是头大&#xff1f; 好了&#xff0c;开始进入正…

完美解决ChatGPT网络错误,不再频繁地刷新网页(分享好用的插件KeepChatGPT)

最近发现一个好用的浏览器插件KeepChatGPT&#xff01;完美解决ChatGPT网络错误&#xff0c;不再频繁地刷新网页&#xff0c;敲好用&#xff01;&#xff01;&#xff01; 废话不多说上链接&#xff01; 安装渠道如下 1 Github&#xff1a;https://github.com/xcanwin/KeepCh…

ChatGPT报错“network Error“?

文章目录 问题一、为什么ChatGPT会报错"network Error"?二、ChatGPT Plus -GPT4如何开通&#xff1f;结尾 问题一、为什么ChatGPT会报错"network Error"? ChatGPT报错“Network Error”&#xff0c;通常意味着它无法连接到服务器或API服务不可用。以下是…

chatgpt api极简入门(参考官网教程)

写在前面 心血来潮&#xff0c;复试完结束很摆&#xff0c;研究点东西玩玩&#xff0c;之前之知道nonebot搭建qq机器人的方法和步骤&#xff0c;这次记录下自己使用openai&#xff0c;gpt3.5的api的代码&#xff0c;参考自openai的官网。 环境 要求 python 版本 >3.8 &…

解决ChatGPT网络总是掉线问题

解决ChatGPT网络总是掉线问题 问题描述 1.我们在使用ChatGPT时&#xff0c;总是会遇到如下图网络掉线问题&#xff0c;是什么原因呢&#xff1f;简而言之&#xff0c;服务器检测到1-2分钟内你没有与之发生数据交互&#xff0c;认为你已经掉线了&#xff0c;就主动断开了链接&…

在 1 分钟内使用 ChatGPT 构建一个完整的网站

欢迎来到令人兴奋的自然语言处理和机器学习世界&#xff01;今天&#xff0c;我们将探索 ChatGPT 的功能&#xff0c;这是一种由 OpenAI 开发的最先进的语言模型。ChatGPT 最令人印象深刻的功能之一是它能够根据简单的描述生成源代码。想象一下&#xff0c;无需自己编写一行代码…

ChatGPT,真香!谷歌顶级AI人才组团叛逃OpenAI

【导读】据The Information爆料&#xff0c;OpenAI在最近几个月里挖了至少十几名谷歌AI的员工&#xff0c;而这些工程师都在ChatGPT的研究中发挥了至关重要的作用。 如今已经没人能否认&#xff0c;OpenAI凭ChatGPT火遍了全球。 所有AI从业者和投资人都想知道&#xff0c;一家…

ChatGPT通过谷歌L3入职测试,人类码农危矣?

一条消息最近在硅谷热传&#xff1a;“ChatGPT成功通过了谷歌的面试&#xff0c;拿到了年薪18万美元的L3工程师offer&#xff01;” 既给科学论文当共同作者&#xff0c;又能替代人类码农&#xff0c;还能给总统讲话写稿子&#xff0c;这个ChatGPT&#xff0c;怕是真要通天了。…

为什么 ChatGPT 会引起 Google 的恐慌?

在 ChatGPT 尚未全面开放使用之际&#xff0c;它散发的巨大威力&#xff0c;似乎已经让行业内的竞争对手感到了威胁。 整理 | 屠敏 出品 | CSDN&#xff08;ID&#xff1a;CSDNnews&#xff09; 距离 ChatGPT 上线不足一个月的时间&#xff0c;其已经成为各行各业智囊团中的“网…

chatGPT的谷歌浏览器Monica插件的使用

前提说明&#xff1a; 我们使用Monica插件&#xff0c;可以在使用谷歌浏览器的时候使用ChatGPT&#xff0c;平常可以和快速地解决我们遇到的开发问题。 1、需要使用的的插件百度云盘连接如下&#xff1a;链接&#xff1a;https://pan.baidu.com/s/1IWiDS19U9qSlBcQzFrznMA 提取…

首个“开源ChatGPT”来了:基于谷歌5400亿参数大模型,华人小哥出品,网友吐槽:这谁能跑?

就说程序员的手速有多快吧&#xff0c;首个开源ChatGPT项目已经出现了&#xff01; 基于谷歌语言大模型PaLM架构&#xff0c;以及使用从人类反馈中强化学习的方法&#xff08;RLHF&#xff09;&#xff0c;华人小哥Phillip Wang复刻了一个ChatGPT出来。 项目GitHub星已经超过1…

ChatGPT有多厉害,影响到谷歌地位?

Datawhale干货 技术&#xff1a;ChatGPT&#xff0c;来源&#xff1a;量子位 AI神器 ChatGPT 火了。 能直接生成代码、会自动修复bug、在线问诊、模仿莎士比亚风格写作……各种话题都能hold住&#xff0c;它就是OpenAI刚刚推出的——ChatGPT。 有脑洞大开的网友甚至用它来设计…

ChatGPT能够干翻谷歌吗?

目前大多数人对于ChatGPT的喜爱&#xff0c;主要源自于其强大的沟通能力&#xff0c;当我们向ChatGPT提出问题时&#xff0c;它不仅能够为我们提供结论&#xff0c;而且还能够与我们建立沟通&#xff0c;向ChatGPT提出任何问题&#xff0c;感觉都像是在与一个真实的人类进行交谈…

【ChatGPT案例】10大ChatGPT谷歌插件神器

ChatGPT相信大家都用过&#xff0c;但是如何高效使用&#xff0c;并真正挖掘出ChatGPT的强大能力呢&#xff1f;关键之处就在于Prompts&#xff01; 可是&#xff0c;编写prompts是一门熟能生巧的技术活&#xff0c;我们能不能一键拥有那些惊艳的prompts呢&#xff1f;答案就是…