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

fix: Handle errors from input filtering better #113

Merged
merged 9 commits into from
Nov 10, 2023

Conversation

shibbas
Copy link
Contributor

@shibbas shibbas commented Nov 7, 2023

Purpose

Handle the content filtered errors from Open AI better. For reference: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter

Changes include:

  • Handling bad request errors separately from internal server errors
  • Handle content filtering in the middle of streamed output.
  • Fix bug where error message is not sticky to the user input but is only shown once.
  • Fix bug where loading indicator does not show up after an error

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[X] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

@shibbas shibbas marked this pull request as ready for review November 7, 2023 20:19
@shibbas shibbas force-pushed the feature/handle-bad-requests branch from 0efe282 to 6f1408e Compare November 8, 2023 16:16
@shibbas shibbas marked this pull request as draft November 8, 2023 18:34
@shibbas shibbas force-pushed the feature/handle-bad-requests branch from 6f1408e to 8459e64 Compare November 8, 2023 22:32
@shibbas shibbas marked this pull request as ready for review November 9, 2023 06:57
@shibbas shibbas force-pushed the feature/handle-bad-requests branch from 5911e4e to 78ff184 Compare November 10, 2023 18:23
@anfibiacreativa anfibiacreativa merged commit 4a38a63 into main Nov 10, 2023
5 checks passed
@sinedied sinedied deleted the feature/handle-bad-requests branch February 29, 2024 08:22
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.

2 participants