Introspection functions for the AshAi extension.
Summary
Functions
Returns only %AshAi.McpResource{} entities (action-based) from the :mcp_resources section.
mcp_resources DSL entities
Returns only %AshAi.McpUiResource{} entities from the :mcp_resources section.
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
@spec mcp_action_resources(module() | map()) :: [AshAi.McpResource.t()]
Returns only %AshAi.McpResource{} entities (action-based) from the :mcp_resources section.
mcp_resources DSL entities
@spec mcp_ui_resources(module() | map()) :: [AshAi.McpUiResource.t()]
Returns only %AshAi.McpUiResource{} entities from the :mcp_resources section.
Spark's auto-generated mcp_resources/1 returns all entities in the section
(both mcp_resource and mcp_ui_resource). This function filters to UI resources only.
tools DSL entities
vectorize DSL entities
@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.
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
@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 DSL options
Returns a map containing the and any configured or default values.
@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.
@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.