Skip to content

Commit

Permalink
refactor: do not intercept general openai errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Feb 2, 2023
1 parent 704ad28 commit ab8bcf0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions bot/davinci.py
Expand Up @@ -29,9 +29,6 @@ def ask(self, question, history=None):
except openai.error.InvalidRequestError as exc:
raise ValueError("too many tokens to make completion") from exc

except Exception as exc:
raise ValueError("failed to answer") from exc

def _generate_prompt(self, question, history):
prompt = BASE_PROMPT
for q, a in history:
Expand Down

0 comments on commit ab8bcf0

Please sign in to comment.