聊天完成
介绍
# Note: you need to be using OpenAI Python v0.27.0 for the code below to work
import openai
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?"}
]
)响应格式
管理词元
指导聊天模型
聊天与完成
FAQ
GPT-3.5 Turbo是否支持微调?
您是否会存储通过API传递的数据?
如何添加内容审核层?
最后更新于