fix: replace gpt-35-turbo in model name to gpt-3.5-turbo so the name … (#138)

* fix: replace gpt-35-turbo in model name to gpt-3.5-turbo so the name string is in the current chat_model list

* ref: reformatted with black

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
This commit is contained in:
Allen Shi 2023-10-09 06:30:04 -04:00 committed by GitHub
parent 71ac774cd0
commit fbe82da208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,8 @@ class Completion(openai_Completion):
return response
openai_completion = (
openai.ChatCompletion
if config["model"] in cls.chat_models or issubclass(cls, ChatCompletion)
if config["model"].replace("gpt-35-turbo", "gpt-3.5-turbo") in cls.chat_models
or issubclass(cls, ChatCompletion)
else openai.Completion
)
start_time = time.time()