AshAi.Info (ash_ai v0.4.0)

View Source

Introspection functions for the AshAi extension.

Summary

Functions

mcp_resources DSL entities

tools DSL entities

vectorize DSL entities

The name of the AshOban-trigger that will be run in order to update the record's embeddings. Defaults to :ash_ai_update_embeddings.

The name of the AshOban-trigger that will be run in order to update the record's embeddings. Defaults to :ash_ai_update_embeddings.

A keyword list of attributes to vectorize, and the name of the attribute to store the vector in

A keyword list of attributes to vectorize, and the name of the attribute to store the vector in

If true, an ash_ai_update_embeddings update action will be defined, which will automatically update the embeddings when run.

vectorize DSL options

How to compute the vector. Currently supported strategies are :after_action, :manual, and :ash_oban.

How to compute the vector. Currently supported strategies are :after_action, :manual, and :ash_oban.

Functions

mcp_resources(dsl_or_extended)

@spec mcp_resources(dsl_or_extended :: module() | map()) :: [struct()]

mcp_resources DSL entities

tools(dsl_or_extended)

@spec tools(dsl_or_extended :: module() | map()) :: [struct()]

tools DSL entities

vectorize(dsl_or_extended)

@spec vectorize(dsl_or_extended :: module() | map()) :: [struct()]

vectorize DSL entities

vectorize_ash_oban_trigger_name(dsl_or_extended)

@spec vectorize_ash_oban_trigger_name(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The name of the AshOban-trigger that will be run in order to update the record's embeddings. Defaults to :ash_ai_update_embeddings.

vectorize_ash_oban_trigger_name!(dsl_or_extended)

@spec vectorize_ash_oban_trigger_name!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The name of the AshOban-trigger that will be run in order to update the record's embeddings. Defaults to :ash_ai_update_embeddings.

vectorize_attributes(dsl_or_extended)

@spec vectorize_attributes(dsl_or_extended :: module() | map()) ::
  {:ok, keyword()} | :error

A keyword list of attributes to vectorize, and the name of the attribute to store the vector in

vectorize_attributes!(dsl_or_extended)

@spec vectorize_attributes!(dsl_or_extended :: module() | map()) ::
  keyword() | no_return()

A keyword list of attributes to vectorize, and the name of the attribute to store the vector in

vectorize_define_update_action_for_manual_strategy?(dsl_or_extended)

@spec vectorize_define_update_action_for_manual_strategy?(
  dsl_or_extended :: module() | map()
) ::
  boolean()

If true, an ash_ai_update_embeddings update action will be defined, which will automatically update the embeddings when run.

vectorize_options(dsl_or_extended)

@spec vectorize_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

vectorize DSL options

Returns a map containing the and any configured or default values.

vectorize_strategy(dsl_or_extended)

@spec vectorize_strategy(dsl_or_extended :: module() | map()) ::
  {:ok, :ash_oban_manual | :ash_oban | :manual | :after_action} | :error

How to compute the vector. Currently supported strategies are :after_action, :manual, and :ash_oban.

vectorize_strategy!(dsl_or_extended)

@spec vectorize_strategy!(dsl_or_extended :: module() | map()) ::
  (:ash_oban_manual | :ash_oban | :manual | :after_action) | no_return()

How to compute the vector. Currently supported strategies are :after_action, :manual, and :ash_oban.