Hi @shuang
Thank you for using the Microsoft Q&A forum.
As per your question, I understand that you would like to know more details about the "user" parameter in Azure OpenAI REST API. I will be happy to assist you with this.
The "user" parameter in Azure OpenAI Service REST API is used to provide a unique identifier representing your end-user. This helps Azure OpenAI monitor and detect abuse. It is recommended to use pseudo-anonymized values such as GUIDs instead of PII identifiers, while providing values for this parameter in the request.
You can easily generate UUIDs using a variety of methods in your application and then copy and paste them into your Postman requests.
See below:
Below is the repro I tried from my end in POSTMAN. See below.
Note: Passed above uuid as value for "user".
In the above POSTMAN response, I received "finish_reason": "content_filter" because the content was filtered based on the severity level of the categories.
Please consult the curl-openai-reference-example-request and content filtering guide to understand more from the official documentation. Also note that the "user" parameter is optional and not required for the Azure OpenAI Service REST API to function.
Regarding your other question, you can try using Azure Monitor to track token usage by creating a diagnostic setting to collect platform logs and metrics.
I hope you understand. Thank you.
Please do not forget to click Accept Answer
and Yes
for was this answer helpful, wherever the information provided helps you. This can be beneficial to other community members.