diff --git a/chatgpt_post.py b/chatgpt_post.py index ca3d5da..4fe7864 100644 --- a/chatgpt_post.py +++ b/chatgpt_post.py @@ -33,24 +33,3 @@ print(res["choices"][0]["message"]["content"]) -OPENAI_API_KEY = api_key - - url = "https://api.openai.com/v1/chat/completions" - headers = { - "Content-Type": "application/json", - "Authorization": f"Bearer {OPENAI_API_KEY}" - } - data = { - "model": "gpt-3.5-turbo", - "messages": [ - {"role": "user", "content": "请帮我改写这句话:在城市发展进程当中,逐渐呈现出一些综合性的大型建筑群。"}, - {"role": "assistant", "content": "随着城市的发展,综合性大型建筑群正在逐渐出现。"}, - {"role": "user", "content": "这句话我不满意,再改一下帮我"} - ], - "temperature": 0.7 - } - response = requests.post(url, - headers=headers, - data=json.dumps(data), - timeout=1000) - redis_.rpush(redis_key_name_openaikey_list, api_key) \ No newline at end of file