Class: Assistant::GammaToolBuilder::ListThemesTool
- Inherits:
-
RubyLLM::Tool
- Object
- RubyLLM::Tool
- Assistant::GammaToolBuilder::ListThemesTool
- Defined in:
- app/services/assistant/gamma_tool_builder.rb
Overview
List available Gamma themes from the workspace.
Instance Method Summary collapse
Instance Method Details
#execute(query: nil, **_) ⇒ Object
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'app/services/assistant/gamma_tool_builder.rb', line 494 def execute(query: nil, **_) client = GammaClient.new result = client.list_themes(query: query) if result.success? { success: true, themes: result.data[:themes], has_more: result.data[:has_more] }.to_json else { success: false, error: result.error }.to_json end rescue StandardError => e { success: false, error: "Failed to list themes: #{e.}" }.to_json end |
#name ⇒ Object
492 |
# File 'app/services/assistant/gamma_tool_builder.rb', line 492 def name = 'gamma_list_themes' |