Class: ActiveHarness::Result

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

Overview

Minimal result wrapper returned by Agent#call.

output — raw string from the provider parsed — for format :json: a Ruby Hash/Array; for format :text: same as output usage — token counts: { input_tokens:, output_tokens:, total_tokens: } or nil for streaming cost — { input_cost:, output_cost:, total_cost: } in USD, or nil if pricing unavailable

Instance Attribute Summary collapse

Instance Attribute Details

#attemptsObject

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



10
11
12
# File 'lib/active_harness/result.rb', line 10

def attempts
  @attempts
end

#costObject

Returns the value of attribute cost

Returns:

  • (Object)

    the current value of cost



10
11
12
# File 'lib/active_harness/result.rb', line 10

def cost
  @cost
end

#execution_timeObject

Returns the value of attribute execution_time

Returns:

  • (Object)

    the current value of execution_time



10
11
12
# File 'lib/active_harness/result.rb', line 10

def execution_time
  @execution_time
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



10
11
12
# File 'lib/active_harness/result.rb', line 10

def input
  @input
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



10
11
12
# File 'lib/active_harness/result.rb', line 10

def model
  @model
end

#model_listObject

Returns the value of attribute model_list

Returns:

  • (Object)

    the current value of model_list



10
11
12
# File 'lib/active_harness/result.rb', line 10

def model_list
  @model_list
end

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



10
11
12
# File 'lib/active_harness/result.rb', line 10

def output
  @output
end

#parsedObject

Returns the value of attribute parsed

Returns:

  • (Object)

    the current value of parsed



10
11
12
# File 'lib/active_harness/result.rb', line 10

def parsed
  @parsed
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



10
11
12
# File 'lib/active_harness/result.rb', line 10

def provider
  @provider
end

#system_promptObject

Returns the value of attribute system_prompt

Returns:

  • (Object)

    the current value of system_prompt



10
11
12
# File 'lib/active_harness/result.rb', line 10

def system_prompt
  @system_prompt
end

#temperatureObject

Returns the value of attribute temperature

Returns:

  • (Object)

    the current value of temperature



10
11
12
# File 'lib/active_harness/result.rb', line 10

def temperature
  @temperature
end

#usageObject

Returns the value of attribute usage

Returns:

  • (Object)

    the current value of usage



10
11
12
# File 'lib/active_harness/result.rb', line 10

def usage
  @usage
end