langchain_core.embeddings.embeddings.Embeddings

class langchain_core.embeddings.embeddings.Embeddings[source]

用于嵌入模型的接口。

Methods

__init__()

aembed_documents(texts)

Asynchronous 嵌入搜索文档。

aembed_query(text)

Asynchronous 嵌入查询文本。

embed_documents(texts)

嵌入搜索文档。

embed_query(text)

嵌入查询文本。

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

Asynchronous 嵌入搜索文档。

Parameters

texts (List[str]) –

Return type

List[List[float]]

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

Asynchronous 嵌入查询文本。

Parameters

text (str) –

Return type

List[float]

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

嵌入搜索文档。

Parameters

texts (List[str]) –

Return type

List[List[float]]

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

嵌入查询文本。

Parameters

text (str) –

Return type

List[float]

Examples using Embeddings