raise ValueError("AwaDB client is None!!!")
        return self.awadb_client.Load(table_name)
[docs]    def similarity_search(
        self,
        query: str,
        k: int = DEFAULT_TOPN,
        **kwargs: Any,
    ) -> List[Document]:
        """Return docs most similar to query."""
        if self.awadb_client is None:
            raise ValueError("AwaDB client is None!!!")
        embedding = None
        if self.embedding_model is not None:
            embedding = self.embedding_model.embed_query(query)
        else:
            from awadb import llm_embedding
            llm = llm_embedding.LLMEmbedding()
            embedding = llm.Embedding(query)
        return self.similarity_search_by_vector(embedding, k)
[docs]    def similarity_search_with_score(
        self,
        query: str,
        k: int = DEFAULT_TOPN,
        **kwargs: Any,
    ) -> List[Tuple[Document, float]]:
        """Return docs and relevance scores, normalized on a scale from 0 to 1.
        0 is dissimilar, 1 is most similar.
        """
        if self.awadb_client is None:
            raise ValueError("AwaDB client is None!!!")
        embedding = None
        if self.embedding_model is not None:
            embedding = self.embedding_model.embed_query(query)
        else:
            from awadb import llm_embedding
            llm = llm_embedding.LLMEmbedding()
            embedding = llm.Embedding(query)
        # show_results = self.awadb_client.Search(embedding, k)
        results: List[Tuple[Document, float]] = []
        # if show_results.__len__() == 0:
        #    return results
rtdocs_stable/api.python.langchain.com/en/stable/_modules/langchain/vectorstores/awadb.html