AttributeError: 'tuple' object has no attribute 'page_content'
Labels: name: auto:bug

### System Info

langchain 0.0.228
python 3.11

### Who can help?

_No response_

### 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
- [X] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

I have a pinecone index with information which I upserted from a SQL table like this:


```
    df = loadSqlData()
    df.to_csv('profiles.csv', index=False)

    # Iterate through DataFrame rows
    # Time Complexity: O(n), where n is the number of rows in the DataFrame
    for _, record in df.iterrows():
        start_time = time.time()
        
        # Get metadata for this record
        # Time Complexity: O(1)
        metadata = {
            'IdentityId': str(record['IdentityId'])
        }
        st.write(f'Time taken for metadata extraction: {time.time() - start_time} seconds')

        start_time = time.time()
        # Split record text into chunks
        # Time Complexity: O(m), where m is the size of the text
        record_texts = text_splitter.split_text(record['content'])
        st.write(f'Time taken for text splitting: {time.time() - start_time} seconds')

        start_time = time.time()
        # Create metadata for each chunk
        # Time Complexity: O(k), where k is the number of chunks in the text
        record_metadatas = [{
            "chunk": j, "text": text, **metadata
        } for j, text in enumerate(record_texts)]
        st.write(f'Time taken for metadata dictionary creation: {time.time() - start_time} seconds')

        start_time = time.time()
        # Append chunks and metadata to current batches
        # Time Complexity: O(1)
        texts.extend(record_texts)
        metadatas.extend(record_metadatas)
        st.write(f'Time taken for data appending: {time.time() - start_time} seconds')

        # If batch_limit is reached, upsert vectors
        # Time Complexity: Depends on the upsert implementation
        if len(texts) >= batch_limit:
            start_time = time.time()
            ids = [str(uuid4()) for _ in range(len(texts))]
            # Simulating embedding and upserting here
            Pinecone.from_texts(
                    texts,
                    embed,
                    index_name="cubigo",
                    metadatas=metadatas,
                    namespace="vwProfiles2")
            texts = []
            metadatas = []
            st.write(f'Time taken for vector upsertion (simulated): {time.time() - start_time} seconds')

    # Upsert any remaining vectors after the loop
    # Time Complexity: Depends on the upsert implementation
    if len(texts) > 0:
        start_time = time.time()
        ids = [str(uuid4()) for _ in range(len(texts))]
        # Simulating embedding and upserting here
        Pinecone.from_texts(
                texts,
                embed,
                index_name="cubigo",
                metadatas=metadatas,
                namespace="vwProfiles2")
        st.write(f'Time taken for remaining vector upsertion (simulated): {time.time() - start_time} seconds')
        st.write('Rows indexed: ', len(df))
```

And now I am trying to make a chatbot with my SQL Table, I dont want to use SQLToolkit or Agent as its very slow.

so I am trying to use the following code:
```

 llm = AzureChatOpenAI(
        openai_api_base=OPENAI_DEPLOYMENT_ENDPOINT,
        openai_api_version=OPENAI_API_VERSION ,
        deployment_name=OPENAI_DEPLOYMENT_NAME,
        openai_api_key=OPENAI_API_KEY,
        openai_api_type = OPENAI_API_TYPE ,
        model_name=OPENAI_MODEL_NAME,
        temperature=0)    
    embed = OpenAIEmbeddings(deployment=OPENAI_EMBEDDING_DEPLOYMENT_NAME, model=OPENAI_EMBEDDING_MODEL_NAME, chunk_size=1)
    user_input = get_text()   
    vectorstore = Pinecone.from_existing_index("cubigo",embedding=embed, namespace="vwProfiles2")    
    docs =vectorstore.similarity_search_with_score(user_input, k=250, namespace="vwProfiles2")   #Who is from Bransk
    vectordb = Pinecone.from_documents(documents=docs, 
                                     embedding=embed)

    qa = RetrievalQA.from_chain_type(llm=llm, 
                                     chain_type="stuff", 
                                     retriever=vectordb.as_retriever()
                                     )
    
    response = qa.run(user_input)
```


But I get this error

AttributeError: 'tuple' object has no attribute 'page_content'

```

File "C:\Users\xx\repos\xxChatbotv1\app\pages\07Chat With Pinecone Directly.py", line 100, in main
    vectordb = Pinecone.ncia\repos\xxChatbotv1\app\pages\07Chat With Pinecone Directly.py", line 100, in main
    vectordb = Pinecone.from_documents(documents=docs,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xx\anaconda3\envs\xxChatbotv3\Lib\site-packages\langchain\vectorstores\base.py", line 334, in from_documents
    texts = [d.page_content for d in documents]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xx\anaconda3\envs\xxChatbotv3\Lib\site-packages\langchain\vectorstores\base.py", line 334, in <listcomp>
    texts = [d.page_content for d in documents]
             ^^^^^^^^^^^^^^from_documents(documents=docs,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xx\anaconda3\envs\xxChatbotv3\Lib\site-packages\langchain\vectorstores\base.py", line 334, in from_documents
    texts = [d.page_content for d in documents]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xx\anaconda3\envs\xxChatbotv3\Lib\site-packages\langchain\vectorstores\base.py", line 334, in <listcomp>
    texts = [d.page_content for d in documents]
             ^^^^^^^^^^^^^^
```

### Expected behavior

response in plain english?