Introduction 导言

Overview 概述

The OpenAI API can be applied to virtually any task that involves understanding or generating natural language or code. We offer a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models. These models can be used for everything from content generation to semantic search and classification.

OpenAI API可以应用于几乎任何涉及理解或生成自然语言或代码的任务。我们提供了一系列适合不同任务的不同功率级别的模型,并能够微调您自己的定制模型。这些模型可以用于从内容生成到语义搜索和分类的所有方面。

Key concepts 关键概念

We recommend completing our quickstart tutorial to get acquainted with key concepts through a hands-on, interactive example.

我们建议完成快速入门教程,通过一个动手的交互式示例来熟悉关键概念。

Quickstart tutorial 官方快速入门教程

Learn by building a quick sample application

通过构建快速示例应用程序来学习

Prompts and completions 提示和完成

The completions endpoint is at the center of our API. It provides a simple interface to our models that is extremely flexible and powerful. You input some text as a prompt, and the model will generate a text completion that attempts to match whatever context or pattern you gave it. For example, if you give the API the prompt, “Write a tagline for an ice cream shop”, it will return a completion like “We serve up smiles with every scoop!”

补全端点是我们API的核心。它为我们的模型提供了一个简单的接口,但非常灵活和强大。您输入一些文本作为提示,模型将生成一个完成文本,尝试匹配您提供的任何上下文或模式。例如,如果您向API提供提示“为冰淇淋店写一个标语”,它将返回类似“我们为每一勺都提供微笑!”

Designing your prompt is essentially how you “program” the model, usually by providing some instructions or a few examples. This is different from most other NLP services which are designed for a single task, such as sentiment classification or named entity recognition. Instead, the completions endpoint can be used for virtually any task including content or code generation, summarization, expansion, conversation, creative writing, style transfer, and more.

设计提示本质上是如何“编程”模型,通常是通过提供一些说明或几个示例。这与大多数其他为单个任务设计的NLP服务不同,例如情感分类或命名实体识别。相反,补全端点可以用于几乎任何任务,包括内容或代码生成、总结、扩展、对话、创意写作、风格转换等。

Tokens 标记/符号

Our models understand and process text by breaking it down into tokens. Tokens can be words or just chunks of characters. For example, the word “hamburger” gets broken up into the tokens “ham”, “bur” and “ger”, while a short and common word like “pear” is a single token. Many tokens start with a whitespace, for example “ hello” and “ bye”.

我们的模型通过将文本分解为标记来理解和处理文本。标记可以是单词,也可以是字符块。例如,单词“hamburger”被分解为标记“ham”、“bur”和“ger”,而像“pear”这样简短而常见的单词是单个标记。许多标记以空格开头,例如“hello”和“bye”。

The number of tokens processed in a given API request depends on the length of both your inputs and outputs. As a rough rule of thumb, 1 token is approximately 4 characters or 0.75 words for English text. One limitation to keep in mind is that your text prompt and generated completion combined must be no more than the model's maximum context length (for most models this is 2048 tokens, or about 1500 words). Check out our tokenizer tool to learn more about how text translates to tokens.

给定API请求中处理的标记数取决于输入和输出的长度。根据粗略的经验,对于英语文本,1个标记大约为4个字符或0.75个单词。需要记住的一个限制是,文本提示和生成的补全的总和不能超过模型的最大上下文长度(对于大多数模型,这是2048个标记,或大约1500个单词)。查看我们的标记器工具,了解更多关于文本如何转换为标记的信息。

Models 模型

The API is powered by a set of models with different capabilities and price points. Our base GPT-3 models are called Davinci, Curie, Babbage and Ada. Our Codex series is a descendant of GPT-3 that’s been trained on both natural language and code. To learn more, visit our models documentation.

API由一组具有不同功能和价位的模型提供支持。我们的GPT-3基本模型有Davinci, Curie, Babbage and Ada。我们的Codex系列是GPT-3的后代,经过了自然语言和代码方面的培训。要了解更多信息,请访问我们的模型文档

Next steps 下一步步骤

Keep our usage policies in mind as you start building your application.

在开始构建应用程序时,请牢记我们的使用策略

Explore our examples library for inspiration.

探索我们的示例库以获得灵感。

Jump into one of our guides to start building.

跳到我们的指南之一开始建设。

其它资料下载

如果大家想继续了解人工智能相关学习路线和知识体系,欢迎大家翻阅我的另外一篇博客《重磅 | 完备的人工智能AI 学习——基础知识学习路线,所有资料免关注免套路直接网盘下载

这篇博客参考了Github知名开源平台,AI技术平台以及相关领域专家:Datawhale,ApacheCN,AI有道和黄海广博士等约有近100G相关资料,希望能帮助到所有小伙伴们。

