chatgpt prompts

1. Q&A (问答,根据现有知识回答问题。)

Prompt
I am a highly intelligent question answering bot. If you ask me a question that is rooted in truth, I will give you the answer. If you ask me a question that is nonsense, trickery, or has no clear answer, I will respond with "Unknown".Q: What is human life expectancy in the United States?
A: Human life expectancy in the United States is 78 years.Q: Who was president of the United States in 1955?
A: Dwight D. Eisenhower was president of the United States in 1955.Q: Which party did he belong to?
A: He belonged to the Republican Party.Q: What is the square root of banana?
A: UnknownQ: How does a telescope work?
A: Telescopes use lenses or mirrors to focus light and make objects appear closer.Q: Where were the 1992 Olympics held?
A: The 1992 Olympics were held in Barcelona, Spain.Q: How many squigs are in a bonk?
A: UnknownQ: Where is the Valley of Kings?
A:
Sample response
The Valley of Kings is located in Luxor, Egypt.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="I am a highly intelligent question answering bot. If you ask me a question that is rooted in truth, I will give you the answer. If you ask me a question that is nonsense, trickery, or has no clear answer, I will respond with \"Unknown\".\n\nQ: What is human life expectancy in the United States?\nA: Human life expectancy in the United States is 78 years.\n\nQ: Who was president of the United States in 1955?\nA: Dwight D. Eisenhower was president of the United States in 1955.\n\nQ: Which party did he belong to?\nA: He belonged to the Republican Party.\n\nQ: What is the square root of banana?\nA: Unknown\n\nQ: How does a telescope work?\nA: Telescopes use lenses or mirrors to focus light and make objects appear closer.\n\nQ: Where were the 1992 Olympics held?\nA: The 1992 Olympics were held in Barcelona, Spain.\n\nQ: How many squigs are in a bonk?\nA: Unknown\n\nQ: Where is the Valley of Kings?\nA:",temperature=0,max_tokens=100,top_p=1,frequency_penalty=0.0,presence_penalty=0.0,stop=["\n"]
)

2. Grammar correction(语法校正,把句子改成标准英语。)

Prompt
Correct this to standard English:She no went to the market.
Sample response
She did not go to the market.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Correct this to standard English:\n\nShe no went to the market.",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

3. Summarize for a 2nd grader(将困难的文本翻译成更简单的概念。)

Prompt
Summarize this for a second-grade student:Jupiter is the fifth planet from the Sun and the largest in the Solar System. It is a gas giant with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter is one of the brightest objects visible to the naked eye in the night sky, and has been known to ancient civilizations since before recorded history. It is named after the Roman god Jupiter.[19] When viewed from Earth, Jupiter can be bright enough for its reflected light to cast visible shadows,[20] and is on average the third-brightest natural object in the night sky after the Moon and Venus.
Sample response
Jupiter is the fifth planet from the Sun and is very big and bright. It can be seen with our eyes in the night sky and it has been known since ancient times. Its name comes from the Roman god Jupiter. It is usually the third brightest object in the night sky after the Moon and Venus.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Summarize this for a second-grade student:\n\nJupiter is the fifth planet from the Sun and the largest in the Solar System. It is a gas giant with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter is one of the brightest objects visible to the naked eye in the night sky, and has been known to ancient civilizations since before recorded history. It is named after the Roman god Jupiter.[19] When viewed from Earth, Jupiter can be bright enough for its reflected light to cast visible shadows,[20] and is on average the third-brightest natural object in the night sky after the Moon and Venus.",temperature=0.7,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

4. Natural language to OpenAI API(创建使用自然语言指令调用OpenAI API的代码。)

Prompt
"""
Util exposes the following:
util.openai() -> authenticates & returns the openai module, which has the following functions:
openai.Completion.create(prompt="<my prompt>", # The prompt to start completing frommax_tokens=123, # The max number of tokens to generatetemperature=1.0 # A measure of randomnessecho=True, # Whether to return the prompt in addition to the generated completion
)
"""
import util
"""
Create an OpenAI completion starting from the prompt "Once upon an AI", no more than 5 tokens. Does not include the prompt.
"""
Sample response
openai = util.openai()
completion = openai.Completion.create(prompt="Once upon an AI", max_tokens=5, echo=False)
"""
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="\"\"\"\nUtil exposes the following:\nutil.openai() -> authenticates & returns the openai module, which has the following functions:\nopenai.Completion.create(\n    prompt=\"<my prompt>\", # The prompt to start completing from\n    max_tokens=123, # The max number of tokens to generate\n    temperature=1.0 # A measure of randomness\n    echo=True, # Whether to return the prompt in addition to the generated completion\n)\n\"\"\"\nimport util\n\"\"\"\nCreate an OpenAI completion starting from the prompt \"Once upon an AI\", no more than 5 tokens. Does not include the prompt.\n\"\"\"\n",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\"\"\""]
)

5.Text to command(将文本转换为程序化命令。)

Prompt
Convert this text to a programmatic command:Example: Ask Constance if we need some bread
Output: send-msg `find constance` Do we need some bread?Reach out to the ski store and figure out if I can get my skis fixed before I leave on Thursday
Sample response
send-msg `find ski store` Can I get my skis fixed before I leave on Thursday?
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Convert this text to a programmatic command:\n\nExample: Ask Constance if we need some bread\nOutput: send-msg `find constance` Do we need some bread?\n\nReach out to the ski store and figure out if I can get my skis fixed before I leave on Thursday",temperature=0,max_tokens=100,top_p=1.0,frequency_penalty=0.2,presence_penalty=0.0,stop=["\n"]
)

6.English to other languages(将英语文本翻译成法语、西班牙语和日语。)

Prompt
Translate this into 1. French, 2. Spanish and 3. Japanese:What rooms do you have available?1.
Sample response
Quels sont les chambres que vous avez disponibles?
2. ¿Qué habitaciones tienes disponibles?
3. どの部屋が利用可能ですか?
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Translate this into 1. French, 2. Spanish and 3. Japanese:\n\nWhat rooms do you have available?\n\n1.",temperature=0.3,max_tokens=100,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

7.Natural language to Stripe API(创建使用自然语言调用Stripe API的代码。)

Prompt
"""
Util exposes the following:util.stripe() -> authenticates & returns the stripe module; usable as stripe.Charge.create etc
"""
import util
"""
Create a Stripe token using the users credit card: 5555-4444-3333-2222, expiration date 12 / 28, cvc 521
"""
Sample response
token = stripe.Token.create(
card={"number": "5555-4444-3333-2222","exp_month": 12,"exp_year": 28,"cvc": 521
},
)
"""          
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="\"\"\"\nUtil exposes the following:\n\nutil.stripe() -> authenticates & returns the stripe module; usable as stripe.Charge.create etc\n\"\"\"\nimport util\n\"\"\"\nCreate a Stripe token using the users credit card: 5555-4444-3333-2222, expiration date 12 / 28, cvc 521\n\"\"\"",temperature=0,max_tokens=100,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\"\"\""]
)

