text: for document {i+1}: {embedding}")# Create an embedding for a single queryquery = "This is a single query."query_embedding = embeddings.embed_query(query)# Print query embeddingprint(f"Embedding for query: {query_embedding}")Testing with Existing Elasticsearch client connectionâ€‹This can be used with any Elasticsearch deployment# Create Elasticsearch connectiones_connection = Elasticsearch(    hosts=["https://es_cluster_url:port"], basic_auth=("user", "password"))# Instantiate ElasticsearchEmbeddings using es_connectionembeddings = ElasticsearchEmbeddings.from_es_connection(    model_id,    es_connection,)# Create embeddings for multiple documentsdocuments = [    "This is an example document.",    "Another example document to generate embeddings for.",]document_embeddings = embeddings.embed_documents(documents)# Print document embeddingsfor i, embedding in enumerate(document_embeddings):    print(f"Embedding for document {i+1}: {embedding}")# Create an embedding for a single queryquery = "This is a single query."query_embedding = embeddings.embed_query(query)# Print query embeddingprint(f"Embedding for query: {query_embedding}")PreviousDeepInfraNextEmbaasTesting with from_credentialsTesting with Existing Elasticsearch client connectionCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.