Class: Ask::Agent::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ask/agent/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ask/agent/configuration.rb', line 16

def initialize
  @default_model = "gpt-4o"
  @default_max_turns = 25
  @compactor_enabled = true
  @compactor_threshold = 0.8
  @parallel_tool_execution = true
  @max_tool_retries = 3
  @prompt_caching = false

  @middleware = Middleware::Pipeline.new
  @stream_transforms = StreamTransforms::Pipeline.new
  @scheduler_config = SchedulerConfig.new(self)
end

Instance Attribute Details

#compactor_enabledObject

Returns the value of attribute compactor_enabled.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def compactor_enabled
  @compactor_enabled
end

#compactor_thresholdObject

Returns the value of attribute compactor_threshold.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def compactor_threshold
  @compactor_threshold
end

#default_max_turnsObject

Returns the value of attribute default_max_turns.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def default_max_turns
  @default_max_turns
end

#default_modelObject

Returns the value of attribute default_model.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def default_model
  @default_model
end

#max_tool_retriesObject

Returns the value of attribute max_tool_retries.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def max_tool_retries
  @max_tool_retries
end

#middlewareMiddleware::Pipeline (readonly)

Returns the middleware pipeline for provider calls.

Returns:



11
12
13
# File 'lib/ask/agent/configuration.rb', line 11

def middleware
  @middleware
end

#parallel_tool_executionObject

Returns the value of attribute parallel_tool_execution.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def parallel_tool_execution
  @parallel_tool_execution
end

#prompt_cachingObject

Returns the value of attribute prompt_caching.



6
7
8
# File 'lib/ask/agent/configuration.rb', line 6

def prompt_caching
  @prompt_caching
end

#stream_transformsStreamTransforms::Pipeline (readonly)

Returns the stream transforms pipeline.

Returns:



14
15
16
# File 'lib/ask/agent/configuration.rb', line 14

def stream_transforms
  @stream_transforms
end

Instance Method Details

#schedulerSchedulerConfig

Returns DSL for defining recurring agent tasks.

Returns:



31
32
33
# File 'lib/ask/agent/configuration.rb', line 31

def scheduler
  @scheduler_config
end