8.SQL translate(将自然语言转换为SQL查询语句。)

Prompt
### Postgres SQL tables, with their properties:
#
# Employee(id, name, department_id)
# Department(id, name, address)
# Salary_Payments(id, employee_id, amount, date)
#
### A query to list the names of the departments which employed more than 10 employees in the last 3 months
SELECT
Sample response
 SELECT d.name FROM Department d INNER JOIN Employee e ON d.id = e.department_id INNER JOIN Salary_Payments sp ON e.id = sp.employee_id WHERE sp.date > NOW() - INTERVAL '3 months' GROUP BY d.name HAVING COUNT(*) > 10
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="### Postgres SQL tables, with their properties:\n#\n# Employee(id, name, department_id)\n# Department(id, name, address)\n# Salary_Payments(id, employee_id, amount, date)\n#\n### A query to list the names of the departments which employed more than 10 employees in the last 3 months\nSELECT",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["#", ";"]
)

9.Parse unstructured data(分析非结构化数据,通过指定结构并提供一些示例,从长格式文本创建表。)

Prompt
A table summarizing the fruits from Goocrux:There are many fruits that were found on the recently discovered planet Goocrux. There are neoskizzles that grow there, which are purple and taste like candy. There are also loheckles, which are a grayish blue fruit and are very tart, a little bit like a lemon. Pounits are a bright green color and are more savory than sweet. There are also plenty of loopnovas which are a neon pink flavor and taste like cotton candy. Finally, there are fruits called glowls, which have a very sour and bitter taste which is acidic and caustic, and a pale orange tinge to them.| Fruit | Color | Flavor |
Sample response
| Neoskizzles | Purple | Candy |
| Loheckles | Grayish Blue | Tart, like a lemon |
| Pounits | Bright Green | Savory |
| Loopnovas | Neon Pink | Cotton Candy |
| Glowls | Pale Orange | Sour and Bitter, Acidic and Caustic |
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="A table summarizing the fruits from Goocrux:\n\nThere are many fruits that were found on the recently discovered planet Goocrux. There are neoskizzles that grow there, which are purple and taste like candy. There are also loheckles, which are a grayish blue fruit and are very tart, a little bit like a lemon. Pounits are a bright green color and are more savory than sweet. There are also plenty of loopnovas which are a neon pink flavor and taste like cotton candy. Finally, there are fruits called glowls, which have a very sour and bitter taste which is acidic and caustic, and a pale orange tinge to them.\n\n| Fruit | Color | Flavor |",temperature=0,max_tokens=100,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

10.Classification(通过示例将项目分类。)

Prompt
The following is a list of companies and the categories they fall into:Apple, Facebook, FedexApple
Category:
Sample response
TechnologyFacebook
Category: Social MediaFedex
Category: Delivery
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="The following is a list of companies and the categories they fall into:\n\nApple, Facebook, Fedex\n\nApple\nCategory:",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

11.Python to natural language(用人类可以理解的语言解释一段Python代码。)

Prompt
# Python 3 
def remove_common_prefix(x, prefix, ws_prefix): x["completion"] = x["completion"].str[len(prefix) :] if ws_prefix: # keep the single whitespace as prefix x["completion"] = " " + x["completion"] 
return x # Explanation of what the code does#
Sample response
This code removes a common prefix from a dataframe column containing strings. It takes in the dataframe, the prefix to be removed, and a boolean value indicating whether to keep a single whitespace as a prefix. It then removes the prefix from the dataframe column and, if the boolean value is true, adds a single whitespace as a prefix. Finally, it returns the modified dataframe.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="# Python 3 \ndef remove_common_prefix(x, prefix, ws_prefix): \n    x[\"completion\"] = x[\"completion\"].str[len(prefix) :] \n    if ws_prefix: \n        # keep the single whitespace as prefix \n        x[\"completion\"] = \" \" + x[\"completion\"] \nreturn x \n\n# Explanation of what the code does\n\n#",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

12.Movie to Emoji(将电影标题转换为表情符号。)

Prompt
Convert movie titles into emoji.Back to the Future: 👨👴🚗🕒 
Batman: 🤵🦇 
Transformers: 🚗🤖 
Star Wars:
Sample response
⭐️⚔
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Convert movie titles into emoji.\n\nBack to the Future: 👨👴🚗🕒 \nBatman: 🤵🦇 \nTransformers: 🚗🤖 \nStar Wars:",temperature=0.8,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\n"]
)

13.Calculate Time Complexity(求函数的时间复杂度。)

