AzureChatOpenAI raises The API deployment for this resource does not exist when used with ConversationalRetrievalChain
Labels: name: auto:bug

### System Info

Hello,

I am trying to use AzureChatOpenAI to develop a QA system with memory.  For that purpose, I have the following code:

```python
import faiss
import pickle
from langchain.chat_models import AzureChatOpenAI
from langchain.memory import ConversationBufferMemory
from langchain.chains import ConversationalRetrievalChain
from langchain.schema import HumanMessage

memory = ConversationBufferMemory(
    memory_key="chat_history",
    return_messages=True
)

# Load the LangChain.
index = faiss.read_index("docs.index")
with open("faiss_store.pkl", "rb") as f:
    store = pickle.load(f)

AZURE_BASE_URL = "{MY_BASE_URL}.openai.azure.com/"
AZURE_OPENAI_API_KEY = "MY_API_KEY"
DEPLOYMENT_NAME = "chat"

llm = AzureChatOpenAI(
    openai_api_base=AZURE_BASE_URL,
    openai_api_version="2023-03-15-preview",
    deployment_name="chat",
    openai_api_key=AZURE_OPENAI_API_KEY,
    openai_api_type="azure",
    temperature=0.01
)

retriever = store.as_retriever()
qa = ConversationalRetrievalChain.from_llm(
    llm,
    retriever=retriever,
    memory=memory
)

user_input = "Question?"

result = qa({"question": user_input})
print(result)

```

This code is raising the following error:

```
openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
```

I have tried using AzureChatOpenAI in other ways and it is working without any problem, using the same deployed model in Azure:

```python
AZURE_BASE_URL = "{MY_BASE_URL}.openai.azure.com/"
AZURE_OPENAI_API_KEY = "MY_API_KEY"
DEPLOYMENT_NAME = "chat"

llm = AzureChatOpenAI(
    openai_api_base=AZURE_BASE_URL,
    openai_api_version="2023-03-15-preview",
    deployment_name="chat",
    openai_api_key=AZURE_OPENAI_API_KEY,
    openai_api_type="azure",
    temperature=0.01
)
chain = load_qa_chain(llm=llm, chain_type="map_reduce")
```
Therefore, the problem is not about the deployment I made in Azure, it seems to work fine in other situations.

Am I missing something when using ConversationalRetrievalChain with AzureChatOpenAI? I have tried so many things and nothing seems to work.

Thanks in advance for any help.

### Who can help?

@hwchase17

### Information

- [ ] The official example notebooks/scripts
- [x] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

1. Declare the LLM using AzureChatOpenAI:
```python
AZURE_BASE_URL = "{MY_BASE_URL}.openai.azure.com/"
AZURE_OPENAI_API_KEY = "MY_API_KEY"
DEPLOYMENT_NAME = "chat"

llm = AzureChatOpenAI(
    openai_api_base=AZURE_BASE_URL,
    openai_api_version="2023-03-15-preview",
    deployment_name="chat",
    openai_api_key=AZURE_OPENAI_API_KEY,
    openai_api_type="azure",
    temperature=0.01
)
```
2. Declare the ConversationBufferMemory:
```python
memory = ConversationBufferMemory(
    memory_key="chat_history",
    return_messages=True
)
```
3. Load FAISS index:
```python
# Load the LangChain.
index = faiss.read_index("docs.index")
with open("faiss_store.pkl", "rb") as f:
    store = pickle.load(f)
```

4. Declare and run the ConversationalRetrievalChain:
```python
qa = ConversationalRetrievalChain.from_llm(
    llm,
    retriever=retriever,
    memory=memory
)

user_input = "Question?"

result = qa({"question": user_input})
print(result)
```

### Expected behavior

Error raised:

```
openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
```