Files
langchain/libs/cli/langchain_cli/integration_template/docs/text_embedding.ipynb
T

2.6 KiB

Cell:
[Cell type raw - unsupported, skipped]

__ModuleName__Embeddings

This notebook covers how to get started with ModuleName embedding models.

Installation

In [ ]:
# install package
!pip install -U __package_name__

Environment Setup

Make sure to set the following environment variables:

  • TODO: fill out relevant environment variables or secrets

Usage

In [ ]:
from __module_name__.embeddings import __ModuleName__Embeddings

embeddings = __ModuleName__Embeddings()
In [ ]:
embeddings.embed_query("My query to look up")
In [ ]:
embeddings.embed_documents(
    ["This is a content of the document", "This is another document"]
)
In [ ]:
# async embed query
await embeddings.aembed_query("My query to look up")
In [ ]:
# async embed documents
await embeddings.aembed_documents(
    ["This is a content of the document", "This is another document"]
)