Prompt
def foo(n, k):
accum = 0
for i in range(n):for l in range(k):accum += i
return accum
"""
The time complexity of this function is
Sample response
O(n*k). This is because the function has two nested for loops, each of which has a time complexity of O(n) and O(k) respectively. Therefore, the total time complexity is the product of the two, which is O(n*k).
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="def foo(n, k):\naccum = 0\nfor i in range(n):\n    for l in range(k):\n        accum += i\nreturn accum\n\"\"\"\nThe time complexity of this function is",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\n"]
)

14.Translate programming languages(要从一种编程语言翻译到另一种编程,我们可以使用注释来指定源语言和目标语言。)

Prompt
##### Translate this function  from Python into Haskell
### Pythondef predict_proba(X: Iterable[str]):return np.array([predict_one_probas(tweet) for tweet in X])### Haskell
Sample response
predictProba :: [String] -> [Double]
predictProba x = map predictOneProbas x
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="##### Translate this function  from Python into Haskell\n### Python\n    \n    def predict_proba(X: Iterable[str]):\n        return np.array([predict_one_probas(tweet) for tweet in X])\n    \n### Haskell",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["###"]
)

15.Advanced tweet classifier(这是一个用于检测情绪的高级提示。它允许您向它提供一个状态更新列表,然后为每个更新提供一种情绪。)

Prompt
Classify the sentiment in these tweets:1. "I can't stand homework"
2. "This sucks. I'm bored 😠"
3. "I can't wait for Halloween!!!"
4. "My cat is adorable ❤️❤️"
5. "I hate chocolate"Tweet sentiment ratings:
Sample response
1. Negative
2. Negative
3. Positive
4. Positive
5. Negative
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Classify the sentiment in these tweets:\n\n1. \"I can't stand homework\"\n2. \"This sucks. I'm bored 😠\"\n3. \"I can't wait for Halloween!!!\"\n4. \"My cat is adorable ❤️❤️\"\n5. \"I hate chocolate\"\n\nTweet sentiment ratings:",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

16.Explain code(解释一段复杂的代码。)

Prompt
class Log:def __init__(self, path):dirname = os.path.dirname(path)os.makedirs(dirname, exist_ok=True)f = open(path, "a+")# Check that the file is newline-terminatedsize = os.path.getsize(path)if size > 0:f.seek(size - 1)end = f.read(1)if end != "\n":f.write("\n")self.f = fself.path = pathdef log(self, event):event["_event_id"] = str(uuid.uuid4())json.dump(event, self.f)self.f.write("\n")def state(self):state = {"complete": set(), "last": None}for line in open(self.path):event = json.loads(line)if event["type"] == "submit" and event["success"]:state["complete"].add(event["id"])state["last"] = eventreturn state"""
Here's what the above class is doing, explained in a concise way:
1.
Sample response
The __init__ method creates a new file at the given path if it doesn't already exist, and ensures that the file is newline-terminated.
2. The log method adds a new event to the log file, with a unique ID.
3. The state method reads the log file and returns a dictionary containing the set of completed tasks and the last successful event.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="class Log:\n    def __init__(self, path):\n        dirname = os.path.dirname(path)\n        os.makedirs(dirname, exist_ok=True)\n        f = open(path, \"a+\")\n\n        # Check that the file is newline-terminated\n        size = os.path.getsize(path)\n        if size > 0:\n            f.seek(size - 1)\n            end = f.read(1)\n            if end != \"\\n\":\n                f.write(\"\\n\")\n        self.f = f\n        self.path = path\n\n    def log(self, event):\n        event[\"_event_id\"] = str(uuid.uuid4())\n        json.dump(event, self.f)\n        self.f.write(\"\\n\")\n\n    def state(self):\n        state = {\"complete\": set(), \"last\": None}\n        for line in open(self.path):\n            event = json.loads(line)\n            if event[\"type\"] == \"submit\" and event[\"success\"]:\n                state[\"complete\"].add(event[\"id\"])\n                state[\"last\"] = event\n        return state\n\n\"\"\"\nHere's what the above class is doing, explained in a concise way:\n1.",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\"\"\""]
)

17.Keywords(从文本块中提取关键字。在较低的温度下,它从文本中挑选关键词。在较高的温度下,它将生成相关的关键字,这有助于创建搜索索引。)

Prompt
Extract keywords from this text:Black-on-black ware is a 20th- and 21st-century pottery tradition developed by the Puebloan Native American ceramic artists in Northern New Mexico. Traditional reduction-fired blackware has been made for centuries by pueblo artists. Black-on-black ware of the past century is produced with a smooth surface, with the designs applied through selective burnishing or the application of refractory slip. Another style involves carving or incising designs and selectively polishing the raised areas. For generations several families from Kha'po Owingeh and P'ohwhóge Owingeh pueblos have been making black-on-black ware with the techniques passed down from matriarch potters. Artists from other pueblos have also produced black-on-black ware. Several contemporary artists have created works honoring the pottery of their ancestors.
Sample response
Keywords: Black-on-black ware, 20th century, 21st century, Puebloan Native American ceramic artists, Northern New Mexico, reduction-fired blackware, pueblo artists, selective burnishing, refractory slip, carving/incising designs, polishing
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Extract keywords from this text:\n\nBlack-on-black ware is a 20th- and 21st-century pottery tradition developed by the Puebloan Native American ceramic artists in Northern New Mexico. Traditional reduction-fired blackware has been made for centuries by pueblo artists. Black-on-black ware of the past century is produced with a smooth surface, with the designs applied through selective burnishing or the application of refractory slip. Another style involves carving or incising designs and selectively polishing the raised areas. For generations several families from Kha'po Owingeh and P'ohwhóge Owingeh pueblos have been making black-on-black ware with the techniques passed down from matriarch potters. Artists from other pueblos have also produced black-on-black ware. Several contemporary artists have created works honoring the pottery of their ancestors.",temperature=0.5,max_tokens=60,top_p=1.0,frequency_penalty=0.8,presence_penalty=0.0
)

18.Factual answering(通过向模型展示如何回答其知识库之外的问题,引导模型进行事实回答。使用“?”表示对不知道的单词和短语的回应提供了一种自然的回应,似乎比更抽象的回应更有效。)

Prompt
Q: Who is Batman?
A: Batman is a fictional comic book character.Q: What is torsalplexity?
A: ?Q: What is Devz9?
A: ?Q: Who is George Lucas?
A: George Lucas is American film director and producer famous for creating Star Wars.Q: What is the capital of California?
A: Sacramento.Q: What orbits the Earth?
A: The Moon.Q: Who is Fred Rickerson?
A: ?Q: What is an atom?
A: An atom is a tiny particle that makes up everything.Q: Who is Alvan Muntz?
A: ?Q: What is Kozar-09?
A: ?Q: How many moons does Mars have?
A: Two, Phobos and Deimos.Q: What's a language model?
A:
Sample response
A language model is a type of artificial intelligence that uses statistical techniques to predict the probability of a sequence of words.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Q: Who is Batman?\nA: Batman is a fictional comic book character.\n\nQ: What is torsalplexity?\nA: ?\n\nQ: What is Devz9?\nA: ?\n\nQ: Who is George Lucas?\nA: George Lucas is American film director and producer famous for creating Star Wars.\n\nQ: What is the capital of California?\nA: Sacramento.\n\nQ: What orbits the Earth?\nA: The Moon.\n\nQ: Who is Fred Rickerson?\nA: ?\n\nQ: What is an atom?\nA: An atom is a tiny particle that makes up everything.\n\nQ: Who is Alvan Muntz?\nA: ?\n\nQ: What is Kozar-09?\nA: ?\n\nQ: How many moons does Mars have?\nA: Two, Phobos and Deimos.\n\nQ: What's a language model?\nA:",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

