Cyclium.Intent.GoalEvaluator behaviour (Cyclium v0.1.5)

Copy Markdown

Called after each interactive episode converges within a conversation. Returns whether the conversation should continue, resolve, or abandon.

Summary

Functions

Dispatches to the appropriate evaluator based on the goal's completion_criteria mode.

Callbacks

evaluate(goal, conversation_state, latest_result)

@callback evaluate(
  goal :: Cyclium.Intent.GoalSpec.t(),
  conversation_state :: map(),
  latest_result :: Cyclium.ConvergeResult.t()
) ::
  :continue
  | {:resolved, outcome :: binary(), result :: map()}
  | {:abandoned, reason :: binary()}

Functions

evaluate(goal, conversation_state, result)

@spec evaluate(Cyclium.Intent.GoalSpec.t(), map(), Cyclium.ConvergeResult.t()) ::
  :continue | {:resolved, binary(), map()} | {:abandoned, binary()}

Dispatches to the appropriate evaluator based on the goal's completion_criteria mode.