BaseSparseEmbedding#

class langchain_milvus.utils.sparse.BaseSparseEmbedding[source]#

Interface for Sparse embedding models.

You can inherit from it and implement your custom sparse embedding model.

Methods

__init__()

embed_documents(texts)

Embed search docs.

embed_query(query)

Embed query text.

__init__()#
abstract embed_documents(texts: List[str]) List[Dict[int, float]][source]#

Embed search docs.

Parameters:

texts (List[str]) –

Return type:

List[Dict[int, float]]

abstract embed_query(query: str) Dict[int, float][source]#

Embed query text.

Parameters:

query (str) –

Return type:

Dict[int, float]