Skip to content

Commit

Permalink
fix: replace gpt-35-turbo in model name to gpt-3.5-turbo so the name … (
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
3 people committed Oct 9, 2023
1 parent 71ac774 commit fbe82da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autogen/oai/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def _get_response(cls, config: Dict, raise_on_ratelimit_or_timeout=False, use_ca
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()
Expand Down

0 comments on commit fbe82da

Please sign in to comment.