Skip to content

Commit

Permalink
Merge pull request #174 from Muennighoff/patch-1
Browse files Browse the repository at this point in the history
Fix mssg check
  • Loading branch information
rtaori authored Nov 26, 2023
2 parents 9e8e898 + 61bb7ad commit cd18dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alpaca_eval/decoders/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _openai_completion_helper(
break
except openai.OpenAIError as e:
logging.warning(f"OpenAIError: {e}.")
if "Please reduce your prompt" in str(e):
if "Please reduce" in str(e):
kwargs["max_tokens"] = int(kwargs["max_tokens"] * 0.8)
logging.warning(f"Reducing target length to {kwargs['max_tokens']}, Retrying...")
if kwargs["max_tokens"] == 0:
Expand Down

0 comments on commit cd18dd4

Please sign in to comment.