Class: RubyLLM::Evals::PromptExecutions::RetriesController

Inherits:
ApplicationController
  • Object
show all
Includes:
PromptExecutionScoped
Defined in:
app/controllers/ruby_llm/evals/prompt_executions/retries_controller.rb

Instance Method Summary collapse

Instance Method Details

#create ⇒ Object



7
8
9
10
11
12
# File 'app/controllers/ruby_llm/evals/prompt_executions/retries_controller.rb', line 7

def create
  @prompt_execution.retry_job
  redirect_to @prompt_execution.run, notice: "Prompt execution retried.", status: :see_other
rescue StandardError => e
  redirect_to @prompt_execution.run, alert: "Failed to retry: #{e.message}", status: :see_other
end