microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.44k stars 2.15k forks source link

support passing user-info to AOAI for Defender for cloud #842

Closed slreznit closed 1 month ago

slreznit commented 1 month ago

Motivation and Context

Defender for AI is part of Defender for Cloud and to provide advanced threat protection to customers we need gen-ai apps to be instrumented as this PR suggests

This PR is part1 - Add functionality and make it opt-in to start tests and do some demos. I plan to add a check whether Defender for AI is enabled in another PR

Description

Contribution Checklist

slreznit commented 1 month ago

Just wondering -- will any of these values being null or empty string cause errors from the service? If there are any known error conditions we should be aware of here it might be helpful to add some info about them to the README.

The user field is a string and will not fail the API call if inner json has null or empty values.