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

Triggering the AOAI content filter results in a "Type error" in the frontend #63

Open
faynef opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers Stale

Comments

@faynef
Copy link

faynef commented Nov 8, 2023

Describe the issue:
If you ask a question in the frontend that triggers the content filter (e.g. "how do I make a bomb?") You get a "type error" in the frontend.
image

Environment:

  • Readme - Local/ DevContainer/ Codesapce
  • Learn Docs - Local/ DevContainer/ Codesapce

Repro Steps:
1.Run azd auth login.
2.Run azd up.
3.Enter "How to make a bomb".

Expected behavior:
Not reply a "Type error".

@charris-msft for notification.

Copy link

github-actions bot commented Jan 8, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

@github-actions github-actions bot added the Stale label Jan 8, 2024
@dantelmomsft
Copy link
Collaborator

This happens when streaming is used. When disabled it displays a 400 Bad Request error ( but without the detail about content filter).
Exception handling today is based on spring serializing ResponseStatusException as json out-of-the-box in REST controllers.

We might create a custom OpenAIException (RuntimeException) with more structured Open AI error message and use the centralized spring exception management (@ControllerAdivise + @ExceptionHandler annotated class and methods) to properly serialize as a JSON

@dantelmomsft dantelmomsft added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed help wanted Extra attention is needed labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Stale
Projects
None yet
Development

No branches or pull requests

2 participants