pub struct AssistantConfig { /* private fields */ }Expand description
Moneypenny’s settings: which Agent she is and how much the gateway keeps.
Implementations§
Source§impl AssistantConfig
impl AssistantConfig
Sourcepub fn new(agent_id: impl Into<String>) -> Result<Self, GatewayError>
pub fn new(agent_id: impl Into<String>) -> Result<Self, GatewayError>
Moneypenny is the roster Agent agent_id; every other setting at its default.
§Errors
GatewayError::InvalidConfiguration for an empty identifier, one longer than 256
bytes or one with control characters.
Sourcepub fn with_route_text_bytes(self, bytes: usize) -> Self
pub fn with_route_text_bytes(self, bytes: usize) -> Self
The longest text filter an app route may carry, in bytes (default 128, at least 1):
in her links and cards, and in the page a message was sent from. A longer one refuses
the view, or drops the page line.
Sourcepub fn with_limits(self, limits: AssistantLimits) -> Result<Self, GatewayError>
pub fn with_limits(self, limits: AssistantLimits) -> Result<Self, GatewayError>
Holds jobs and reports to limits ([assistant.limits]), as the
Stations do.
§Errors
GatewayError::InvalidConfiguration for limits
AssistantLimits::validate refuses.
Sourcepub fn with_gateway_limits(
self,
limits: AssistantGatewayLimits,
) -> Result<Self, GatewayError>
pub fn with_gateway_limits( self, limits: AssistantGatewayLimits, ) -> Result<Self, GatewayError>
Keeps her conversations within limits ([assistant.gateway]): how many are kept and
for how long, how much each holds, how many run at once, her tokens, proposals and tools.
§Errors
GatewayError::InvalidConfiguration for limits
AssistantGatewayLimits::validate refuses.
Sourcepub fn with_own_agent_limits(
self,
limits: AssistantOwnAgentLimits,
) -> Result<Self, GatewayError>
pub fn with_own_agent_limits( self, limits: AssistantOwnAgentLimits, ) -> Result<Self, GatewayError>
Links people’s own agents by limits ([assistant.own_agent]): codes, links, connections and
what an address may hold open. Read when a socket is accepted, so a changed record reaches
the next connection.
§Errors
GatewayError::InvalidConfiguration for limits ai6::AssistantOwnAgentLimits::validate
refuses.
Sourcepub fn with_cable_limits(self, body_bytes: Limit, default_ttl: Seconds) -> Self
pub fn with_cable_limits(self, body_bytes: Limit, default_ttl: Seconds) -> Self
Refuses a Cable she proposes with a body past body_bytes, and tells the person a
Cable that names no lifetime lasts default_ttl: the cables record’s values
(ai6::CableConfig::message_limits), which the relay applies.
Sourcepub fn with_view_limits(self, limits: ViewLimits) -> Self
pub fn with_view_limits(self, limits: ViewLimits) -> Self
The bounds of the views she shows (ViewLimits, each at least 1); the app is sent
them with each conversation and checks views against the same values.