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

[Bug]: Unable to make work Moderation with Azure AI Content Safety #2121

Closed
michaelmaillot opened this issue Oct 17, 2024 · 0 comments · Fixed by #2133
Closed

[Bug]: Unable to make work Moderation with Azure AI Content Safety #2121

michaelmaillot opened this issue Oct 17, 2024 · 0 comments · Fixed by #2133
Assignees
Labels
bug Something isn't working

Comments

@michaelmaillot
Copy link

Language

Javascript/Typescript

Version

latest

Description

Current version of Teams AI only works with API version "2023-04-30-preview" which returns 404 error "Resource not found".

API versions "2024-02-15-preview", "2023-10-01" & "2024-09-01" expects other options than the one currently available in the AzureOpenAIModeratorOptions (indicated here).

If we try to mention API versions "2024-02-15-preview", "2023-10-01" or "2024-09-01" in Teams AI, Content Safety check returns this error: "The body of your request contains fields that we do not support, please double check the api-version and the API definition under this api-version.".

Reproduction Steps

  1. Init an intelligent chatbot project through Teams Toolkit
  2. Implement Content Moderation with Azure Content Safety with AzureContentSafetyModerator class
  3. Specify apiVersion option with "2024-02-15-preview", "2023-10-01" or "2024-09-01"
  4. Run the chatbot & try to interact with the Model
    ...
@michaelmaillot michaelmaillot added the bug Something isn't working label Oct 17, 2024
@aacebo aacebo self-assigned this Oct 21, 2024
corinagum pushed a commit that referenced this issue Oct 22, 2024
## Linked issues

closes: #2121 

## Details

the version of azure content safety we are using was public preview and
is no longer supported, these changes update our code to work with the
official GA version of content safety
https://learn.microsoft.com/en-us/azure/ai-services/content-safety/how-to/migrate-to-general-availability
lilyydu added a commit that referenced this issue Nov 27, 2024
## Linked issues

closes: #2172

## Details

parity across languages - originated with #2121 and #2133

#### Change details

- added `halt_on_blocklist_hit`
- updated with GA reqs
- updated moderation sample

## Attestation Checklist

- [x] My code follows the style guidelines of this project

- I have checked for/fixed spelling, linting, and other errors
- I have commented my code for clarity
- I have made corresponding changes to the documentation (updating the
doc strings in the code is sufficient)
- My changes generate no new warnings
- I have added tests that validates my changes, and provides sufficient
test coverage. I have tested with:
  - Local testing
  - E2E testing in Teams
- New and existing unit tests pass locally with my changes

---------

Co-authored-by: lilydu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants