OpenAI API In Action All In One
OpenAI API In Action All In One
Build next-gen apps with OpenAI’s powerful models.
Access GPT-3
, which performs a variety of natural language tasks, Codex
, which translates natural language to code, and DALL·E
, which creates and edits original images.
构建下一代应用程序 OpenAI 的强大模型。
访问执行各种自然语言任务的 GPT-3
、将自然语言翻译成代码的 Codex
以及创建和编辑原始图像的 DALL·E
。
import openai
openai.Completion.create(
engine="davinci",
prompt="Make a list of astronomical observatories:"
)
Guides
Text completion
Learn how to generate or edit text using our models
Code completionLimited beta
Learn how to generate, edit, or explain code
Image generationBeta
Learn how to generate or edit images
Fine-tuning
Learn how to train a model for your use case
Embeddings
Learn how to search, classify, and compare text
文本补全
了解如何使用我们的模型生成或编辑文本
代码补全
有限测试版
了解如何生成
、编辑
或解释
代码 ✅
图像生成
测试版
了解如何生成或编辑图像
微调
了解如何为您的用例训练模型
嵌入
了解如何搜索、分类和比较文本
Examples
OpenAI API demos
Q&A
Answer questions based on existing knowledge.
Grammar correction
Corrects sentences into standard English.
Summarize for a 2nd grader
Translates difficult text into simpler concepts.
Natural language to OpenAI API
Create code to call to the OpenAI API using a natural language instruction.
Text to command
Translate text into programmatic commands.
English to other languages
Translates English text into French, Spanish and Japanese.
Natural language to Stripe API
Create code to call the Stripe API using natural language.
SQL translate
Translate natural language to SQL queries.
Parse unstructured data
Create tables from long form text
Classification
Classify items into categories via example.
Python to natural language
Explain a piece of Python code in human understandable language.
Movie to Emoji
Convert movie titles into emoji.
Calculate Time Complexity
Find the time complexity of a function.
Translate programming languages
Translate from one programming language to another
Advanced tweet classifier
Advanced sentiment detection for a piece of text.
Explain code
Explain a complicated piece of code.
Keywords
Extract keywords from a block of text.
Factual answering
Guide the model towards factual answering by showing it how to respond to questions that fall outside its knowledge base. Using a '?' to indicate a response to words and phrases that it doesn't know provides a natural response that seems to work better than more abstract replies.
Ad from product description
Turn a product description into ad copy.
Product name generator
Create product names from examples words. Influenced by a community prompt.
TL;DR summarization
Summarize text by adding a 'tl;dr:' to the end of a text passage. It shows that the API understands how to perform a number of tasks with no instructions.
Python bug fixer
Find and fix bugs in source code.
Spreadsheet creator
Create spreadsheets of various kinds of data. It's a long prompt but very versatile. Output can be copy+pasted into a text file and saved as a .csv with pipe separators.
JavaScript helper chatbot
Message-style bot that answers JavaScript questions
ML/AI language model tutor
Bot that answers questions about language models
Science fiction book list maker
Create a list of items for a given topic.
Tweet classifier
Basic sentiment detection for a piece of text.
Airport code extractor
Extract airport codes from text.
SQL request
Create simple SQL queries.
Extract contact information
Extract contact information from a block of text.
JavaScript to Python
Convert simple JavaScript expressions into Python.
Friend chat
Emulate a text message conversation.
Mood to color
Turn a text description into a color.
Write a Python docstring
An example of how to create a docstring for a given Python function. We specify the Python version, paste in the code, and then ask within a comment for a docstring, and give a characteristic beginning of a docstring (""").
Analogy maker
Create analogies. Modified from a community prompt to require fewer examples.
JavaScript one line function
Turn a JavaScript function into a one liner.
Micro horror story creator
Creates two to three sentence short horror stories from a topic input.
Third-person converter
Converts first-person POV to the third-person. This is modified from a community prompt to use fewer examples.
Notes to summary
Turn meeting notes into a summary.
VR fitness idea generator
Create ideas for fitness and virtual reality games.
ESRB rating
Categorize text based upon ESRB ratings.
Essay outline
Generate an outline for a research topic.
Recipe creator (eat at your own risk)
Create a recipe from a list of ingredients.
Chat
Open ended conversation with an AI assistant.
Marv the sarcastic chat bot
Marv is a factual chatbot that is also sarcastic.
Turn by turn directions
Convert natural language to turn-by-turn directions.
Restaurant review creator
Turn a few words into a restaurant review.
Create study notes
Provide a topic and get study notes.
Interview questions
Create interview questions.
问答
根据现有知识回答问题。
语法修正
将句子改成标准英语。
给二年级学生总结
将困难的文本翻译成更简单的概念。
自然语言到 OpenAI API
创建代码以使用自然语言指令调用 OpenAI API。
命令文本
将文本转换为编程命令。
英语到其他语言
将英文文本翻译成法文、西班牙文和日文。
Stripe API 的自然语言
创建代码以使用自然语言调用 Stripe API。
SQL翻译
将自然语言翻译成 SQL 查询。
解析非结构化数据
从长格式文本创建表格
分类
通过示例将项目分类。
Python 到自然语言
用人类可以理解的语言解释一段 Python 代码。
电影到表情符号
将电影片名转换为表情符号。
计算时间复杂度
找出函数的时间复杂度。
翻译编程语言
从一种编程语言翻译成另一种
高级推文分类器
一段文本的高级情感检测。
解释代码
解释一段复杂的代码。
关键字
从文本块中提取关键字。
如实回答
通过向模型展示如何回答超出其知识库范围的问题,引导模型做出事实性回答。 用一个 '?' 指示对它不知道的单词和短语的响应提供了一种自然的响应,似乎比更抽象的答复更有效。
产品说明中的广告
将产品说明变成广告文案。
产品名称生成器
从示例单词创建产品名称。 受社区提示的影响。
TL;DR 总结
通过在文本段落的末尾添加“tl;dr:”来总结文本。 它表明 API 了解如何在没有指令的情况下执行许多任务。
Python错误修复程序
查找并修复源代码中的错误。
电子表格创建者
创建各种数据的电子表格。 这是一个很长的提示符,但用途广泛。 可以将输出复制并粘贴到文本文件中,并另存为带有竖线分隔符的 .csv 文件。
JavaScript 助手聊天机器人
回答 JavaScript 问题的消息式机器人
ML/AI语言模型导师
回答有关语言模型问题的机器人
科幻书单制作工具
为给定主题创建项目列表。
推文分类器
一段文本的基本情感检测。
机场代码提取器
从文本中提取机场代码。
SQL请求
创建简单的 SQL 查询。
提取联系信息
从文本块中提取联系信息。
JavaScript 到 Python
将简单的 JavaScript 表达式转换为 Python。
好友聊天
模拟短信对话。
心情变色
将文字描述变成一种颜色。
编写 Python 文档字符串
如何为给定的 Python 函数创建文档字符串的示例。 我们指定 Python 版本,粘贴代码,然后在注释中询问文档字符串,并给出文档字符串的特征开头 (""")。
类比制造商
创建类比。 从社区提示修改为需要更少的示例。
JavaScript 一行函数
将一个 JavaScript 函数变成一个单行代码。
微型恐怖故事创作者
根据主题输入创建两到三句话的简短恐怖故事。
第三人称转换器
将第一人称 POV 转换为第三人称。 这是根据社区提示修改的,以使用更少的示例。
总结说明
将会议记录变成摘要。
VR健身创意生成器
为健身和虚拟现实游戏创造创意。
ESRB评级
根据 ESRB 评级对文本进行分类。
论文大纲
为研究主题生成大纲。
食谱创作者(风险自负)
根据成分列表创建食谱。
聊天
与 AI 助手的开放式对话。
Marv 讽刺聊天机器人
Marv 是一个基于事实的聊天机器人,同时也很讽刺。
转弯方向
将自然语言转换为逐向指示。
餐厅评论创建者
将几句话变成餐厅评论。
创建学习笔记
提供主题并获取学习笔记。
面试题
创建面试问题。
https://beta.openai.com/examples
锁区 🇨🇳
https://beta.openai.com/signup
ChatGPT 💩
https://chat.openai.com/auth/login
You need an OpenAI account
You must have an OpenAI account to use ChatGPT. If you don't have one, sign up now and return to chat.openai.com to log in and continue.
https://beta.openai.com/signup
anti ChatGPT
We do not currently allow content pasted from ChatGPT
on Stack Overflow
; read our policy here.
https://stackoverflow.com/help/gpt-policy
Why posting GPT and ChatGPT generated answers is not currently acceptable
This Help Center article provides insight and rationale on our policy regarding the usage of GPT and ChatGPT on Stack Overflow. While this is the position of Stack Overflow staff, it’s meant to support the prior work done by moderators (namely, the temporary policy issued to ban contributions by ChatGPT).
Stack Overflow is a community built upon trust. The community trusts that users are submitting answers that reflect what they actually know to be accurate and that they and their peers have the knowledge and skill set to verify and validate those answers. The system relies on users to verify and validate contributions by other users with the tools we offer, including responsible use of upvotes and downvotes. Currently, contributions generated by GPT most often do not meet these standards and therefore are not contributing to a trustworthy environment. This trust is broken when users copy and paste information into answers without validating that the answer provided by GPT is correct, ensuring that the sources used in the answer are properly cited (a service GPT does not provide), and verifying that the answer provided by GPT clearly and concisely answers the question asked.
The objective nature of the content on Stack Overflow means that if any part of an answer is wrong, then the answer is objectively wrong. In order for Stack Overflow to maintain a strong standard as a reliable source for correct and verified information, such answers must be edited or replaced. However, because GPT is good enough to convince users of the site that the answer holds merit, signals the community typically use to determine the legitimacy of their peers’ contributions frequently fail to detect severe issues with GPT-generated answers. As a result, information that is objectively wrong makes its way onto the site. In its current state, GPT risks breaking readers’ trust that our site provides answers written by subject-matter experts.
Moderators are empowered (at their discretion) to issue immediate suspensions of up to 30 days to users who are copying and pasting GPT content onto the site, with or without prior notice or warning.
为什么目前不接受发布 GPT 和 ChatGPT 生成的答案
这篇帮助中心文章提供了关于我们在 Stack Overflow 上使用 GPT 和 ChatGPT 的政策的见解和理由。 虽然这是 Stack Overflow 员工的立场,但它是为了支持版主之前所做的工作(即发布的禁止 ChatGPT 贡献的临时政策)。
Stack Overflow 是一个建立在信任基础上的社区。 社区相信用户提交的答案反映了他们实际知道的内容是准确的,并且他们和他们的同行拥有验证和验证这些答案的知识和技能。 该系统依赖于用户使用我们提供的工具来验证和验证其他用户的贡献,包括负责任地使用赞成票和反对票。 目前,GPT 生成的贡献通常不符合这些标准,因此不会为可信赖的环境做出贡献。 当用户将信息复制并粘贴到答案中而没有验证 GPT 提供的答案是否正确、确保正确引用答案中使用的来源(GPT 不提供服务)以及验证由 GPT 提供的答案时,这种信任就会被破坏 GPT 清晰简洁地回答了所提出的问题。
Stack Overflow 上内容的客观性意味着,如果答案的任何部分是错误的,那么答案在客观上就是错误的。 为了让 Stack Overflow 保持作为正确和经过验证信息的可靠来源的强大标准,必须编辑或替换此类答案。 然而,由于 GPT 足以让网站用户相信答案有价值,社区通常用来确定其同行贡献合法性的信号经常无法检测到 GPT 生成的答案存在严重问题。 结果,客观上错误的信息进入了网站。 在目前的状态下,GPT 可能会破坏读者对我们网站提供由主题专家撰写的答案的信任。
版主有权(自行决定)对将 GPT 内容复制并粘贴到网站上的用户发出最多 30 天的立即暂停,无论是否事先通知或警告。
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/16962582.html
未经授权禁止转载,违者必究!