"metadata": "metadata",
    }
    database: str = "default"
    table: str = "langchain"
    def __getitem__(self, item: str) -> Any:
        return getattr(self, item)
    class Config:
        env_file = ".env"
        env_prefix = "starrocks_"
        env_file_encoding = "utf-8"
[docs]class StarRocks(VectorStore):
    """`StarRocks` vector store.
    You need a `pymysql` python package, and a valid account
    to connect to StarRocks.
    Right now StarRocks has only implemented `cosine_similarity` function to
    compute distance between two vectors. And there is no vector inside right now,
    so we have to iterate all vectors and compute spatial distance.
    For more information, please visit
        [StarRocks official site](https://www.starrocks.io/)
        [StarRocks github](https://github.com/StarRocks/starrocks)
    """
[docs]    def __init__(
        self,
        embedding: Embeddings,
        config: Optional[StarRocksSettings] = None,
        **kwargs: Any,
    ) -> None:
        """StarRocks Wrapper to LangChain
        embedding_function (Embeddings):
        config (StarRocksSettings): Configuration to StarRocks Client
        """
        try:
            import pymysql  # type: ignore[import]
        except ImportError:
            raise ImportError(
                "Could not import pymysql python package. "
                "Please install it with `pip install pymysql`."
            )
        try:
            from tqdm import tqdm
            self.pgbar = tqdm
        except ImportError:
            # Just in case if tqdm is not installed