Toggle Menu
Prev Up Next

# `langchain_core.embeddings.embeddings`.Embeddings

class langchain_core.embeddings.embeddings.Embeddings

  Interface for embedding models.

  Methods

  `__init__`() |
  `aembed_documents`(texts) | Asynchronous Embed search docs.
  `aembed_query`(text) | Asynchronous Embed query text.
  `embed_documents`(texts) | Embed search docs.
  `embed_query`(text) | Embed query text.

  __init__()
  async aembed_documents(texts: List[str]) → List[List[float]]

    Asynchronous Embed search docs.

    Parameters

      texts (List[str]) –

    Return type

      List[List[float]]

  async aembed_query(text: str) → List[float]

    Asynchronous Embed query text.

    Parameters

      text (str) –

    Return type

      List[float]

  abstract embed_documents(texts: List[str]) → List[List[float]]

    Embed search docs.

    Parameters

      texts (List[str]) –

    Return type

      List[List[float]]

  abstract embed_query(text: str) → List[float]

    Embed query text.

    Parameters

      text (str) –

    Return type

      List[float]

# Examples using Embeddings

- Ensure that all we need is installed

- elasticsearch_retriever.md