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

Internal Server Error #840

Closed DMF194 closed 1 month ago

DMF194 commented 2 months ago

Describe the bug After I git clone into my own private branch and running all the instructions from the READ.ME, I got the internal server error

To Reproduce I am following the instructions for local machine deployment

  1. Fill the details for my .env file as follows

    • AZURE_OPENAI_RESOURCE
    • AZURE_OPENAI_MODEL
    • AZURE_OPENAI_KEY
  2. Fill the details for my .env file as follows

    • AZURE_SEARCH_SERVICE
    • AZURE_SEARCH_INDEX
    • AZURE_SEARCH_KEY
  3. Made sure that my startup command is as follows: python -m gunicorn app:app under web service configuration tab

Screenshots image

Note that I am doing this using company proxy and not using chat history.

DMF194 commented 1 month ago

Just an update to this case, I tried to enter the cosmos details and restarted the application.

The following screenshot is shown image

abhahn commented 1 month ago

Hi @DMF194 , could you please share the full stack trace from the backend when you receive this error?

DMF194 commented 1 month ago

Hi @abhahn, when I tried restarting the application by running the start.cmd command this morning.

I no longer run into the internal server issue.

This is what it looks like today

IMG_20240524_091001

But comparing both the debug log from previous runs and today, I noticed the httpx python package is not throwing errors.

Previously, when I tested the conversation API by clicking on the send button, 500 error code kept appearing. My assumption is that the httpx python package used had some issues.

abhahn commented 1 month ago

Thanks for sharing this info. I'm glad to see you are no longer facing the issue. :) I'll close this for now, but if you run into the same issue later on feel free to reopen to share more details and we can investigate.