airflow.providers.snowflake.operators.snowflake_cortex_agent¶
Classes¶
Execute a Snowflake Cortex Agent. |
Module Contents¶
- class airflow.providers.snowflake.operators.snowflake_cortex_agent.SnowflakeCortexAgentOperator(*, database, schema, agent_name, messages, thread_id=None, parent_message_id=None, tool_choice=None, models=None, instructions=None, orchestration=None, tools=None, tool_resources=None, timeout=600, snowflake_conn_id='snowflake_default', **kwargs)[source]¶
Bases:
airflow.providers.common.compat.sdk.BaseOperatorExecute a Snowflake Cortex Agent.
- Parameters:
database (str) – Database containing the Cortex Agent.
schema (str) – Schema containing the Cortex Agent.
agent_name (str) – Name of the Cortex Agent.
messages (list[dict[str, Any]]) – Conversation messages to send to the agent.
thread_id (int | None) – Existing conversation thread identifier. Optional. Defaults to
None.parent_message_id (int | None) – Parent message identifier within the specified thread. Required when
thread_idis provided. Defaults toNone.tool_choice (dict[str, Any] | None) – Tool selection configuration. Optional. Defaults to
None.models (dict[str, Any] | None) – Model configuration. Optional. Defaults to
None.instructions (dict[str, Any] | None) – Agent instruction overrides. Optional. Defaults to
None.orchestration (dict[str, Any] | None) – Orchestration configuration. Optional. Defaults to
None.tools (list[dict[str, Any]] | None) – Additional tools available to the agent. Optional. Defaults to
None.tool_resources (dict[str, Any] | None) – Configuration for tools specified in
tools. Optional. Defaults toNone.timeout (int | None) – Maximum time in seconds to wait for the request to complete. Defaults to
600.snowflake_conn_id (str) – Snowflake connection ID. Defaults to
snowflake_default.
- template_fields: collections.abc.Sequence[str] = ('database', 'schema', 'agent_name', 'messages')[source]¶
- property hook: airflow.providers.snowflake.hooks.snowflake_cortex_agent.SnowflakeCortexAgentHook[source]¶
Return the Snowflake Cortex Agent hook.