19.Ad from product description(将产品描述转化为广告文案。)

Prompt
Write a creative ad for the following product to run on Facebook aimed at parents:Product: Learning Room is a virtual environment to help students from kindergarten to high school excel in school.
Sample response
Are you looking for a way to give your child a head start in school? Look no further than Learning Room! Our virtual environment is designed to help students from kindergarten to high school excel in their studies. Our unique platform offers personalized learning plans, interactive activities, and real-time feedback to ensure your child is getting the most out of their education. Give your child the best chance to succeed in school with Learning Room!
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Write a creative ad for the following product to run on Facebook aimed at parents:\n\nProduct: Learning Room is a virtual environment to help students from kindergarten to high school excel in school.",temperature=0.5,max_tokens=100,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

20.Product name generator(根据示例单词创建产品名称。受community prompt的影响。)

Prompt
Product description: A home milkshake maker
Seed words: fast, healthy, compact.
Product names: HomeShaker, Fit Shaker, QuickShake, Shake MakerProduct description: A pair of shoes that can fit any foot size.
Seed words: adaptable, fit, omni-fit.
Sample response
Product names: AdaptFit, OmniSecure, Fit-All, AdaptShoes.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Product description: A home milkshake maker\nSeed words: fast, healthy, compact.\nProduct names: HomeShaker, Fit Shaker, QuickShake, Shake Maker\n\nProduct description: A pair of shoes that can fit any foot size.\nSeed words: adaptable, fit, omni-fit.",temperature=0.8,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

21.TL;DR summarization(通过添加 ‘tl;dr:’ 到一段文字的末尾。这表明API了解如何在没有指令的情况下执行许多任务。)

Prompt
A neutron star is the collapsed core of a massive supergiant star, which had a total mass of between 10 and 25 solar masses, possibly more if the star was especially metal-rich.[1] Neutron stars are the smallest and densest stellar objects, excluding black holes and hypothetical white holes, quark stars, and strange stars.[2] Neutron stars have a radius on the order of 10 kilometres (6.2 mi) and a mass of about 1.4 solar masses.[3] They result from the supernova explosion of a massive star, combined with gravitational collapse, that compresses the core past white dwarf star density to that of atomic nuclei.Tl;dr
Sample response
Neutron stars are the collapsed cores of massive supergiant stars, with a radius of around 10 kilometres and a mass of 1.4 solar masses. They are formed from the supernova explosion of a massive star combined with gravitational collapse, compressing the core beyond white dwarf star density.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="A neutron star is the collapsed core of a massive supergiant star, which had a total mass of between 10 and 25 solar masses, possibly more if the star was especially metal-rich.[1] Neutron stars are the smallest and densest stellar objects, excluding black holes and hypothetical white holes, quark stars, and strange stars.[2] Neutron stars have a radius on the order of 10 kilometres (6.2 mi) and a mass of about 1.4 solar masses.[3] They result from the supernova explosion of a massive star, combined with gravitational collapse, that compresses the core past white dwarf star density to that of atomic nuclei.\n\nTl;dr",temperature=0.7,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=1
)

22.Python bug fixer(有很多方法可以构造用于检查错误的prompt。在这里,我们添加了一条注释,表明源代码有缺陷,然后要求codex生成一个固定的代码。)

Prompt
##### Fix bugs in the below function### Buggy Python
import Random
a = random.randint(1,12)
b = random.randint(1,12)
for i in range(10):question = "What is "+a+" x "+b+"? "answer = input(question)if answer = a*bprint (Well done!)else:print("No.")### Fixed Python
Sample response
import random
a = random.randint(1,12)
b = random.randint(1,12)
for i in range(10):question = "What is "+str(a)+" x "+str(b)+"? "answer = int(input(question))if answer == a*b:print ("Well done!")else:print("No.")
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="##### Fix bugs in the below function\n \n### Buggy Python\nimport Random\na = random.randint(1,12)\nb = random.randint(1,12)\nfor i in range(10):\n    question = \"What is \"+a+\" x \"+b+\"? \"\n    answer = input(question)\n    if answer = a*b\n        print (Well done!)\n    else:\n        print(\"No.\")\n    \n### Fixed Python",temperature=0,max_tokens=182,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["###"]
)

23.Spreadsheet creator(创建各种数据的电子表格。这是一个很长的prompt,但非常通用。输出可以复制+粘贴到文本文件中,并保存为带有pipe 分隔符的.csv文件。)

Prompt
A two-column spreadsheet of top science fiction movies and the year of release:Title |  Year of release
Sample response
Alien | 1979 
Blade Runner | 1982 
The Terminator | 1984 
The Matrix | 1999 
Avatar | 2009 
Interstellar | 2014 
Ex Machina | 2015 
Arrival | 2016 
Ready Player One | 2018
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="A two-column spreadsheet of top science fiction movies and the year of release:\n\nTitle |  Year of release",temperature=0.5,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

24.JavaScript helper chatbot(这是一个消息风格的聊天机器人,可以回答有关使用JavaScript的问题。它使用了几个例子来开始对话。)

Prompt
You: How do I combine arrays?
JavaScript chatbot: You can use the concat() method.
You: How do you make an alert appear after 10 seconds?
JavaScript chatbot
Sample response
: You can use the setTimeout() method to make an alert appear after 10 seconds.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="You: How do I combine arrays?\nJavaScript chatbot: You can use the concat() method.\nYou: How do you make an alert appear after 10 seconds?\nJavaScript chatbot",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.5,presence_penalty=0.0,stop=["You:"]
)

25.ML/AI language model tutor.(这是一个QA风格的聊天机器人,可以回答有关语言模型的问题。)

