From 5a54e043b9a66e7ce0f18daec20882aedc5fbe51 Mon Sep 17 00:00:00 2001 From: "Roman A. Abashin" <14080347+rrmn@users.noreply.github.com> Date: Sun, 7 Jan 2024 23:05:57 +0200 Subject: [PATCH] fix: chat completion with openai api >= 1.0.0 --- infiniteGPT/blastoff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infiniteGPT/blastoff.py b/infiniteGPT/blastoff.py index 00bdb8e..a73dcf9 100644 --- a/infiniteGPT/blastoff.py +++ b/infiniteGPT/blastoff.py @@ -18,7 +18,7 @@ def save_to_file(responses, output_file): # Change your OpenAI chat model accordingly def call_openai_api(chunk): - response = openai.ChatCompletion.create( + response = openai.chat.completions.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "content": "PASS IN ANY ARBITRARY SYSTEM VALUE TO GIVE THE AI AN IDENITY"},