Getting an error when deploying Streamlit app for LangChain-based RAG application

I am trying to create an context-based retriever chat assistant using LangChain and RAG and deploying the interface via Streamlit. But I am getting the following error, after I upload the .docx file and enter the query:

openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

I am not sure what’s the error over here. For reference, I am using the Azure OpenAI API key, and other details through a .env file. At first I though it might be due to some incorrect credentials, but since they were shared to my team in office, they can’t be wrong.

The knowledge base is getting built successfully, but the error pops up right after I hit enter after typing the query in the chatbox. Let me know if I should share any other details. Any kind of help would be appreciated. Thanks!

Provide the suspected error part in the code or better the github link which will help us understand the reason for the error.