class_docstr: Wrapper around bigdl-llm transformers embedding models.
  
  To use, you should have the ``transformers`` python package installed.
  
  Example:
      .. code-block:: python
  
          from bigdl.llm.langchain.embeddings import TransformersEmbeddings
          embeddings = TransformersEmbeddings.from_model_id(model_id)
class_docstr_tok: ["Wrapper","around","bigdl-llm","transformers","embedding","models",".","To","use",",","you","should","have","the","``","transformers","``","python","package","installed",".","Example",":","..","code-block",":",":","python","from","bigdl.llm.langchain.embeddings","import","TransformersEmbeddings","embeddings","=","TransformersEmbeddings.from_model_id","(","model_id",")"]
docstr: Compute query embeddings using a bigdl-llm transformer model.
  
  Args:
      text: The text to embed.
  
  Returns:
      Embeddings for the text.
docstr_tok: ["Compute","query","embeddings","using","a","bigdl-llm","transformer","model",".","Args",":","text",":","The","text","to","embed",".","Returns",":","Embeddings","for","the","text","."]
code: def embed_query(self, text: str) -> List[float]:
      """Compute query embeddings using a bigdl-llm transformer model.
  
      Args:
          text: The text to embed.
  
      Returns:
          Embeddings for the text.
      """
      text = text.replace("\n", " ")
      embedding = self.embed(text, **self.encode_kwargs)
      return embedding.tolist()
  
file_path: BigDL/python/llm/src/bigdl/llm/langchain/embeddings/transformersembeddings.py
imports: from typing import Any, Dict, List, Optional
  import numpy
  from pydantic import BaseModel, Extra, Field
  from langchain.embeddings.base import Embeddings
label_desc: Use image node_id 4 for calling the TransformersEmbeddings obj's underlying member method code with example usage: obj.embed_query(text) and returns: embedding