ChatGPT插件例子 帮助二年级学生写文章总结
将困难的文本翻译成更简单的概念。
提示:
给二年级的学生总结一下:
木星是距离太阳第五大的行星,也是太阳系中最大的行星。它是一颗气体巨星,质量是太阳的千分之一,但是太阳系所有其他行星总和的2.5倍。木星是夜空中肉眼可见的最亮的物体之一,在有记录的历史之前,古代文明就已经知道了。它是以罗马神朱庇特的名字命名的。[19] 从地球上看,木星的亮度足以使其反射光投射出可见的阴影[20],平均而言,它是夜空中仅次于月球和金星的第三亮的自然物体。
回答:
木星是距离太阳第五大的行星,非常大且明亮。它可以在夜空中用我们的眼睛看到,自古就为人所知。它的名字来自罗马神朱庇特。它通常是夜空中第三亮的物体,仅次于月亮和金星。
import os
import openai
openai.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
)