赞
踩
import openai
# Set up the OpenAI API client
openai.api_key = "你的KEY"
# Set up the model and prompt
model_engine = "ada"
prompt = input('请输入字符串:')
# Generate a response
completion = openai.Completion.create(
engine=model_engine,
prompt=prompt,
max_tokens=1024,
n=1,
stop=None,
temperature=0.5,
)
response = completion.choices[0].text
print(response)
ChatGPT国内体验网址 https://1bit.asia
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。