Class: Raif::ModelCompletionBatches::Anthropic

Inherits:
Raif::ModelCompletionBatch show all
Defined in:
app/models/raif/model_completion_batches/anthropic.rb

Overview

Anthropic batch persistence. The provider_response jsonb holds Anthropic-specific bookkeeping populated by Raif::Llms::Anthropic#fetch_batch_status!:

{ "results_url" => "...", "cancel_url" => "..." }

Constant Summary

Constants inherited from Raif::ModelCompletionBatch

Raif::ModelCompletionBatch::STATUSES, Raif::ModelCompletionBatch::TERMINAL_STATUSES

Instance Method Summary collapse

Methods inherited from Raif::ModelCompletionBatch

#add_task, #assert_submittable!, #cancel!, #dispatch_completion_handler!, #enqueue_first_poll!, #expire!, #fetch_results!, #fetch_status!, #finalize!, #force_fail!, #llm, #max_age_exceeded?, #recalculate_costs!, #submit!, #successful?, #tasks, #terminal?

Instance Method Details

#cancel_urlObject



53
54
55
# File 'app/models/raif/model_completion_batches/anthropic.rb', line 53

def cancel_url
  provider_response&.dig("cancel_url")
end

#results_urlObject



49
50
51
# File 'app/models/raif/model_completion_batches/anthropic.rb', line 49

def results_url
  provider_response&.dig("results_url")
end