AgentBlueprintProtocol. BoundsAlgebra. BoundSet
(Agent Blueprint Protocol v1.1.0)
Copy Markdown
View Source
This struct represents a set of named bounds.
Use it when constructing or inspecting bound sources for intersection.
This module does not authorize operations.
Example
AgentBlueprintProtocol.BoundsAlgebra.BoundSet.new(%{max_tokens: 1000})
Summary
Functions
Returns the names of the supported bounds.
Builds and validates a value from the supplied options.
Returns the raw values stored in a bound set.
Types
@type t() :: %AgentBlueprintProtocol.BoundsAlgebra.BoundSet{ bounds: %{optional(atom()) => AgentBlueprintProtocol.BoundsAlgebra.Bound.t()} }
The public data type for AgentBlueprintProtocol.BoundsAlgebra.BoundSet.
Functions
@spec names() :: [atom()]
Returns the names of the supported bounds.
Example
AgentBlueprintProtocol.BoundsAlgebra.BoundSet.names()
@spec new(%{optional(atom()) => term()}) :: {:ok, t()} | {:error, AgentBlueprintProtocol.Error.t()}
Builds and validates a value from the supplied options.
Example
AgentBlueprintProtocol.BoundsAlgebra.BoundSet.new(%{max_tokens: 1000})
@spec to_map(t()) :: {:ok, %{optional(atom()) => term()}} | {:error, AgentBlueprintProtocol.Error.t()}
Returns the raw values stored in a bound set.
Example
{:ok, bounds} =
AgentBlueprintProtocol.BoundsAlgebra.BoundSet.new(%{max_tokens: 1000})
AgentBlueprintProtocol.BoundsAlgebra.BoundSet.to_map(bounds)