Class: Prescient::Agent::Configuration
- Inherits:
-
Object
- Object
- Prescient::Agent::Configuration
- Defined in:
- lib/prescient/agent/configuration.rb
Overview
Runtime policies and safety limits for one agent execution.
Constant Summary collapse
- DEFAULT_MAX_LOOPS =
Returns Default maximum loop count.
5- DEFAULT_MAX_CONTEXT_BYTES =
Returns Default context size limit.
64_000- DEFAULT_MAX_ACTION_BYTES =
Returns Default action size limit.
8_192- DEFAULT_MAX_OBSERVATION_BYTES =
Returns Default observation size limit.
16_384- DEFAULT_MAX_TASK_BYTES =
Returns Default task size limit.
8_192- DEFAULT_MAX_RESPONSE_BYTES =
Returns Default generated response size limit.
32_768
Instance Attribute Summary collapse
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#max_action_bytes ⇒ Object
readonly
Returns the value of attribute max_action_bytes.
-
#max_context_bytes ⇒ Object
readonly
Returns the value of attribute max_context_bytes.
-
#max_loops ⇒ Object
readonly
Returns the value of attribute max_loops.
-
#max_observation_bytes ⇒ Object
readonly
Returns the value of attribute max_observation_bytes.
-
#max_response_bytes ⇒ Object
readonly
Returns the value of attribute max_response_bytes.
-
#max_task_bytes ⇒ Object
readonly
Returns the value of attribute max_task_bytes.
-
#telemetry ⇒ Object
readonly
Returns the value of attribute telemetry.
Instance Method Summary collapse
-
#initialize(max_loops: DEFAULT_MAX_LOOPS, max_context_bytes: DEFAULT_MAX_CONTEXT_BYTES, max_action_bytes: DEFAULT_MAX_ACTION_BYTES, max_observation_bytes: DEFAULT_MAX_OBSERVATION_BYTES, max_task_bytes: DEFAULT_MAX_TASK_BYTES, max_response_bytes: DEFAULT_MAX_RESPONSE_BYTES, authorization: nil, telemetry: nil) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(max_loops: DEFAULT_MAX_LOOPS, max_context_bytes: DEFAULT_MAX_CONTEXT_BYTES, max_action_bytes: DEFAULT_MAX_ACTION_BYTES, max_observation_bytes: DEFAULT_MAX_OBSERVATION_BYTES, max_task_bytes: DEFAULT_MAX_TASK_BYTES, max_response_bytes: DEFAULT_MAX_RESPONSE_BYTES, authorization: nil, telemetry: nil) ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/prescient/agent/configuration.rb', line 26 def initialize(max_loops: DEFAULT_MAX_LOOPS, max_context_bytes: DEFAULT_MAX_CONTEXT_BYTES, max_action_bytes: DEFAULT_MAX_ACTION_BYTES, max_observation_bytes: DEFAULT_MAX_OBSERVATION_BYTES, max_task_bytes: DEFAULT_MAX_TASK_BYTES, max_response_bytes: DEFAULT_MAX_RESPONSE_BYTES, authorization: nil, telemetry: nil) @max_loops = positive_integer(max_loops, "max_loops") @max_context_bytes = positive_integer(max_context_bytes, "max_context_bytes") @max_action_bytes = positive_integer(max_action_bytes, "max_action_bytes") @max_observation_bytes = positive_integer(max_observation_bytes, "max_observation_bytes") @max_task_bytes = positive_integer(max_task_bytes, "max_task_bytes") @max_response_bytes = positive_integer(max_response_bytes, "max_response_bytes") @authorization = callable_or_nil(, "authorization") @telemetry = callable_or_nil(telemetry, "telemetry") end |
Instance Attribute Details
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def @authorization end |
#max_action_bytes ⇒ Object (readonly)
Returns the value of attribute max_action_bytes.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_action_bytes @max_action_bytes end |
#max_context_bytes ⇒ Object (readonly)
Returns the value of attribute max_context_bytes.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_context_bytes @max_context_bytes end |
#max_loops ⇒ Object (readonly)
Returns the value of attribute max_loops.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_loops @max_loops end |
#max_observation_bytes ⇒ Object (readonly)
Returns the value of attribute max_observation_bytes.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_observation_bytes @max_observation_bytes end |
#max_response_bytes ⇒ Object (readonly)
Returns the value of attribute max_response_bytes.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_response_bytes @max_response_bytes end |
#max_task_bytes ⇒ Object (readonly)
Returns the value of attribute max_task_bytes.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def max_task_bytes @max_task_bytes end |
#telemetry ⇒ Object (readonly)
Returns the value of attribute telemetry.
20 21 22 |
# File 'lib/prescient/agent/configuration.rb', line 20 def telemetry @telemetry end |