AshBaml.Actions.CallBamlFunction (ash_baml v0.2.0)

View Source

Action implementation that calls BAML functions.

This module implements Ash.Resource.Actions.Implementation and is used internally by the call_baml/1 helper macro.

Summary

Functions

Executes the BAML function call action.

Functions

run(input, opts, context)

Executes the BAML function call action.

This callback is invoked by Ash when the action is run. It retrieves the configured BAML client module, constructs the function module name, validates it exists, and delegates the call to the generated BAML function.

Telemetry is automatically integrated based on resource configuration and can be overridden per-action via the telemetry option.

Returns {:ok, result} on success or {:error, reason} on failure.