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

https://openai.com/api/

import openai

openai.Completion.create(
  engine="davinci",
  prompt="Make a list of astronomical observatories:"
)

https://beta.openai.com/docs/

image

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

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://www.cnblogs.com/xgqfrms/ 查看原創文章!

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 發佈文章使用:只允許註冊用戶纔可以訪問!

原創文章,版權所有©️xgqfrms, 禁止轉載 🈲️,侵權必究⚠️!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章