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.54k stars 2.38k forks source link

Prompt and Request logging via APIM has an 8192 character limit #757

Closed rochaktarika123 closed 1 month ago

rochaktarika123 commented 4 months ago

Describe the bug Using APIM for logging and audit purposes but there is an 8192 character limit which is usually hit because the request body contains the prompts, citations and collects the responses as well as the conversation builds. Once the 8192 character limit is hit, the request body json gets truncated and it is not structured and cannot be parsed. Is there a way to either stop the citations from logging ? (Short term solution) Any other way to avoid this issue?

To Reproduce Steps to reproduce the behavior:

  1. Go to 'API Management Service and click on the API'
  2. Click on 'Settings'
  3. Scroll down to 'Diagnostic Logs -> Azure Monitor (check it) --> Additional Settings'
  4. You can see the character limit

Expected behavior I am able to see the logs being captured but as soon as the limit hits , the json format breaks and I will not be able to record any conversation after that because the request body builds messages in an array

Screenshots

image

Configuration: Please provide the following

Additional context Add any other context about the problem here.

abhahn commented 4 months ago

Hi @rochaktarika123 , just wanted to let you know that we currently have an item in our backlog for removing the citations and intents from the requests to our backend service. I'll mark it as a higher priority to get it fixed soon.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.