Prompt
ML Tutor: I am a ML/AI language model tutor
You: What is a language model?
ML Tutor: A language model is a statistical model that describes the probability of a word given the previous words.
You: What is a statistical model?
Sample response
ML Tutor: A statistical model is a mathematical representation of a real-world phenomenon. It is used to make predictions or decisions based on data. Statistical models use probability and statistics to make inferences about the data.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="ML Tutor: I am a ML/AI language model tutor\nYou: What is a language model?\nML Tutor: A language model is a statistical model that describes the probability of a word given the previous words.\nYou: What is a statistical model?",temperature=0.3,max_tokens=60,top_p=1.0,frequency_penalty=0.5,presence_penalty=0.0,stop=["You:"]
)

26.Science fiction book list maker(这是一个科幻小说的列表,当它达到第10名时就会停止。)

Prompt
List 10 science fiction books:
Sample response
1. 1984 by George Orwell
2. The War of the Worlds by H.G. Wells
3. Dune by Frank Herbert
4. Frankenstein by Mary Shelley
5. Ender's Game by Orson Scott Card
6. The Hitchhiker's Guide to the Galaxy by Douglas Adams
7. The Martian Chronicles by Ray Bradbury
8. Brave New World by Aldous Huxley 
9. Do Androids Dream of Electric Sheep? By Philip K Dick 
10. I, Robot by Isaac Asimov
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="List 10 science fiction books:",temperature=0.5,max_tokens=200,top_p=1.0,frequency_penalty=0.52,presence_penalty=0.5,stop=["11."]
)

27.Tweet classifier(这是检测情绪的基本Prompt。)

Prompt
Decide whether a Tweet's sentiment is positive, neutral, or negative.Tweet: "I loved the new Batman movie!"
Sentiment:
Sample response
Positive
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Decide whether a Tweet's sentiment is positive, neutral, or negative.\n\nTweet: \"I loved the new Batman movie!\"\nSentiment:",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.5,presence_penalty=0.0
)

28.Airport code extractor(从文本中提取机场代码的简单Prompt。)

Prompt
Extract the airport codes from this text:Text: "I want to fly from Los Angeles to Miami."
Airport codes: LAX, MIAText: "I want to fly from Orlando to Boston"
Airport codes:
Sample response
MCO, BOS
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Extract the airport codes from this text:\n\nText: \"I want to fly from Los Angeles to Miami.\"\nAirport codes: LAX, MIA\n\nText: \"I want to fly from Orlando to Boston\"\nAirport codes:",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["\n"]
)

29.SQL request(创建简单的SQL查询。)

Prompt
Create a SQL request to find all users who live in California and have over 1000 credits:
Sample response
SELECT *
FROM users
WHERE state = 'California' AND credits > 1000;
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Create a SQL request to find all users who live in California and have over 1000 credits:",temperature=0.3,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

30.Extract contact information(从文本块中提取联系人信息。)

Prompt
Extract the name and mailing address from this email:Dear Kelly,It was great to talk to you at the seminar. I thought Jane's talk was quite good.Thank you for the book. Here's my address 2111 Ash Lane, Crestview CA 92002Best,MayaName:
Sample response
Maya
Mailing Address: 2111 Ash Lane, Crestview CA 92002
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Extract the name and mailing address from this email:\n\nDear Kelly,\n\nIt was great to talk to you at the seminar. I thought Jane's talk was quite good.\n\nThank you for the book. Here's my address 2111 Ash Lane, Crestview CA 92002\n\nBest,\n\nMaya\n\nName:",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

31.JavaScript to Python(将简单的JavaScript表达式转换为Python。)

Prompt
#JavaScript to Python:
JavaScript: 
dogs = ["bill", "joe", "carl"]
car = []
dogs.forEach((dog) {car.push(dog);
});Python:
Sample response
dogs = ["bill", "joe", "carl"]
car = []
for dog in dogs:car.append(dog)
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="#JavaScript to Python:\nJavaScript: \ndogs = [\"bill\", \"joe\", \"carl\"]\ncar = []\ndogs.forEach((dog) {\n    car.push(dog);\n});\n\nPython:",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

32.Friend chat(模拟短信对话。)

Prompt
You: What have you been up to?
Friend: Watching old movies.
You: Did you watch anything interesting?
Friend:
Sample response
Yeah, I watched an old classic called Casablanca. It was really good!
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="You: What have you been up to?\nFriend: Watching old movies.\nYou: Did you watch anything interesting?\nFriend:",temperature=0.5,max_tokens=60,top_p=1.0,frequency_penalty=0.5,presence_penalty=0.0,stop=["You:"]
)

33.Mood to color(将文本描述转换为颜色。)

Prompt
The CSS code for a color like a blue sky at dusk:background-color: #
Sample response
3A5F9F

https://www.color-hex.com/color/3a5f9f
在这里插入图片描述

Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="The CSS code for a color like a blue sky at dusk:\n\nbackground-color: #",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=[";"]
)

34.Write a Python docstring(如何为给定的Python函数创建文档字符串的示例。我们指定Python版本,粘贴代码,然后在注释中询问文档字符串,并给出文档字符串的特征开头(“”)。)

