Class: Rubino::Agent::DegenerateResponseRecovery::Directive

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubino/agent/degenerate_recovery.rb

Overview

A directive the runner acts on. ‘kind` is one of:

:use      — return `content` as the final answer (rungs 1, 2)
:nudge    — request.messages was mutated; re-issue the same request (rung 3)
:prefill  — re-issue carrying `seed` as request.prefill (rung 4)
:retry    — re-issue the same request unchanged (rung 5)
:raise    — terminal: raise EmptyModelResponseError (rungs 6→7)

‘attempt` is the 1-based retry index on a :retry, so the runner can escalate its invalid-response backoff across the ≤3 retries.

Instance Attribute Summary collapse

Instance Attribute Details

#attemptObject

Returns the value of attribute attempt

Returns:

  • (Object)

    the current value of attempt



72
73
74
# File 'lib/rubino/agent/degenerate_recovery.rb', line 72

def attempt
  @attempt
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



72
73
74
# File 'lib/rubino/agent/degenerate_recovery.rb', line 72

def content
  @content
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



72
73
74
# File 'lib/rubino/agent/degenerate_recovery.rb', line 72

def kind
  @kind
end

#seedObject

Returns the value of attribute seed

Returns:

  • (Object)

    the current value of seed



72
73
74
# File 'lib/rubino/agent/degenerate_recovery.rb', line 72

def seed
  @seed
end