visited_keys.add(item_key)
            new_lst.append(item)
    return new_lst
[docs]class AstraDB(VectorStore):
    """Wrapper around DataStax Astra DB for vector-store workloads.
    To use it, you need a recent installation of the `astrapy` library
    and an Astra DB cloud database.
    For quickstart and details, visit:
        docs.datastax.com/en/astra/home/astra.html
    Example:
        .. code-block:: python
                from langchain_community.vectorstores import AstraDB
                from langchain_community.embeddings.openai import OpenAIEmbeddings
                embeddings = OpenAIEmbeddings()
                vectorstore = AstraDB(
                  embedding=embeddings,
                  collection_name="my_store",
                  token="AstraCS:...",
                  api_endpoint="https://<DB-ID>-us-east1.apps.astra.datastax.com"
                )
                vectorstore.add_texts(["Giraffes", "All good here"])
                results = vectorstore.similarity_search("Everything's ok", k=1)
      Constructor Args (only keyword-arguments accepted):
          embedding (Embeddings): embedding function to use.
          collection_name (str): name of the Astra DB collection to create/use.
          token (Optional[str]): API token for Astra DB usage.
          api_endpoint (Optional[str]): full URL to the API endpoint,
              such as "https://<DB-ID>-us-east1.apps.astra.datastax.com".
          astra_db_client (Optional[Any]): *alternative to token+api_endpoint*,
              you can pass an already-created 'astrapy.db.AstraDB' instance.
          namespace (Optional[str]): namespace (aka keyspace) where the