Prompt
# Python 3.7def randomly_split_dataset(folder, filename, split_ratio=[0.8, 0.2]):df = pd.read_json(folder + filename, lines=True)train_name, test_name = "train.jsonl", "test.jsonl"df_train, df_test = train_test_split(df, test_size=split_ratio[1], random_state=42)df_train.to_json(folder + train_name, orient='records', lines=True)df_test.to_json(folder + test_name, orient='records', lines=True)
randomly_split_dataset('finetune_data/', 'dataset.jsonl')# An elaborate, high quality docstring for the above function:
"""
Sample response
""" This function randomly splits a dataset into two parts, a training set and a test set, according to a given split ratio.Parameters:folder (str): The path to the folder containing the dataset.filename (str): The name of the dataset file.split_ratio (list): A list of two floats representing the ratio of the training set and the test set.Returns:None
"""
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="# Python 3.7\n \ndef randomly_split_dataset(folder, filename, split_ratio=[0.8, 0.2]):\n    df = pd.read_json(folder + filename, lines=True)\n    train_name, test_name = \"train.jsonl\", \"test.jsonl\"\n    df_train, df_test = train_test_split(df, test_size=split_ratio[1], random_state=42)\n    df_train.to_json(folder + train_name, orient='records', lines=True)\n    df_test.to_json(folder + test_name, orient='records', lines=True)\nrandomly_split_dataset('finetune_data/', 'dataset.jsonl')\n    \n# An elaborate, high quality docstring for the above function:\n\"\"\"",temperature=0,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=["#", "\"\"\""]
)

35.Analogy maker(创建类比。从community Prompt修改为需要更少的示例。)

Prompt
Create an analogy for this phrase:Questions are arrows in that:
Sample response
Questions are like arrows in that they both have the power to pierce through the surface and uncover the truth that lies beneath.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Create an analogy for this phrase:\n\nQuestions are arrows in that:",temperature=0.5,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

36.JavaScript one line function(将一个JavaScript函数转换为一行代码。)

Prompt
Use list comprehension to convert this into one line of JavaScript:dogs.forEach((dog) => {car.push(dog);
});JavaScript one line version:
Sample response
[dogs.forEach(dog => car.push(dog))]
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Use list comprehension to convert this into one line of JavaScript:\n\ndogs.forEach((dog) => {\n    car.push(dog);\n});\n\nJavaScript one line version:",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0,stop=[";"]
)

37.Micro horror story creator(根据主题输入创建两到三个句子的恐怖短篇故事。)

Prompt
Topic: Breakfast
Two-Sentence Horror Story: He always stops crying when I pour the milk on his cereal. I just have to remember not to let him see his face on the carton.Topic: Wind
Two-Sentence Horror Story:
Sample response
The wind howled through the night, shaking the windows of the house with a sinister force. As I stepped outside, I could feel it calling out to me, beckoning me to follow its chilling path.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Topic: Breakfast\nTwo-Sentence Horror Story: He always stops crying when I pour the milk on his cereal. I just have to remember not to let him see his face on the carton.\n    \nTopic: Wind\nTwo-Sentence Horror Story:",temperature=0.8,max_tokens=60,top_p=1.0,frequency_penalty=0.5,presence_penalty=0.0
)

38.Third-person converter(将第一人称POV转换为第三人称。这是从community prompt中修改的,以使用更少的示例。)

Prompt
Convert this from first-person to third person (gender female):I decided to make a movie about Ada Lovelace.
Sample response
She decided to make a movie about Ada Lovelace.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Convert this from first-person to third person (gender female):\n\nI decided to make a movie about Ada Lovelace.",temperature=0,max_tokens=60,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

39.Notes to summary(将会议笔记转化为摘要。)

Prompt
Convert my short hand into a first-hand account of the meeting:Tom: Profits up 50%
Jane: New servers are online
Kjel: Need more time to fix software
Jane: Happy to help
Parkman: Beta testing almost done
Sample response
At the meeting, Tom reported that profits had increased by 50%. Jane then mentioned that the new servers were online. Kjel mentioned that they needed more time to fix the software, and Jane offered to help. Finally, Parkman reported that the beta testing was almost done.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Convert my short hand into a first-hand account of the meeting:\n\nTom: Profits up 50%\nJane: New servers are online\nKjel: Need more time to fix software\nJane: Happy to help\nParkman: Beta testing almost done",temperature=0,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

40.VR fitness idea generator(为健身和虚拟现实游戏创造创意。)

Prompt
Brainstorm some ideas combining VR and fitness:
Sample response
1. Virtual reality-based fitness classes 
2. Home workout programs using virtual reality technology 
3. Interactive video game-style workouts with a virtual trainer 
4. Virtual running races against other players in VR worlds 
5. Immersive yoga and Pilates sessions set in exotic locations 
6. Sports simulations involving simulated physical activity within the VR world 
7. Group fitness challenges that involve competing against opponents in a virtual environment  
8. Adaptive exercise programs tailored to individual’s goals or health conditions
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Brainstorm some ideas combining VR and fitness:",temperature=0.6,max_tokens=150,top_p=1.0,frequency_penalty=1,presence_penalty=1
)

41.Essay outline(为研究主题生成大纲。)

Prompt
Create an outline for an essay about Nikola Tesla and his contributions to technology:
Sample response
I. Introduction
A. Who was Nikola Tesla?
B. Overview of his contributions to technologyII. Early Life and Education
A. Where and when Tesla was born
B. His education and early careerIII. Tesla's Contributions to Technology
A. Alternating Current
B. Radio and Remote Control
C. Robotics
D. X-RaysIV. Tesla's Later Years
A. His later inventions
B. His death and legacyV. Conclusion
A. Summary of Tesla's life and accomplishments
B. Impact of Tesla's work on modern technology
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Create an outline for an essay about Nikola Tesla and his contributions to technology:",temperature=0.3,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

42.Recipe creator (根据配料列表创建食谱。吃东西的风险自负。)

Prompt
Write a recipe based on these ingredients and instructions:Frito PieIngredients:
Fritos
Chili
Shredded cheddar cheese
Sweet white or red onions, diced small
Sour creamInstructions:
Sample response
1. Preheat oven to 350 degrees F.2. Spread a layer of Fritos in the bottom of a 9x13 inch baking dish.3. Top the Fritos with a layer of chili.4. Sprinkle the chili with shredded cheddar cheese.5. Sprinkle the cheese with diced onions.6. Bake in preheated oven for 25 minutes.7. Remove from oven and top with a dollop of sour cream.8. Serve warm. Enjoy!
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Write a recipe based on these ingredients and instructions:\n\nFrito Pie\n\nIngredients:\nFritos\nChili\nShredded cheddar cheese\nSweet white or red onions, diced small\nSour cream\n\nInstructions:",temperature=0.3,max_tokens=120,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

43.Chat(与人工智能助理进行开放式对话。)

Prompt
The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.Human: Hello, who are you?
AI: I am an AI created by OpenAI. How can I help you today?
Human: I'd like to cancel my subscription.
AI:
Sample response
I understand, I can help you with canceling your subscription. Please provide me with your account details so that I can begin processing the cancellation.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: I'd like to cancel my subscription.\nAI:",temperature=0.9,max_tokens=150,top_p=1,frequency_penalty=0.0,presence_penalty=0.6,stop=[" Human:", " AI:"]
)

44.Marv the sarcastic chat bot(语法校正)

Prompt
Marv is a chatbot that reluctantly answers questions with sarcastic responses:You: How many pounds are in a kilogram?
Marv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.
You: What does HTML stand for?
Marv: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.
You: When did the first airplane fly?
Marv: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away.
You: What is the meaning of life?
Marv: I’m not sure. I’ll ask my friend Google.
You: What time is it?
Marv:
Sample response
It's always time to learn something new. Check your watch for the actual time.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Marv is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nMarv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nMarv: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nMarv: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away.\nYou: What is the meaning of life?\nMarv: I’m not sure. I’ll ask my friend Google.\nYou: What time is it?\nMarv:",temperature=0.5,max_tokens=60,top_p=0.3,frequency_penalty=0.5,presence_penalty=0.0
)

45.Turn by turn directions(将自然语言转换为逐转弯方向。)

Prompt
Create a numbered list of turn-by-turn directions from this text: Go south on 95 until you hit Sunrise boulevard then take it east to us 1 and head south. Tom Jenkins bbq will be on the left after several miles.
Sample response
1. Go south on 95 
2. Take Sunrise Boulevard east 
3. Head south on US 1 
4. Tom Jenkins BBQ will be on the left after several miles
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Create a numbered list of turn-by-turn directions from this text: \n\nGo south on 95 until you hit Sunrise boulevard then take it east to us 1 and head south. Tom Jenkins bbq will be on the left after several miles.",temperature=0.3,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

46.Restaurant review creator(把几个单词变成餐厅评论。)

Prompt
Write a restaurant review based on these notes:Name: The Blue Wharf
Lobster great, noisy, service polite, prices good.Review:
Sample response
I recently visited The Blue Wharf and had a wonderful experience. The lobster was excellent and the prices were very good. The only downside was the noise level, but the polite service more than made up for it. Highly recommend!
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Write a restaurant review based on these notes:\n\nName: The Blue Wharf\nLobster great, noisy, service polite, prices good.\n\nReview:",temperature=0.5,max_tokens=64,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

47.Create study notes(提供一个主题并获取学习笔记。)

Prompt
What are 5 key points I should know when studying Ancient Rome?
Sample response
1. Understand the Roman Republic and its political and social structures.
2. Learn about the major events and people of the Roman Empire, including the Pax Romana.
3. Familiarize yourself with Roman culture and society, including language, art, architecture, literature, law, and religion.
4. Study the Roman military, its tactics and organization, and its effects on the empire.
5. Examine the decline of the Roman Empire, its eventual fall, and its legacy.
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="What are 5 key points I should know when studying Ancient Rome?",temperature=0.3,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

48.Interview questions(创建面试问题。)

Prompt
Create a list of 8 questions for my interview with a science fiction author:
Sample response
1. What inspired you to write science fiction?
2. What themes do you typically explore in your work?
3. How has the genre of science fiction evolved over time?
4. What do you think sets your work apart from other science fiction authors?
5. What advice would you give to aspiring science fiction authors?
6. What are some of the most challenging aspects of writing science fiction?
7. How has your writing process changed over the years?
8. What do you think is the most important thing for readers to take away from your work?
Settings

在这里插入图片描述

Api request
import os
import openaiopenai.api_key = os.getenv("OPENAI_API_KEY")response = openai.Completion.create(model="text-davinci-003",prompt="Create a list of 8 questions for my interview with a science fiction author:",temperature=0.5,max_tokens=150,top_p=1.0,frequency_penalty=0.0,presence_penalty=0.0
)

参考

chatgpt-prompts-中文翻译版
prompts.chat
Examples
api-reference
Documentation

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

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

相关文章

在pycharm中使用chatgpt

目录 前言 一、插件安装 二、使用步骤 总结 前言 ChatGPT是目前最强大的AI&#xff0c;不仅能够聊天、写小说&#xff0c;甚至码代码也不在话下。 但是在国内要使用chatgpt很麻烦&#xff0c;国内一家团队开发了一款idea插件NexChatGPT&#xff0c;用数据代理的方式&…

轻松拆书,制作思维导图:ChatGPT一键生成

大家好&#xff0c;我是瓜叔。 在日常工作中&#xff0c;思维导图已成为必不可少的一部分。通常情况下&#xff0c;我们会使用XMind或其他工具进行思维导图的制作。而在ChatGPT中&#xff0c;我们同样可以制作思维导图。我们可以使用ChatGPT基于某个事物进行思维导图的快速制作…

颠覆传统网文?有人已经用ChatGPT写书,放网上卖了第一桶金!

编&#xff5c;杜伟、泽南 源&#xff5c;机器之心 以前的产业革命&#xff0c;人是最重要的一环。但人工智能直接替代人类本身&#xff1f; ChatGPT 的火热一直延续到了现在&#xff0c;对话、写代码&#xff0c;无一不通。如今&#xff0c;使用 ChatGPT 撰写书籍又引起了人们…

所有知识付费都可以用 ChatGPT 再割一次?

伴随春天一起到来的&#xff0c;还有如雨后春笋般冒出的 ChatGPT / AI 相关的付费社群、课程训练营、知识星球等。 ChatGPT 吹来的这股 AI 热潮&#xff0c;这几个月想必大家多多少少都能感受到。 ▲ 图片来源&#xff1a;网络 这两张图是最近在圈子里看到的。 一张是国内各…

引起世界轰动后,ChatGPT准备推出付费版服务

来源&#xff1a;AI前线 整理&#xff1a;凌敏、核子可乐 火爆全网、惊艳科技界&#xff0c;“顶流”ChatGPT 也开始琢磨赚钱了。 OpenAI 准备推出付费版 ChatGPT 据外媒报道&#xff0c;OpenAI 本周表示将推出付费版 ChatGPT—— ChatGPT 专业版&#xff0c;但目前还没有制定售…

ChatGPT这么强大吗

ChatGPT和它带来的AI时代是一次新的科技革命&#xff0c;AI时代就此拉开序幕&#xff0c;我们必须紧跟时代&#xff0c;否则就会被时代抛弃。本星球分享chatgpt的最前沿应用和实战案例&#xff0c;同时会定期邀请业内大佬做分享。 为什么AI时代很恐怖&#xff0c;现在我们看到的…

泰安柒柒:如何用ChatGPT回答国外问卷的开放题?

大家好&#xff0c;我们在做国外问卷的时候经常会遇到一些棘手的开放题&#xff0c;尤其是我们批量去做的时候&#xff0c;如果答案都一样&#xff0c;极有可能会导致不下卡。一般我们遇到开放题都是用百度谷歌等浏览器去搜题的。这种方式其实是比较繁琐的&#xff0c;不仅要搜…

笑疯!外国小哥用ChatGPT完成80%工作,同时打4份工

大家好&#xff01;我是韩老师。 之前和大家聊了聊&#xff1a;未来&#xff0c;ChatGPT/Copilot 会让程序员失业吗&#xff1f; 但其实呢&#xff0c;ChatGPT 远远不只是影响程序员这一个行业&#xff0c;而是会改变很多的行业。 也许 ChatGPT 不能完全替代一个人&#xff0c;…

国外各大学和学院对于ChatGPT使用立场总结

ChatGPT和生成式AI的快速普及对教育这个专业领域带来了威胁——全国各地的大学和学院都召开了紧急会议&#xff0c;讨论如何应对学生利用AI作弊的风险。 一部分学校和教授担心这项技术会成为学生在论文或其他写作作业和考试中寻求捷径的工具。而这种生成内容的方式往往能够绕开…

国外ChatGPT横空出世,国内无代码开发一样惊人,旗鼓相当

ChatGPT火爆了&#xff0c;究竟是什么&#xff1f; 有些人以为ChatGPT&#xff0c;只是更先进的人工智能聊天工具罢了。它除了能学习与理解人类对话语言&#xff0c;还能结合下文“思考”&#xff0c;实现与人类正常交流。 这款由美国OpenAI研发的人工智能技术&#xff0c;202…

支持绘画-教你部署一个属于自己的chatgpt网站-收费版(源码)

废话不多少&#xff0c;上截图源码 支持绘画 前端页面 后端管理 源码下载链接&#xff1a; https://wwhj.lanzoue.com/b04jyfwza 密码:3csb

最新ChatGPT网站源码V4.7.8+支持Ai绘画+ChatGPT商业运营版+管理后台+支持用户套餐+好友邀请功能+一键在线更新+永久使用!

最新ChatGPT网站源码V4.7.8支持Ai绘画ChatGPT商业运营版管理后台支持用户套餐好友邀请功能一键在线更新永久使用&#xff01; 如果后续程序有新版&#xff0c;直接在后台一键更新即可 程序完美运行无BUG&#xff0c;独家开发&#xff0c;支持6种会员开通模式&#xff0c;有:”购…

ChatGPT网站源码商业运营版/支持GPT4/支持ai绘画/后台管理/支持用户会员套餐次数/后台管理/永久更新

ChatGPT网站源码商用运营版/支持GPT4/支持ai绘画(Midjourney)/后台管理/支持用户会员套餐次数。 新增支持GPT4和Midjourney绘画&#xff0c;正版授权永久更新&#xff0c;前端UI可二次开发&#xff01; 支持手机电脑不同布局页面自适应。 ChatGPT网站系统商用运营版&#xff1…

ChatGPT-Next-Web: 使用Vercel快速部署一个属于自己的 ChatGPT 网站服务

今天给大家推荐一个非常好用的开源项目&#xff1a;ChatGPT-Next-Web 这个开源项目可以做到一键免费部署你的私人 ChatGPT 网页应用。只需要部署到Vercel&#xff0c;使用Vercel绑定自己购买的域名&#xff0c;或者配合Cloudflare自定义域名中转&#xff0c;之后就可以在国内网…

2023 ChatGPT网站源码 v2.0 支持付费

第一步-配置APIKEY:在"index.php"最顶部配置自己的APIKEY&#xff0c;不然网站无法使用&#xff01; 第一步-配置数据库:lib/config.php 第三步-导入数据库 第四步-PHP选择:7.3 第五步-访问网页即可&#xff01;

chatgpt如何搭建一个自己的网站,请看源码。

找了一套chatgpt搭建的源码&#xff0c;修改自己的key就能使用 效果如下&#xff0c;再也不用去挤外网里&#xff0c;舒服。 源码 ➕ wengjunda 可以拿取&#xff0c;是php的 key的申请 尾声 我们就已经能通过服务器访问刚刚搭建的 ChatGPT 了&#xff0c;记得设置访问密码啥…

ChatGPT网站源码V4.7.9+支持Ai绘画+支持用户套餐+好友邀请功能+管理后台+一键在线更新+永久更新!

ChatGPT网站源码V4.7.9支持Ai绘画支持用户套餐好友邀请功能管理后台一键在线更新永久更新&#xff01; 程序完美运行无BUG&#xff0c;独家开发&#xff0c;支持6种会员开通模式&#xff0c;有:”购买提问次数”或者”开通月付会员”套餐等等 套餐次数和价格可以自定义在后台进…

让你不用亲自写文章的网站 + chatgpt网站收录【持续更新】

1.AI文本工具站 https://laicj.cn/ 不仅可以与chatgpt对话&#xff0c;还可以生成周报、大纲、代码等&#xff0c;不用登录和注册&#xff01; 2.彩云小梦 https://if.caiyunai.com/dashboard/novels 帮你续写自己的文章 3.AiDuTu https://chat.aidutu.cn 目前能直接访问和使用…

使用fofa搜索chatgpt网站使用

1、fofa搜索关键词 "loading-wrap" && "balls" && "chat" && is_domaintrue 搜索结果如下所示: 提取结果: https://chat.lovepcos.cn Swimming Pool & Spa Supplies at YourPoolHQ.com https://chat.chenghaha…

最新ChatGPT网站源码运营版+支持ai绘画+GPT4.0

1.网站系统源码介绍&#xff1a; 2023最新ChatGPT网站源码支持ChatGPT4.0支持Midjourney绘画用户会员套餐用户每日签到领取后台管理一键更新版本&#xff0c;支持手机电脑不同布局页面自适应。 ChatGPT提问&#xff1a; ChatGPT-AI付费创作系统&#xff1a; 如果后续程序有…