openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
{"role": "user", "content": "Where was it played?"}
]
)
看文档就是把过往的问答都累加起来作为输入
【 在 idealid 的大作中提到: 】
: 标 题: gpt是怎么实现短期记忆功能的呢
: 发信站: 水木社区 (Tue Mar 28 01:40:39 2023), 站内
:
: 训练集是长期记忆,对话是短期记忆,怎么区分呢
:
: - 来自 水木社区APP v3.5.7
: --
:
:
: ※ 来源:·
https://exp.mysmth.net·[FROM: 125.71.133.*]
--
FROM 157.255.208.*