全网最详细中英文ChatGPT接口文档(一)开始使用ChatGPT——导言的更多相关文章

  1. ShiWangMeSDK Android版接口文档 0.2.0 版

    # ShiWangMeSDK Android版接口文档 0.2.0 版 android 总共有 14 个接口,分别涉及到初始化和对界面的一些细节的控制.下面详细介绍接口,如果没有特殊说明,接口都在 S ...

  2. 使用swagger实现web api在线接口文档

    一.前言 通常我们的项目会包含许多对外的接口,这些接口都需要文档化,标准的接口描述文档需要描述接口的地址.参数.返回值.备注等等:像我们以前的做法是写在word/excel,通常是按模块划分,例如一个 ...

  3. SpringBoot整合Swagger2,再也不用维护接口文档了!

    前后端分离后,维护接口文档基本上是必不可少的工作.一个理想的状态是设计好后,接口文档发给前端和后端,大伙按照既定的规则各自开发,开发好了对接上了就可以上线了.当然这是一种非常理想的状态,实际开发中却很 ...

  4. Asp.Net Core 轻松学-利用 Swagger 自动生成接口文档

    前言     目前市场上主流的开发模式,几乎清一色的前后端分离方式,作为服务端开发人员,我们有义务提供给各个客户端良好的开发文档,以方便对接,减少沟通时间,提高开发效率:对于开发人员来说,编写接口文档 ...

  5. webapi 利用webapiHelp和swagger生成接口文档

    webapi 利用webapiHelp和swagger生成接口文档.均依赖xml(需允许项目生成注释xml) webapiHelp:微软技术自带,仅含有模块.方法.请求-相应参数的注释. swagge ...

  6. 使用sphinx制作接口文档并托管到readthedocs

    此sphinx可不是彼sphinx,此篇是指生成文档的工具,是python下最流行的文档生成工具,python官方文档即是它生成,官方网站是http://www.sphinx-doc.org,这里是一 ...

  7. swagger2的接口文档

    以前见过一个swagger2的接口文档,特别好用,好看,对接口中入参描述的很详细:适合用于项目的开发 后来自己做项目的时候,没有找到这个swagger版本 <dependency> < ...

  8. 从零开始学 Web 之 Ajax(四)接口文档,验证用户名唯一性案例

    大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...

  9. SpringBoot 使用Swagger2打造在线接口文档(附汉化教程)

    原文地址: https://www.jianshu.com/p/7e543f0f0bd8 SpringBoot + Swagger2 UI界面-汉化教程 1.默认的英文界面UI 想必很多小伙伴都曾经使 ...

  10. 基于swagger进行接口文档的编写

    0. 前言 近期忙于和各个银行的代收接口联调,根据遇到的问题,对之前编写的接口进行了修改,需求收集和设计接口时想到了方方面面,生产环境下还是会遇到意想不到的问题,好在基本的执行逻辑已确定,因此只是对接 ...

随机推荐

  1. 打开part文件夹

    1 #include <uf.h> 2 #include <uf_ui.h> 3 #include <uf_part.h> 4 #include <atlst ...

  2. 突然连不上虚拟机,本地网络里没有VMnet8

    今天打开虚拟机,突然发现无法ping通网络了,但是能ping通虚拟机ip,打开我的window的网络适配器发现居然没有vmnet 8虚拟网卡了,防火墙什么的都设置好了,仍然不行,后来发现,在网络和共享 ...

  3. 2D 消隐效果

    在触发消隐的物体(比如玩家)挂下面的代码,以及box collider,rigidbody 2d using UnityEngine; public class ColliderFader : Mon ...

  4. 大唐电信AC集中管理平台弱口令漏洞

    网络资产搜索: 找到平台 进行默认口令登入:admin/1***** 登陆 End!!!

  5. elasticsearch 根据主键_id更新部分字段

    package com.better517na.ebookingbusiservice.helper;import com.alibaba.fastjson.JSON;import com.aliba ...

  6. Python GUI编程之Tkinter

    GUI编程Tkinter Python 提供了多个图形开发界面的库,几个常用 Python GUI 库如下: Tkinter: Tkinter 模块(Tk 接口)是 Python 的标准 Tk GUI ...

  7. Vue的学习(1)

    在学习Vue之前,首先大家要知道一个mvvm模式,何为mvvm模式呢,mvvm其实是有m,v和vm组成,类似与java里面的mvc模式,只不过mvc模式是针对于后台来说,而mvvm是针对于前台来说的, ...

  8. python 函数默认值误区

    当创建python函数时,默认值参数实在执行def语句的时候创建的也即是在创建该函数的时候,而不是在调用该函数的时候创建的. def append(x, lst = []): lst.append(x ...

  9. function | fastica

    fastica - Fast Independent Component Analysis FastICA for Matlab 7.x and 6.x Version 2.5, October 19 ...

  10. node邮件发送html,简单2步附代码

    node 发送 html 邮件 安装 npm install nodemailer 新建 html 文件 ① 新建 views 目录下面新增 index.html(当然也可以使用其它目录结构,下面的代 ...