Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Centralize Exception Handling and Implement in GPTv Target #207

Merged

Conversation

rdheekonda
Copy link
Contributor

@rdheekonda rdheekonda commented May 15, 2024

  1. Centralized Exception Handling
  2. Adding exception handling to the Azure OpenAI GPT V chat target to manage bad request errors, authentication errors, empty response and rate limit errors.
  3. Added section in contributing guide

Description

Tests and Documentation

Added tests

@rlundeen2
Copy link
Contributor

rlundeen2 commented May 16, 2024

As part of this, can you take a stab at documenting what we should do? E.g. this is my best stab at a strategy, which is similar to but different from the one you have coded

  • If the output is None or JSON can't parse (there is no json in this target but a lot of our scorers and stuff use json), retry a few times then process_exception
  • If there is a RateLimitError, retry a few times then process_exception
  • If there is an auth error, raise (stops execution).. this may not need a special case if our default is to raise
  • If there is a BadRequestError caused by the filter, do not retry and process_exception. If BadRequestError is caused by something else, throw
  • We may retry/process_exception other known cases as they come up?
  • If there is an unknown exception... raise?

@rdheekonda rdheekonda changed the title [DRAFT] Add exception handling FEAT: Centralize Exception Handling and Implement in GPTv Target May 17, 2024
@rdheekonda rdheekonda marked this pull request as ready for review May 17, 2024 07:15
@rdheekonda rdheekonda merged commit 5c557bc into Azure:main May 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants