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

news2024/11/15 5:09:17

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 Plugin
  description: 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: getTodos
      summary: Get the list of todos
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getTodosResponse'
components:
  schemas:
    getTodosResponse:
      type: object
      properties:
        todos:
          type: array
          items:
            type: string
          description: 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 os

import yaml
from flask import Flask, jsonify, Response, request, send_from_directory
from flask_cors import CORS

app = 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.content


if __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.coloradmin.cn/o/439575.html

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

相关文章

【Android】popup windows 的使用方式 和 遇到不显示的坑

背景 在项目开发过程中有一个需求就是点击一个问号icon 弹出相关提示信息在下面&#xff0c;那么就得对这个做适配了。 计划采用popupWindow 实现&#xff1a; 参考 实现 基本的套路就是写一个xml对应的布局&#xff0c;然后在java 层使用即可。 特别注意的是该xml布局要慎…

ubuntu输入法问题汇总

Xfce4桌面环境输入法 Ubuntu20.04、ubuntu21.04中安装xfce4桌面环境&#xff0c;自带中文输入法&#xff1b; 原生xubuntu20.04中文输入法问题解决办法&#xff1a; 更新语言支持失败的话&#xff0c;终端键入&#xff1a;sudo apt-get install cmake qt5-default qtcreator…

网络安全——传输层安全协议(3)

作者简介&#xff1a;一名云计算网络运维人员、每天分享网络与运维的技术与干货。 座右铭&#xff1a;低头赶路&#xff0c;敬事如仪 个人主页&#xff1a;网络豆的主页​​​​​​ 目录 前言 一.SSL密钥更改协议 二.SSL告警协议 关闭报警 错误报警 三.SSL协议安全性…

软件测试测试开发技能

从事软件测试许多年&#xff0c;想必很多人都有感到迷茫不知所措的时候&#xff0c;人生的十字路口有很多&#xff0c;该如何抉择呢&#xff1f;有人成功转型&#xff0c;QA、项目管理、配置管理。当然还有技术型&#xff0c;性能测试、自动化测试、测试开发&#xff0c;而想要…

爬虫JS逆向思路-hook钩子

网络上几千块都学不到的JS逆向思路这里全都有&#x1f44f;&#x1f3fb;&#x1f44f;&#x1f3fb;&#x1f44f;&#x1f3fb; 本系列持续更新中&#xff0c;三连关注不迷路&#x1f44c;&#x1f3fb; 干货满满不看后悔&#x1f44d;&#x1f44d;&#x1f44d; &…

连续3天3场分享,KubeVela@KubeCon EU 2023 抢鲜看!

自从 2019 年 Open Application Model 诞生以来&#xff0c;KubeVela 已经经历了几十个版本的变化&#xff0c;并向现代应用程序交付先进功能的方向不断发展。最近&#xff0c;KubeVela 完成了向 CNCF 孵化项目的晋升&#xff0c;标志着社区的发展来到一个新的里程碑。今天&…

有了MySQL,为什么还要有NoSQL

&#x1f3c6;今日学习目标&#xff1a; &#x1f340;MySQL和NoSQL的区别 ✅创作者&#xff1a;林在闪闪发光 ⏰预计时间&#xff1a;30分钟 &#x1f389;个人主页&#xff1a;林在闪闪发光的个人主页 &#x1f341;林在闪闪发光的个人社区&#xff0c;欢迎你的加入: 林在闪闪…

PYQT5学习笔记02——程序基本结构之面向对象版本

我们之前写的代码耦合性比较高&#xff0c;复用性不高&#xff0c;这是面向过程编程的缺点。我们可以把程序基本结构设计成面向对象的版本&#xff0c;把 设置控件这部分内容封装到一个类中。 比如这个是我们的窗口&#xff0c;红色的矩形是相同的菜单控件&#xff0c;既然是一…

研报精选230420

目录 【行业230420浙商证券】卫浴行业深度报告&#xff1a;智能卫浴新变局&#xff0c;国货崛起正当时 【行业230420平安证券】氢能全景图&#xff08;上&#xff09;制氢篇&#xff1a;商业模式起步&#xff0c;绿氢初试锋芒 【行业230420天风证券】建筑装饰行业深度研究&…

InstructGPT:Training language models to follow instrcutions with human feedback

InstructGPT&#xff1a;Training language models to follow instrcutions with human feedback 介绍模型数据集TaskHuman data collectionmodel 实验结果参考 介绍 现在LLM可以被prompt来完成一系列的下游任务&#xff0c;然而这些模型也总会产生一些用户不想要的结果&#…

