CouncilEx.Member behaviour (CouncilEx v0.1.0)

Copy Markdown View Source

Behaviour and DSL helpers for council members.

Member modules typically use CouncilEx.Member and configure themselves via role/1 and system_prompt/1. They may override transform_input/2, output_schema/0, or validate/1.

Summary

Functions

Declare an optional output schema module.

Declare the member's role string.

Declare the member's static system prompt.

Callbacks

output_schema()

@callback output_schema() :: module() | nil

role()

@callback role() :: String.t()

system_prompt(input)

@callback system_prompt(input :: map()) :: String.t()

transform_input(input, context)

@callback transform_input(input :: map(), context :: CouncilEx.Context.t()) :: map()

validate(output)

@callback validate(output :: map()) :: :ok | {:error, term()}

Functions

output_schema(module)

(macro)

Declare an optional output schema module.

role(value)

(macro)

Declare the member's role string.

system_prompt(value)

(macro)

Declare the member's static system prompt.