AttributeError: 'OpenAIEmbeddings' object has no attribute 'skip_empty'
Labels: name: area: embeddings, name: area: vector store, name: auto:bug, name: area: models

### System Info

Platform: local development on MacOS Ventura
Python version: 3.9.7

langchain.version: 0.0.315
faiss.version: 1.7.4
openai.version: 0.28.1

### Who can help?

@hwchase17


### Information

- [X] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [X] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

This is my code:

     class TestGPT(object):
  
      def __init__(self):
          self.llm_model = ChatOpenAI(temperature=0.1, streaming=True, model="gpt-3.5-turbo")
          self.store = self.load_store_data()
          self.prompt = f"""Use 3 sentences at most."""
  
      @staticmethod
      def load_store_data():
          with open(f"faiss_store.pkl", "rb") as f:
              store = pickle.load(f)
          store.index = faiss.read_index(f"docs.index")
          return store
  
      def ask(self, user_prompt):
          content = self.prompt + "\n\n" + "Question: " + user_prompt + "\n\n"
  
          chain = RetrievalQAWithSourcesChain.from_chain_type(llm=self.llm_model,
                                                              retriever=self.store.as_retriever())
          gpt_response = chain(content)['answer']
          return self.control_response_has_source(gpt_response)
  
    TestGPT().ask("hello")

Error is **"AttributeError: 'OpenAIEmbeddings' object has no attribute 'skip_empty'"**

Traceback:
`Traceback (most recent call last):
  File "/Users/md/Desktop/support_gpt.py", line 72, in <module>
    res = SupportGPT().ask("uygulama nasıl kullanılır")
  File "/Users/md/Desktop/support_gpt.py", line 45, in ask
    gpt_response = chain(content)['answer']
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 310, in __call__
    raise e
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 304, in __call__
    self._call(inputs, run_manager=run_manager)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/chains/qa_with_sources/base.py", line 151, in _call
    docs = self._get_docs(inputs, run_manager=_run_manager)
  File "/Users/md/Desktop/venv/venv/lib/python3.9/site-packages/langchain/chains/qa_with_sources/retrieval.py", line 50, in _get_docs
    docs = self.retriever.get_relevant_documents(
  File "/Users/md/Desktop/venv/venv/lib/python3.9/site-packages/langchain/schema/retriever.py", line 211, in get_relevant_documents
    raise e
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/schema/retriever.py", line 204, in get_relevant_documents
    result = self._get_relevant_documents(
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/schema/vectorstore.py", line 585, in _get_relevant_documents
    docs = self.vectorstore.similarity_search(query, **self.search_kwargs)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 364, in similarity_search
    docs_and_scores = self.similarity_search_with_score(
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 305, in similarity_search_with_score
    embedding = self._embed_query(query)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 138, in _embed_query
    return self.embedding_function(text)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 518, in embed_query
    return self.embed_documents([text])[0]
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 490, in embed_documents
    return self._get_len_safe_embeddings(texts, engine=self.deployment)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 374, in _get_len_safe_embeddings
    response = embed_with_retry(
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 107, in embed_with_retry
    return _embed_with_retry(**kwargs)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
  File "/Users/md/Desktop/venv/python3.9/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)
  File "/Users/md/Desktop/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 105, in _embed_with_retry
    return _check_response(response, skip_empty=embeddings.skip_empty)
AttributeError: 'OpenAIEmbeddings' object has no attribute 'skip_empty'
`


### Expected behavior

This function should not throw an error and also I do not get any error when I downgrade the langchain to 0.0.251