Class: ActiveHarness::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_harness/result.rb

Overview

Result returned by Agent#call (accessible via agent.result).

result.input            — original input string
result.output           — raw string from the provider
result.processed        — parsed Hash/Array for :json agents, raw string for :text
result.system_prompt    — resolved system prompt string
result.model            — ModelInfo (name, provider, temperature, context_window, pricing)
result.model_list       — full model chain proxy
result.attempts         — Array of failed attempt entries before success
result.execution_time   — wall-clock seconds for the successful call
result.usage            — UsageInfo (tokens + cost), nil for streaming without usage

Instance Attribute Summary collapse

Instance Attribute Details

#attemptsObject

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



52
53
54
# File 'lib/active_harness/result.rb', line 52

def attempts
  @attempts
end

#execution_timeObject

Returns the value of attribute execution_time

Returns:

  • (Object)

    the current value of execution_time



52
53
54
# File 'lib/active_harness/result.rb', line 52

def execution_time
  @execution_time
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



52
53
54
# File 'lib/active_harness/result.rb', line 52

def input
  @input
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



52
53
54
# File 'lib/active_harness/result.rb', line 52

def model
  @model
end

#model_listObject

Returns the value of attribute model_list

Returns:

  • (Object)

    the current value of model_list



52
53
54
# File 'lib/active_harness/result.rb', line 52

def model_list
  @model_list
end

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



52
53
54
# File 'lib/active_harness/result.rb', line 52

def output
  @output
end

#processedObject

Returns the value of attribute processed

Returns:

  • (Object)

    the current value of processed



52
53
54
# File 'lib/active_harness/result.rb', line 52

def processed
  @processed
end

#system_promptObject

Returns the value of attribute system_prompt

Returns:

  • (Object)

    the current value of system_prompt



52
53
54
# File 'lib/active_harness/result.rb', line 52

def system_prompt
  @system_prompt
end

#usageObject

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



52
53
54
# File 'lib/active_harness/result.rb', line 52

def usage
  @usage
end