Issue with Qdrant: TypeError: unhashable type: 'list'
Labels: name: area: embeddings, name: area: vector store, name: auto:bug

### System Info

langchain==0.0.347
langchain-core==0.0.11

### Who can help?



@JeanBaptiste-dlb @hwchase17 @kacperlukawski 


### Information

- [X] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] 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

The code I'm trying is based from: https://python.langchain.com/docs/integrations/vectorstores/qdrant 

```
import os

directory_path = 'data/' 
from langchain.document_loaders import TextLoader
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter

from langchain.vectorstores import Qdrant

from langchain.embeddings import OpenAIEmbeddings
embeddings = OpenAIEmbeddings(openai_api_key="sk-XXX")

loader = TextLoader(os.path.join(directory_path, "concept-note.md"))
documents = loader.load()
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
docs = text_splitter.split_documents(documents)

qdrant = Qdrant.from_documents(
    docs,
    embeddings,
    location=":memory:",  # Local mode with in-memory storage only
    collection_name="my_documents",
)
```


The error:
```
Created a chunk of size 1893, which is longer than the specified 1000
Created a chunk of size 1728, which is longer than the specified 1000
Created a chunk of size 1317, which is longer than the specified 1000
Created a chunk of size 1464, which is longer than the specified 1000
Created a chunk of size 2119, which is longer than the specified 1000
Created a chunk of size 1106, which is longer than the specified 1000
Created a chunk of size 1822, which is longer than the specified 1000
Created a chunk of size 3658, which is longer than the specified 1000
Created a chunk of size 1233, which is longer than the specified 1000
Created a chunk of size 1522, which is longer than the specified 1000
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 20
     16 docs = text_splitter.split_documents(documents)
     17 docs
---> 20 qdrant = Qdrant.from_documents(
     21     docs,
     22     embeddings,
     23     location=":memory:",  # Local mode with in-memory storage only
     24     collection_name="my_documents",
     25 )

File /opt/conda/lib/python3.11/site-packages/langchain_core/vectorstores.py:510, in VectorStore.from_documents(cls, documents, embedding, **kwargs)
    508 texts = [d.page_content for d in documents]
    509 metadatas = [d.metadata for d in documents]
--> 510 return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)

File /opt/conda/lib/python3.11/site-packages/langchain/vectorstores/qdrant.py:1345, in Qdrant.from_texts(cls, texts, embedding, metadatas, ids, location, url, port, grpc_port, prefer_grpc, https, api_key, prefix, timeout, host, path, collection_name, distance_func, content_payload_key, metadata_payload_key, vector_name, batch_size, shard_number, replication_factor, write_consistency_factor, on_disk_payload, hnsw_config, optimizers_config, wal_config, quantization_config, init_from, on_disk, force_recreate, **kwargs)
   1210 """Construct Qdrant wrapper from a list of texts.
   1211 
   1212 Args:
   (...)
   1311         qdrant = Qdrant.from_texts(texts, embeddings, "localhost")
   1312 """
   1313 qdrant = cls.construct_instance(
   1314     texts,
   1315     embedding,
   (...)
   1343     **kwargs,
   1344 )
-> 1345 qdrant.add_texts(texts, metadatas, ids, batch_size)
   1346 return qdrant

File /opt/conda/lib/python3.11/site-packages/langchain/vectorstores/qdrant.py:190, in Qdrant.add_texts(self, texts, metadatas, ids, batch_size, **kwargs)
    174 """Run more texts through the embeddings and add to the vectorstore.
    175 
    176 Args:
   (...)
    187     List of ids from adding the texts into the vectorstore.
    188 """
    189 added_ids = []
--> 190 for batch_ids, points in self._generate_rest_batches(
    191     texts, metadatas, ids, batch_size
    192 ):
    193     self.client.upsert(
    194         collection_name=self.collection_name, points=points, **kwargs
    195     )
    196     added_ids.extend(batch_ids)

File /opt/conda/lib/python3.11/site-packages/langchain/vectorstores/qdrant.py:2136, in Qdrant._generate_rest_batches(self, texts, metadatas, ids, batch_size)
   2122 # Generate the embeddings for all the texts in a batch
   2123 batch_embeddings = self._embed_texts(batch_texts)
   2125 points = [
   2126     rest.PointStruct(
   2127         id=point_id,
   2128         vector=vector
   2129         if self.vector_name is None
   2130         else {self.vector_name: vector},
   2131         payload=payload,
   2132     )
   2133     for point_id, vector, payload in zip(
   2134         batch_ids,
   2135         batch_embeddings,
-> 2136         self._build_payloads(
   2137             batch_texts,
   2138             batch_metadatas,
   2139             self.content_payload_key,
   2140             self.metadata_payload_key,
   2141         ),
   2142     )
   2143 ]
   2145 yield batch_ids, points

File /opt/conda/lib/python3.11/site-packages/langchain/vectorstores/qdrant.py:1918, in Qdrant._build_payloads(cls, texts, metadatas, content_payload_key, metadata_payload_key)
   1912         raise ValueError(
   1913             "At least one of the texts is None. Please remove it before "
   1914             "calling .from_texts or .add_texts on Qdrant instance."
   1915         )
   1916     metadata = metadatas[i] if metadatas is not None else None
   1917     payloads.append(
-> 1918         {
   1919             content_payload_key: text,
   1920             metadata_payload_key: metadata,
   1921         }
   1922     )
   1924 return payloads

TypeError: unhashable type: 'list'
```

### Expected behavior

It should not raise an error.