langchain_community.embeddings.bookend.BookendEmbeddings¶
class langchain_community.embeddings.bookend.BookendEmbeddings[source]¶
Bases: BaseModel, Embeddings
Bookend AI sentence_transformers embedding models.
Example
from langchain_community.embeddings import BookendEmbeddings
bookend = BookendEmbeddings(
    domain={domain}
    api_token={api_token}
    model_id={model_id}
)
bookend.embed_documents([
    "Please put on these earmuffs because I can't you hear.",
    "Baby wipes are made of chocolate stardust.",
])
bookend.embed_query(
    "She only paints with bold colors; she does not like pastels."
)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param api_token: str [Required]¶
Request for an API token at https://bookend.ai/ to use this embeddings module.
param auth_header: dict [Optional]¶
param domain: str [Required]¶
Request for a domain at https://bookend.ai/ to use this embeddings module.
param model_id: str [Required]¶
Embeddings model ID to use.
async aembed_documents(texts: List[str]) → List[List[float]]¶
Asynchronous Embed search docs.
async aembed_query(text: str) → List[float]¶
Asynchronous Embed query text.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values