mirror of
https://github.com/microsoft/autogen.git
synced 2025-09-26 16:51:39 +00:00
Warn if oai.Completion is provided with an empty config_list (#178)
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
This commit is contained in:
parent
72239a6d5d
commit
afdff3ea14
@ -768,6 +768,13 @@ class Completion(openai_Completion):
|
|||||||
"""
|
"""
|
||||||
if ERROR:
|
if ERROR:
|
||||||
raise ERROR
|
raise ERROR
|
||||||
|
|
||||||
|
# Warn if a config list was provided but was empty
|
||||||
|
if type(config_list) is list and len(config_list) == 0:
|
||||||
|
logger.warning(
|
||||||
|
"Completion was provided with a config_list, but the list was empty. Adopting default OpenAI behavior, which reads from the 'model' parameter instead."
|
||||||
|
)
|
||||||
|
|
||||||
if config_list:
|
if config_list:
|
||||||
last = len(config_list) - 1
|
last = len(config_list) - 1
|
||||||
cost = 0
|
cost = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user