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

本文链接:https://my.lmcjl.com/post/6223.html

展开阅读全文

4 评论

留下您的评论.