Class: Legion::CLI::Chat::Tools::ProviderHealth
- Inherits:
-
RubyLLM::Tool
- Object
- RubyLLM::Tool
- Legion::CLI::Chat::Tools::ProviderHealth
- Defined in:
- lib/legion/cli/chat/tools/provider_health.rb
Instance Method Summary collapse
Instance Method Details
#execute(provider: nil) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/legion/cli/chat/tools/provider_health.rb', line 21 def execute(provider: nil) return 'LLM gateway not available.' unless gateway_stats_available? if provider format_detail(provider.strip) else format_report end rescue StandardError => e Legion::Logging.warn("ProviderHealth#execute failed: #{e.}") if defined?(Legion::Logging) "Error checking provider health: #{e.}" end |