Class: Langfuse::CLI::Commands::Observations
- Inherits:
-
Thor
- Object
- Thor
- Langfuse::CLI::Commands::Observations
- Defined in:
- lib/langfuse/cli/commands/observations.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
9 10 11 |
# File 'lib/langfuse/cli/commands/observations.rb', line 9 def self.exit_on_failure? true end |
Instance Method Details
#get(observation_id) ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/langfuse/cli/commands/observations.rb', line 68 def get(observation_id) observation = client.get_observation(observation_id) output_result(observation) rescue Client::NotFoundError => e puts "Error: Observation not found - #{observation_id}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |
#list ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/langfuse/cli/commands/observations.rb', line 55 def list filters = build_filters() observations = client.list_observations(filters) output_result(observations) rescue Client::AuthenticationError => e puts "Authentication Error: #{e.message}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |