mirror of
https://github.com/microsoft/autogen.git
synced 2026-01-25 03:37:58 -05:00
Support more azure openai api_type (#1059)
This commit is contained in:
@@ -236,7 +236,7 @@ class Completion(openai_Completion):
|
||||
request_timeout = min(request_timeout, time_left)
|
||||
sleep(cls.retry_time)
|
||||
except InvalidRequestError:
|
||||
if "azure" == config.get("api_type", openai.api_type) and "model" in config:
|
||||
if "azure" in config.get("api_type", openai.api_type) and "model" in config:
|
||||
# azure api uses "engine" instead of "model"
|
||||
config["engine"] = config.pop("model").replace("gpt-3.5-turbo", "gpt-35-turbo")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user