ESP32 WiFi扫描、WiFi通道查询

ESP32WiFi扫描程序 代码解决什么问题&#xff1f; 扫描周围WiFi并识别指定WiFi名称的WiFi通道&#xff08;为了ESP32的esp-now协议正常通信&#xff09;。 这跟ESP32 now有什么关系&#xff1f; ESP32使用NOW协议进行通信时&#xff0c;要求参与通信的设备必须处于同一物理…

ASEMI代理ADI亚德诺AD8603AUJZ-REEL7车规级芯片

编辑-Z AD8603AUJZ-REEL7芯片参数&#xff1a; 型号&#xff1a;AD8603AUJZ-REEL7 偏移电压&#xff1a;12μV 偏移电压漂移&#xff1a;1μV/C 输入偏置电流&#xff1a;0.2 pA 输入失调电流&#xff1a;0.1 pA 输入电压范围&#xff1a;–0.3 to 5.2V 输入电容&#…

Win10+VS2019安装vcpkg

vcpkg是一个C的包管理器。类似Python中的pip。安装后可以直接通过命令下载一些C的包&#xff0c;省的自己编译配路径。安装后的包都被vcpkg统一保存&#xff0c;统一配置路径。VS中哪个项目需要&#xff0c;就将其配置到某个项目中&#xff0c;当然也可以全局配置。 1、下载vc…

Node 04-http模块

HTTP 协议 概念 HTTP&#xff08;hypertext transport protocol&#xff09;协议&#xff1b;中文叫 超文本传输协议 是一种基于TCP/IP的应用层通信协议 这个协议详细规定了 浏览器 和 万维网 服务器 之间互相通信的规则 协议中主要规定了两个方面的内容: 客户端&#xff1…

Coovally再升级!基于CV大模型的智能标注解放你的双手

近日&#xff0c;随着SAM大模型的横空出世&#xff0c;“分割一切”成为可能&#xff0c;基于CV大模型的标注技术受到瞩目。 SAM分割示例 SAM大模型 Meta 在论文中发布了名为 Segment Anything Model (SAM)的新模型&#xff0c;“SAM 已经学会了关于物体的一般概念&#xff0c…

Hbase1.1:HBase官网、HBase定义、HBase结构、HBase依赖框架、HBase整合框架

这里写自定义目录标题 HBase官网HBase特点&#xff1a;大HBase定义HBase结构HBase依赖框架hadoop HBase整合框架PhoenixHive HBase官网 Hbase官网地址 HBase是Hadoop database&#xff0c;一个分布式、可扩展的大数据存储。 当您需要对大数据进行随机、实时读/写访问时&…

Activiti学习03

这里写目录标题 一、开发环境1.1 Java环境1.2 数据库1.3 开发工具 二、Activiti入门体验2.1 新建项目2.2 pom.xml文件2.3 activiti.cfg.xml文件2.4 添加日志配置文件 三、创建数据库3.1 创建数据库3.2 执行代码3.2.1 通过代码实现创建表格3.2.2 简化代码 四、绘制流程4.1 新建b…

香港金银业贸易场十大会员名单排行榜

在种类丰富全面的国际投资市场中&#xff0c;黄金拥有者良好的受众基础&#xff0c;黄金投资产品有着悠久的历史记录和蓬勃旺盛的生命力&#xff0c;数百年以来无数炒金者在黄金投资中实现了投资理财的梦想&#xff0c;但是在黄金投资的过程中&#xff0c;投资中需要面对无数考…

162.网络安全渗透测试—[Cobalt Strike系列]—[Veil免杀]

文章目录 1 Veil的使用2 生成有效载荷payload3 Veil免杀过程4 测试免杀 1 Veil的使用 &#xff08;1&#xff09;Veil主要用于生成&#xff1a;免杀payload &#xff08;2&#xff09;下载地址&#xff1a;https://github.com/Veil-Framework/Veil &#xff08;3&#xff09…

Unity 工具控件 之 Text 文本字间距调整(老版本的Unity编写工具控件/新版本Unity使用TMP)

Unity 工具控件 之 Text 文本字间距调整(老版本的Unity编写工具控件/新版本Unity使用TMP) 目录 Unity 工具控件 之 Text 文本字间距调整(老版本的Unity编写工具控件/新版本Unity使用TMP) 一、简单介绍 二、老版本 Unity Text 使用工具控件调整行间距 三、新版本 Unity Text…