英语到其他语言 - ChatGPT应用实例
将英语文本翻译成法语、西班牙语和日语。
提示
将其翻译成 1. 法语、2. 西班牙语和 3. 日语:
What rooms do you have available?
1.
示例回答
Quels sont les chambres que vous avez disponibles?
2. ¿Quéhabitaciones tienes disponibles?
3. どの部屋が可以利用ですか吗?
这是 转换 分类的页面,点击下面标题查看详细文章内容:
将英语文本翻译成法语、西班牙语和日语。
提示
将其翻译成 1. 法语、2. 西班牙语和 3. 日语:
What rooms do you have available?
1.
示例回答
Quels sont les chambres que vous avez disponibles?
2. ¿Quéhabitaciones tienes disponibles?
3. どの部屋が可以利用ですか吗?
将文本转化为编程命令。
提示
将以下文本转化为编程命令:
示例:问Constance我们是否需要一些面包
输出:send-msg `find constance` 我们是否需要一些面包?联系滑雪用品店,看看我能否在周四离开之前修理我的滑雪板
示例回答
send-msg `find ski store` 我能在周四离开之前修理我的滑雪板吗?
使用自然语言指令创建调用OpenAI API的代码。
提示
"""
Util暴露以下内容:
util.openai() -> 验证并返回openai模块,其中包含以下函数:
openai.Completion.create(
prompt="<我的提示>", # 要从哪个提示开始生成
max_tokens=123, # 生成的最大令牌数量
temperature=1.0, # 随机性的度量
echo=True, # 是否返回生成的完成文本以及提示
)
"""
import util
"""
创建一个OpenAI完成,从提示"Once upon an AI"开始,最多使用5个令牌。不包括提示本身。
"""
示例回答
openai = util.openai()
completion = openai.Completion.create(prompt="Once upon an AI", max_tokens=5, echo=False)
"""
将复杂的文字转化为简单的概念。
提示
用二年级学生能理解的语言概括以下内容:
Jupiter是离太阳最近的第五颗行星,也是太阳系中最大的行星。它是一颗气体巨星,质量仅为太阳的千分之一,但是比太阳系中所有其他行星的质量加起来还要大两倍半。Jupiter在夜空中是肉眼可见的最亮的物体之一,自古以来就为古代文明所知。它的名字来自罗马神话中的主神朱庇特。从地球上观察,Jupiter的亮度足够强,可以产生可见的阴影。在夜空中,它通常是仅次于月亮和金星的第三亮的天体。
示例回答
Jupiter是距离太阳第五远的行星,非常大而明亮。我们可以在夜空中用肉眼看到它,古人们很早就知道了它的存在。它的名字来源于罗马神话中的主神朱庇特。通常情况下,它是在夜空中仅次于月亮和金星的第三亮的物体。
2022年7月20日补充:
API请求
{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "Summarize content you are provided with for a second-grade student."
},
{
"role": "user",
"content": "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."
}
],
"temperature": 0,
"max_tokens": 1024
}
2002-2023 v11.7 a-j-e-0