text_embedding with OpenAIEmbeddings cannot work
Labels: name: area: embeddings, name: auto:bug



**System Info**

python=3.10.8
langchain = 0.0.250
openai=0.27.8

**Information**
The official example notebooks/scripts

The error occurs when I run the official example: 
https://python.langchain.com/docs/integrations/text_embedding/azureopenai


I use the azure open, and the code are shown in following:

      embeddings = OpenAIEmbeddings(
                                    deployment="text-davinci-002",
                                    openai_api_key=os.environ["OPENAI_API_KEY"],
                                    openai_api_type="azure",
                                    openai_api_base=os.environ["OPENAI_API_BASE"],
                                    openai_api_version=os.environ["OPENAI_API_VERSION"]
                                    )
      text = "This is a test document."
      query_result = embeddings.embed_query(text)
      doc_result = embeddings.embed_documents([text])


and the error is:

    Traceback (most recent call last):
      File "./inter.py", line 54, in <module>
        query_result = embeddings.embed_query(text)
      File "./miniconda3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 500, in embed_query
        return self.embed_documents([text])[0]
      File "./miniconda3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 472, in embed_documents
        return self._get_len_safe_embeddings(texts, engine=self.deployment)
      File "./miniconda3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 358, in _get_len_safe_embeddings
        response = embed_with_retry(
      File "./miniconda3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 107, in embed_with_retry
        return _embed_with_retry(**kwargs)
      File "./miniconda3/lib/python3.10/site-packages/tenacity/__init__.py", line 289, in wrapped_f
        return self(f, *args, **kw)
      File "./miniconda3/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
        do = self.iter(retry_state=retry_state)
      File "./miniconda3/lib/python3.10/site-packages/tenacity/__init__.py", line 314, in iter
        return fut.result()
      File "./miniconda3/lib/python3.10/concurrent/futures/_base.py", line 451, in result
        return self.__get_result()
      File "./miniconda3/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
        raise self._exception
      File "./miniconda3/lib/python3.10/site-packages/tenacity/__init__.py", line 382, in __call__
        result = fn(*args, **kwargs)
      File "./miniconda3/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 104, in _embed_with_retry
        response = embeddings.client.create(**kwargs)
      File "./miniconda3/lib/python3.10/site-packages/openai/api_resources/embedding.py", line 33, in create
        response = super().create(*args, **kwargs)
      File "./miniconda3/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
        response, _, api_key = requestor.request(
      File "./miniconda3/lib/python3.10/site-packages/openai/api_requestor.py", line 298, in request
        resp, got_stream = self._interpret_response(result, stream)
      File "./miniconda3/lib/python3.10/site-packages/openai/api_requestor.py", line 700, in _interpret_response
        self._interpret_response_line(
      File "./miniconda3/lib/python3.10/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line
        raise self.handle_error_response(
    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 check the issues,  while this problem cannot be solved with the following solutions:
- solutions mentioned in #4819
- adding chunk_size=1
- only use OpenAIEmbeddings()


### Suggestion:

_No response_