Skip to content

Commit

Permalink
fix bug no oai org (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
YannDubs authored Jan 10, 2024
1 parent 0c14d6f commit 53dec9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/alpaca_eval/decoders/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ def _get_price_per_token(model, price_per_token=None):
def _get_backwards_compatible_configs(
openai_api_keys=[], openai_organization_ids=[None], openai_api_base=None
) -> list[dict[str, Any]]:
if isinstance(openai_api_keys, str) or openai_api_keys is None:
openai_api_keys = [openai_api_keys]
if isinstance(openai_organization_ids, str) or openai_organization_ids is None:
openai_organization_ids = [openai_organization_ids]

client_configs = []
for api_key in openai_api_keys:
for org in openai_organization_ids:
Expand Down

0 comments on commit 53dec9f

Please sign in to comment.