AgentBlueprintProtocol.BoundsAlgebra.Bound (Agent Blueprint Protocol v1.1.0)

Copy Markdown View Source

This struct represents one named bound and its value.

Use it when inspecting a bound in a validated bound set.

This module does not authorize operations.

Example

%AgentBlueprintProtocol.BoundsAlgebra.Bound{name: :max_tokens, class: :operational, unit: :token, value: 1000}

Summary

Types

t()

The public data type for AgentBlueprintProtocol.BoundsAlgebra.Bound.

Functions

Reports whether the first bound is strictly narrower than the second.

Types

t()

(since 1.0.0)
@type t() :: %AgentBlueprintProtocol.BoundsAlgebra.Bound{
  class: :operational | :protected,
  name: atom(),
  unit: :count | :millisecond | :token | :money | :ordinal,
  value: term()
}

The public data type for AgentBlueprintProtocol.BoundsAlgebra.Bound.

Functions

narrower(arg1, arg2)

(since 1.0.0)
@spec narrower(t(), t()) :: boolean()

Reports whether the first bound is strictly narrower than the second.

Example

narrower = %AgentBlueprintProtocol.BoundsAlgebra.Bound{
  name: :max_tokens,
  class: :operational,
  unit: :token,
  value: 100
}
wider = %{narrower | value: 200}
AgentBlueprintProtocol.BoundsAlgebra.Bound.narrower(narrower, wider)