text: import Typesensefrom langchain.document_loaders import TextLoaderLet's import our test dataset:loader = TextLoader("../../../state_of_the_union.txt")documents = loader.load()text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)docs = text_splitter.split_documents(documents)embeddings = OpenAIEmbeddings()docsearch = Typesense.from_documents(    docs,    embeddings,    typesense_client_params={        "host": "localhost",  # Use xxx.a1.typesense.net for Typesense Cloud        "port": "8108",  # Use 443 for Typesense Cloud        "protocol": "http",  # Use https for Typesense Cloud        "typesense_api_key": "xyz",        "typesense_collection_name": "lang-chain",    },)Similarity Searchâ€‹query = "What did the president say about Ketanji Brown Jackson"found_docs = docsearch.similarity_search(query)print(found_docs[0].page_content)Typesense as a Retrieverâ€‹Typesense, as all the other vector stores, is a LangChain Retriever, by using cosine similarity.retriever = docsearch.as_retriever()retrieverquery = "What did the president say about Ketanji Brown Jackson"retriever.get_relevant_documents(query)[0]PreviousTigrisNextVectaraSimilarity SearchTypesense as a RetrieverCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.