airflow.providers.cohere.hooks.cohere

Module Contents

Classes

CohereHook

Use Cohere Python SDK to interact with Cohere platform.

class airflow.providers.cohere.hooks.cohere.CohereHook(conn_id=default_conn_name, timeout=None, max_retries=None)[source]

Bases: airflow.hooks.base.BaseHook

Use Cohere Python SDK to interact with Cohere platform.

Parameters
  • conn_id (str) – Cohere connection id

  • timeout (int | None) – Request timeout in seconds.

  • max_retries (int | None) – Maximal number of retries for requests.

conn_name_attr = 'conn_id'[source]
default_conn_name = 'cohere_default'[source]
conn_type = 'cohere'[source]
hook_name = 'Cohere'[source]
get_conn()[source]

Return connection for the hook.

create_embeddings(texts, model='embed-multilingual-v2.0')[source]
classmethod get_ui_field_behaviour()[source]
test_connection()[source]

Was this entry helpful?