MlflowCohereEmbeddings#

class langchain_community.embeddings.mlflow.MlflowCohereEmbeddings[source]#

Bases: MlflowEmbeddings

Cohere embedding LLMs in MLflow.

param documents_params: Dict[str, str] = {'input_type': 'search_document'}#
param endpoint: str [Required]#

The endpoint to use.

param query_params: Dict[str, str] = {'input_type': 'search_query'}#

The parameters to use for documents.

param target_uri: str [Required]#

The target URI to use.

async aembed_documents(texts: List[str]) List[List[float]]#

Asynchronous Embed search docs.

Parameters:

texts (List[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

List[List[float]]

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

Asynchronous Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

List[float]

embed(texts: List[str], params: Dict[str, str]) List[List[float]]#
Parameters:
  • texts (List[str]) –

  • params (Dict[str, str]) –

Return type:

List[List[float]]

embed_documents(texts: List[str]) List[List[float]]#

Embed search docs.

Parameters:

texts (List[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

List[List[float]]

embed_query(text: str) List[float]#

Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

List[float]