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