图表内容
图9:ChatGPT及Whisper API调用部署简便
conpletion openai.ChatConpletion.create(
model="gpt-3.5-turbo"
nessages=[[role":"user"
"content":"Tell the world about the ChatGPT API
print(completion)
inport openai
file open("/path/to/file/openai.mp3"
"rb")
transcription openai.Audio.transcribe(whisper-1"
file)
print(transcription)
资料来源:OpenAl官网,国信证券经济研究所整理