英語到其他語言 - 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