Class: Langfuse::CLI::Commands::Scores
- Inherits:
-
Thor
- Object
- Thor
- Langfuse::CLI::Commands::Scores
- Defined in:
- lib/langfuse/cli/commands/scores.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
9 10 11 |
# File 'lib/langfuse/cli/commands/scores.rb', line 9 def self.exit_on_failure? true end |
Instance Method Details
#get(score_id) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/langfuse/cli/commands/scores.rb', line 32 def get(score_id) score = client.get_score(score_id) output_result(score) rescue Client::NotFoundError => e puts "Error: Score not found - #{score_id}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |
#list ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/langfuse/cli/commands/scores.rb', line 19 def list filters = build_filters() scores = client.list_scores(filters) output_result(scores) rescue Client::AuthenticationError => e puts "Authentication Error: #{e.message}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |