ruby_llm-agents 0.5.0 → 1.0.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +189 -31
- data/app/controllers/ruby_llm/agents/agents_controller.rb +136 -16
- data/app/controllers/ruby_llm/agents/dashboard_controller.rb +29 -9
- data/app/controllers/ruby_llm/agents/workflows_controller.rb +355 -0
- data/app/helpers/ruby_llm/agents/application_helper.rb +25 -0
- data/app/models/ruby_llm/agents/execution.rb +3 -0
- data/app/models/ruby_llm/agents/tenant_budget.rb +58 -15
- data/app/services/ruby_llm/agents/agent_registry.rb +51 -12
- data/app/views/layouts/ruby_llm/agents/application.html.erb +2 -29
- data/app/views/ruby_llm/agents/agents/_agent.html.erb +13 -1
- data/app/views/ruby_llm/agents/agents/_config_agent.html.erb +235 -0
- data/app/views/ruby_llm/agents/agents/_config_embedder.html.erb +70 -0
- data/app/views/ruby_llm/agents/agents/_config_image_generator.html.erb +152 -0
- data/app/views/ruby_llm/agents/agents/_config_moderator.html.erb +63 -0
- data/app/views/ruby_llm/agents/agents/_config_speaker.html.erb +108 -0
- data/app/views/ruby_llm/agents/agents/_config_transcriber.html.erb +91 -0
- data/app/views/ruby_llm/agents/agents/_workflow.html.erb +1 -1
- data/app/views/ruby_llm/agents/agents/index.html.erb +74 -9
- data/app/views/ruby_llm/agents/agents/show.html.erb +18 -378
- data/app/views/ruby_llm/agents/dashboard/_agent_comparison.html.erb +269 -15
- data/app/views/ruby_llm/agents/executions/show.html.erb +16 -0
- data/app/views/ruby_llm/agents/shared/_agent_type_badge.html.erb +93 -0
- data/app/views/ruby_llm/agents/workflows/_step_performance.html.erb +236 -0
- data/app/views/ruby_llm/agents/workflows/_structure_parallel.html.erb +76 -0
- data/app/views/ruby_llm/agents/workflows/_structure_pipeline.html.erb +74 -0
- data/app/views/ruby_llm/agents/workflows/_structure_router.html.erb +108 -0
- data/app/views/ruby_llm/agents/workflows/show.html.erb +442 -0
- data/config/routes.rb +1 -0
- data/lib/generators/ruby_llm_agents/agent_generator.rb +56 -7
- data/lib/generators/ruby_llm_agents/background_remover_generator.rb +110 -0
- data/lib/generators/ruby_llm_agents/embedder_generator.rb +107 -0
- data/lib/generators/ruby_llm_agents/image_analyzer_generator.rb +115 -0
- data/lib/generators/ruby_llm_agents/image_editor_generator.rb +108 -0
- data/lib/generators/ruby_llm_agents/image_generator_generator.rb +116 -0
- data/lib/generators/ruby_llm_agents/image_pipeline_generator.rb +178 -0
- data/lib/generators/ruby_llm_agents/image_transformer_generator.rb +109 -0
- data/lib/generators/ruby_llm_agents/image_upscaler_generator.rb +103 -0
- data/lib/generators/ruby_llm_agents/image_variator_generator.rb +102 -0
- data/lib/generators/ruby_llm_agents/install_generator.rb +76 -4
- data/lib/generators/ruby_llm_agents/restructure_generator.rb +292 -0
- data/lib/generators/ruby_llm_agents/speaker_generator.rb +121 -0
- data/lib/generators/ruby_llm_agents/templates/add_execution_type_migration.rb.tt +8 -0
- data/lib/generators/ruby_llm_agents/templates/agent.rb.tt +99 -84
- data/lib/generators/ruby_llm_agents/templates/application_agent.rb.tt +42 -40
- data/lib/generators/ruby_llm_agents/templates/application_background_remover.rb.tt +26 -0
- data/lib/generators/ruby_llm_agents/templates/application_embedder.rb.tt +50 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_analyzer.rb.tt +26 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_editor.rb.tt +20 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_generator.rb.tt +38 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_pipeline.rb.tt +139 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_transformer.rb.tt +21 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_upscaler.rb.tt +20 -0
- data/lib/generators/ruby_llm_agents/templates/application_image_variator.rb.tt +20 -0
- data/lib/generators/ruby_llm_agents/templates/application_speaker.rb.tt +49 -0
- data/lib/generators/ruby_llm_agents/templates/application_transcriber.rb.tt +53 -0
- data/lib/generators/ruby_llm_agents/templates/background_remover.rb.tt +44 -0
- data/lib/generators/ruby_llm_agents/templates/embedder.rb.tt +41 -0
- data/lib/generators/ruby_llm_agents/templates/image_analyzer.rb.tt +45 -0
- data/lib/generators/ruby_llm_agents/templates/image_editor.rb.tt +35 -0
- data/lib/generators/ruby_llm_agents/templates/image_generator.rb.tt +47 -0
- data/lib/generators/ruby_llm_agents/templates/image_pipeline.rb.tt +50 -0
- data/lib/generators/ruby_llm_agents/templates/image_transformer.rb.tt +44 -0
- data/lib/generators/ruby_llm_agents/templates/image_upscaler.rb.tt +38 -0
- data/lib/generators/ruby_llm_agents/templates/image_variator.rb.tt +33 -0
- data/lib/generators/ruby_llm_agents/templates/skills/AGENTS.md.tt +228 -0
- data/lib/generators/ruby_llm_agents/templates/skills/BACKGROUND_REMOVERS.md.tt +131 -0
- data/lib/generators/ruby_llm_agents/templates/skills/EMBEDDERS.md.tt +255 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_ANALYZERS.md.tt +120 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_EDITORS.md.tt +102 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_GENERATORS.md.tt +282 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_PIPELINES.md.tt +228 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_TRANSFORMERS.md.tt +120 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_UPSCALERS.md.tt +110 -0
- data/lib/generators/ruby_llm_agents/templates/skills/IMAGE_VARIATORS.md.tt +120 -0
- data/lib/generators/ruby_llm_agents/templates/skills/SPEAKERS.md.tt +212 -0
- data/lib/generators/ruby_llm_agents/templates/skills/TOOLS.md.tt +227 -0
- data/lib/generators/ruby_llm_agents/templates/skills/TRANSCRIBERS.md.tt +251 -0
- data/lib/generators/ruby_llm_agents/templates/skills/WORKFLOWS.md.tt +300 -0
- data/lib/generators/ruby_llm_agents/templates/speaker.rb.tt +56 -0
- data/lib/generators/ruby_llm_agents/templates/transcriber.rb.tt +51 -0
- data/lib/generators/ruby_llm_agents/transcriber_generator.rb +107 -0
- data/lib/generators/ruby_llm_agents/upgrade_generator.rb +152 -1
- data/lib/ruby_llm/agents/audio/speaker.rb +553 -0
- data/lib/ruby_llm/agents/audio/transcriber.rb +669 -0
- data/lib/ruby_llm/agents/base_agent.rb +675 -0
- data/lib/ruby_llm/agents/core/base/moderation_dsl.rb +181 -0
- data/lib/ruby_llm/agents/core/base/moderation_execution.rb +274 -0
- data/lib/ruby_llm/agents/core/base.rb +135 -0
- data/lib/ruby_llm/agents/core/configuration.rb +981 -0
- data/lib/ruby_llm/agents/core/errors.rb +150 -0
- data/lib/ruby_llm/agents/{instrumentation.rb → core/instrumentation.rb} +22 -1
- data/lib/ruby_llm/agents/core/llm_tenant.rb +358 -0
- data/lib/ruby_llm/agents/{version.rb → core/version.rb} +1 -1
- data/lib/ruby_llm/agents/dsl/base.rb +110 -0
- data/lib/ruby_llm/agents/dsl/caching.rb +142 -0
- data/lib/ruby_llm/agents/dsl/reliability.rb +307 -0
- data/lib/ruby_llm/agents/dsl.rb +41 -0
- data/lib/ruby_llm/agents/image/analyzer/dsl.rb +130 -0
- data/lib/ruby_llm/agents/image/analyzer/execution.rb +402 -0
- data/lib/ruby_llm/agents/image/analyzer.rb +90 -0
- data/lib/ruby_llm/agents/image/background_remover/dsl.rb +154 -0
- data/lib/ruby_llm/agents/image/background_remover/execution.rb +240 -0
- data/lib/ruby_llm/agents/image/background_remover.rb +89 -0
- data/lib/ruby_llm/agents/image/concerns/image_operation_dsl.rb +91 -0
- data/lib/ruby_llm/agents/image/concerns/image_operation_execution.rb +165 -0
- data/lib/ruby_llm/agents/image/editor/dsl.rb +56 -0
- data/lib/ruby_llm/agents/image/editor/execution.rb +207 -0
- data/lib/ruby_llm/agents/image/editor.rb +92 -0
- data/lib/ruby_llm/agents/image/generator/active_storage_support.rb +127 -0
- data/lib/ruby_llm/agents/image/generator/content_policy.rb +95 -0
- data/lib/ruby_llm/agents/image/generator/pricing.rb +353 -0
- data/lib/ruby_llm/agents/image/generator/templates.rb +124 -0
- data/lib/ruby_llm/agents/image/generator.rb +455 -0
- data/lib/ruby_llm/agents/image/pipeline/dsl.rb +213 -0
- data/lib/ruby_llm/agents/image/pipeline/execution.rb +382 -0
- data/lib/ruby_llm/agents/image/pipeline.rb +97 -0
- data/lib/ruby_llm/agents/image/transformer/dsl.rb +148 -0
- data/lib/ruby_llm/agents/image/transformer/execution.rb +223 -0
- data/lib/ruby_llm/agents/image/transformer.rb +95 -0
- data/lib/ruby_llm/agents/image/upscaler/dsl.rb +83 -0
- data/lib/ruby_llm/agents/image/upscaler/execution.rb +219 -0
- data/lib/ruby_llm/agents/image/upscaler.rb +81 -0
- data/lib/ruby_llm/agents/image/variator/dsl.rb +62 -0
- data/lib/ruby_llm/agents/image/variator/execution.rb +189 -0
- data/lib/ruby_llm/agents/image/variator.rb +80 -0
- data/lib/ruby_llm/agents/{alert_manager.rb → infrastructure/alert_manager.rb} +17 -22
- data/lib/ruby_llm/agents/infrastructure/budget/budget_query.rb +145 -0
- data/lib/ruby_llm/agents/infrastructure/budget/config_resolver.rb +149 -0
- data/lib/ruby_llm/agents/infrastructure/budget/forecaster.rb +68 -0
- data/lib/ruby_llm/agents/infrastructure/budget/spend_recorder.rb +279 -0
- data/lib/ruby_llm/agents/infrastructure/budget_tracker.rb +275 -0
- data/lib/ruby_llm/agents/{execution_logger_job.rb → infrastructure/execution_logger_job.rb} +17 -1
- data/lib/ruby_llm/agents/{reliability → infrastructure/reliability}/executor.rb +2 -1
- data/lib/ruby_llm/agents/{reliability → infrastructure/reliability}/retry_strategy.rb +9 -3
- data/lib/ruby_llm/agents/{reliability.rb → infrastructure/reliability.rb} +11 -21
- data/lib/ruby_llm/agents/pipeline/builder.rb +215 -0
- data/lib/ruby_llm/agents/pipeline/context.rb +255 -0
- data/lib/ruby_llm/agents/pipeline/executor.rb +86 -0
- data/lib/ruby_llm/agents/pipeline/middleware/base.rb +124 -0
- data/lib/ruby_llm/agents/pipeline/middleware/budget.rb +95 -0
- data/lib/ruby_llm/agents/pipeline/middleware/cache.rb +171 -0
- data/lib/ruby_llm/agents/pipeline/middleware/instrumentation.rb +415 -0
- data/lib/ruby_llm/agents/pipeline/middleware/reliability.rb +276 -0
- data/lib/ruby_llm/agents/pipeline/middleware/tenant.rb +196 -0
- data/lib/ruby_llm/agents/pipeline.rb +68 -0
- data/lib/ruby_llm/agents/{engine.rb → rails/engine.rb} +79 -11
- data/lib/ruby_llm/agents/results/background_removal_result.rb +286 -0
- data/lib/ruby_llm/agents/{result.rb → results/base.rb} +73 -1
- data/lib/ruby_llm/agents/results/embedding_result.rb +243 -0
- data/lib/ruby_llm/agents/results/image_analysis_result.rb +314 -0
- data/lib/ruby_llm/agents/results/image_edit_result.rb +250 -0
- data/lib/ruby_llm/agents/results/image_generation_result.rb +346 -0
- data/lib/ruby_llm/agents/results/image_pipeline_result.rb +399 -0
- data/lib/ruby_llm/agents/results/image_transform_result.rb +251 -0
- data/lib/ruby_llm/agents/results/image_upscale_result.rb +255 -0
- data/lib/ruby_llm/agents/results/image_variation_result.rb +237 -0
- data/lib/ruby_llm/agents/results/moderation_result.rb +158 -0
- data/lib/ruby_llm/agents/results/speech_result.rb +338 -0
- data/lib/ruby_llm/agents/results/transcription_result.rb +408 -0
- data/lib/ruby_llm/agents/text/embedder.rb +444 -0
- data/lib/ruby_llm/agents/text/moderator.rb +237 -0
- data/lib/ruby_llm/agents/workflow/async.rb +220 -0
- data/lib/ruby_llm/agents/workflow/async_executor.rb +156 -0
- data/lib/ruby_llm/agents/{workflow.rb → workflow/orchestrator.rb} +6 -5
- data/lib/ruby_llm/agents/workflow/parallel.rb +34 -17
- data/lib/ruby_llm/agents/workflow/thread_pool.rb +185 -0
- data/lib/ruby_llm/agents.rb +86 -20
- metadata +172 -34
- data/lib/ruby_llm/agents/base/caching.rb +0 -40
- data/lib/ruby_llm/agents/base/cost_calculation.rb +0 -105
- data/lib/ruby_llm/agents/base/dsl.rb +0 -324
- data/lib/ruby_llm/agents/base/execution.rb +0 -366
- data/lib/ruby_llm/agents/base/reliability_dsl.rb +0 -82
- data/lib/ruby_llm/agents/base/reliability_execution.rb +0 -136
- data/lib/ruby_llm/agents/base/response_building.rb +0 -86
- data/lib/ruby_llm/agents/base/tool_tracking.rb +0 -57
- data/lib/ruby_llm/agents/base.rb +0 -210
- data/lib/ruby_llm/agents/budget_tracker.rb +0 -733
- data/lib/ruby_llm/agents/configuration.rb +0 -394
- /data/lib/ruby_llm/agents/{deprecations.rb → core/deprecations.rb} +0 -0
- /data/lib/ruby_llm/agents/{inflections.rb → core/inflections.rb} +0 -0
- /data/lib/ruby_llm/agents/{resolved_config.rb → core/resolved_config.rb} +0 -0
- /data/lib/ruby_llm/agents/{attempt_tracker.rb → infrastructure/attempt_tracker.rb} +0 -0
- /data/lib/ruby_llm/agents/{cache_helper.rb → infrastructure/cache_helper.rb} +0 -0
- /data/lib/ruby_llm/agents/{circuit_breaker.rb → infrastructure/circuit_breaker.rb} +0 -0
- /data/lib/ruby_llm/agents/{redactor.rb → infrastructure/redactor.rb} +0 -0
- /data/lib/ruby_llm/agents/{reliability → infrastructure/reliability}/breaker_manager.rb +0 -0
- /data/lib/ruby_llm/agents/{reliability → infrastructure/reliability}/execution_constraints.rb +0 -0
- /data/lib/ruby_llm/agents/{reliability → infrastructure/reliability}/fallback_routing.rb +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<%# Configuration partial for Speaker types %>
|
|
2
|
+
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6 mb-6">
|
|
3
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4">
|
|
4
|
+
Configuration
|
|
5
|
+
</h3>
|
|
6
|
+
|
|
7
|
+
<!-- TTS Configuration -->
|
|
8
|
+
<p class="text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3">
|
|
9
|
+
Text-to-Speech Settings
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
13
|
+
<div>
|
|
14
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Model</p>
|
|
15
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
16
|
+
<%= config[:model] %>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div>
|
|
21
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Provider</p>
|
|
22
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
23
|
+
<% if config[:provider] %>
|
|
24
|
+
<%= config[:provider].to_s.titleize %>
|
|
25
|
+
<% else %>
|
|
26
|
+
<span class="text-gray-400 dark:text-gray-500">Default</span>
|
|
27
|
+
<% end %>
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div>
|
|
32
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Voice</p>
|
|
33
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
34
|
+
<% if config[:voice] %>
|
|
35
|
+
<%= config[:voice] %>
|
|
36
|
+
<% else %>
|
|
37
|
+
<span class="text-gray-400 dark:text-gray-500">Default</span>
|
|
38
|
+
<% end %>
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div>
|
|
43
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Speed</p>
|
|
44
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
45
|
+
<%= config[:speed] || 1.0 %>x
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
51
|
+
<div>
|
|
52
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Output Format</p>
|
|
53
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
54
|
+
<%= config[:output_format] || :mp3 %>
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div>
|
|
59
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Streaming</p>
|
|
60
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
61
|
+
<% if config[:streaming] %>
|
|
62
|
+
<span class="text-green-600 dark:text-green-400">Enabled</span>
|
|
63
|
+
<% else %>
|
|
64
|
+
<span class="text-gray-400 dark:text-gray-500">Disabled</span>
|
|
65
|
+
<% end %>
|
|
66
|
+
</p>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div>
|
|
70
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">SSML</p>
|
|
71
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
72
|
+
<% if config[:ssml_enabled] %>
|
|
73
|
+
<span class="text-green-600 dark:text-green-400">Enabled</span>
|
|
74
|
+
<% else %>
|
|
75
|
+
<span class="text-gray-400 dark:text-gray-500">Disabled</span>
|
|
76
|
+
<% end %>
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div>
|
|
81
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Cache</p>
|
|
82
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
83
|
+
<% if config[:cache_enabled] %>
|
|
84
|
+
Enabled (<%= config[:cache_ttl].inspect %>)
|
|
85
|
+
<% else %>
|
|
86
|
+
<span class="text-gray-400 dark:text-gray-500">Disabled</span>
|
|
87
|
+
<% end %>
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<!-- Info Section -->
|
|
93
|
+
<div class="border-t border-gray-100 dark:border-gray-700 pt-4">
|
|
94
|
+
<div class="flex items-start gap-3 p-3 rounded-lg bg-purple-50 dark:bg-purple-900/20">
|
|
95
|
+
<div class="flex-shrink-0 mt-0.5">
|
|
96
|
+
<svg class="w-5 h-5 text-purple-500" fill="currentColor" viewBox="0 0 20 20">
|
|
97
|
+
<path fill-rule="evenodd" d="M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z" clip-rule="evenodd"/>
|
|
98
|
+
</svg>
|
|
99
|
+
</div>
|
|
100
|
+
<div>
|
|
101
|
+
<p class="text-sm font-medium text-gray-900 dark:text-gray-100">Speaker</p>
|
|
102
|
+
<p class="text-xs text-gray-600 dark:text-gray-400 mt-1">
|
|
103
|
+
Converts text to natural-sounding speech audio. Supports multiple voices, speeds, and output formats.
|
|
104
|
+
</p>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<%# Configuration partial for Transcriber types %>
|
|
2
|
+
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6 mb-6">
|
|
3
|
+
<h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4">
|
|
4
|
+
Configuration
|
|
5
|
+
</h3>
|
|
6
|
+
|
|
7
|
+
<!-- Transcription Configuration -->
|
|
8
|
+
<p class="text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3">
|
|
9
|
+
Transcription Settings
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
13
|
+
<div>
|
|
14
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Model</p>
|
|
15
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
16
|
+
<%= config[:model] %>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div>
|
|
21
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Language</p>
|
|
22
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
23
|
+
<% if config[:language] %>
|
|
24
|
+
<%= config[:language].upcase %>
|
|
25
|
+
<% else %>
|
|
26
|
+
<span class="text-gray-400 dark:text-gray-500">Auto-detect</span>
|
|
27
|
+
<% end %>
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div>
|
|
32
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Output Format</p>
|
|
33
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
34
|
+
<%= config[:output_format] || :text %>
|
|
35
|
+
</p>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div>
|
|
39
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Timestamps</p>
|
|
40
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
41
|
+
<% if config[:include_timestamps] && config[:include_timestamps] != :none %>
|
|
42
|
+
<%= config[:include_timestamps].to_s.titleize %>
|
|
43
|
+
<% else %>
|
|
44
|
+
<span class="text-gray-400 dark:text-gray-500">None</span>
|
|
45
|
+
<% end %>
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
51
|
+
<div>
|
|
52
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Cache</p>
|
|
53
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
54
|
+
<% if config[:cache_enabled] %>
|
|
55
|
+
Enabled (<%= config[:cache_ttl].inspect %>)
|
|
56
|
+
<% else %>
|
|
57
|
+
<span class="text-gray-400 dark:text-gray-500">Disabled</span>
|
|
58
|
+
<% end %>
|
|
59
|
+
</p>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="col-span-3">
|
|
63
|
+
<p class="text-sm text-gray-500 dark:text-gray-400">Fallback Models</p>
|
|
64
|
+
<p class="font-medium text-gray-900 dark:text-gray-100">
|
|
65
|
+
<% fallback_models = Array(config[:fallback_models]).compact %>
|
|
66
|
+
<% if fallback_models.any? %>
|
|
67
|
+
<%= fallback_models.join(" → ") %>
|
|
68
|
+
<% else %>
|
|
69
|
+
<span class="text-gray-400 dark:text-gray-500">None configured</span>
|
|
70
|
+
<% end %>
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<!-- Info Section -->
|
|
76
|
+
<div class="border-t border-gray-100 dark:border-gray-700 pt-4">
|
|
77
|
+
<div class="flex items-start gap-3 p-3 rounded-lg bg-teal-50 dark:bg-teal-900/20">
|
|
78
|
+
<div class="flex-shrink-0 mt-0.5">
|
|
79
|
+
<svg class="w-5 h-5 text-teal-500" fill="currentColor" viewBox="0 0 20 20">
|
|
80
|
+
<path fill-rule="evenodd" d="M7 4a3 3 0 016 0v4a3 3 0 11-6 0V4zm4 10.93A7.001 7.001 0 0017 8a1 1 0 10-2 0A5 5 0 015 8a1 1 0 00-2 0 7.001 7.001 0 006 6.93V17H6a1 1 0 100 2h8a1 1 0 100-2h-3v-2.07z" clip-rule="evenodd"/>
|
|
81
|
+
</svg>
|
|
82
|
+
</div>
|
|
83
|
+
<div>
|
|
84
|
+
<p class="text-sm font-medium text-gray-900 dark:text-gray-100">Transcriber</p>
|
|
85
|
+
<p class="text-xs text-gray-600 dark:text-gray-400 mt-1">
|
|
86
|
+
Converts audio to text with support for multiple languages, timestamps, and output formats like SRT and VTT.
|
|
87
|
+
</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
%>
|
|
16
16
|
|
|
17
17
|
<div x-data="{ expanded: false }" class="block bg-white dark:bg-gray-800 rounded-lg shadow hover:shadow-md transition-shadow border-l-4 <%= colors[:border] %>">
|
|
18
|
-
<%= link_to ruby_llm_agents.
|
|
18
|
+
<%= link_to ruby_llm_agents.workflow_path(ERB::Util.url_encode(workflow[:name]), tab: local_assigns[:current_tab], subtab: local_assigns[:current_subtab]), class: "block p-4 sm:p-5 relative z-10", data: { turbo: false }, style: "pointer-events: auto;" do %>
|
|
19
19
|
<!-- Header Row -->
|
|
20
20
|
<div class="flex items-center justify-between gap-2">
|
|
21
21
|
<div class="flex items-center gap-2 min-w-0">
|
|
@@ -3,12 +3,25 @@
|
|
|
3
3
|
<p class="text-gray-500 dark:text-gray-400 mt-1">All available agents and workflows with execution statistics</p>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
|
-
<div x-data="{
|
|
6
|
+
<div x-data="{
|
|
7
|
+
activeTab: '<%= params[:tab].presence || 'agents' %>',
|
|
8
|
+
activeSubTab: <%= params[:subtab].present? ? "'#{params[:subtab]}'" : 'null' %>,
|
|
9
|
+
updateUrl() {
|
|
10
|
+
const url = new URL(window.location);
|
|
11
|
+
url.searchParams.set('tab', this.activeTab);
|
|
12
|
+
if (this.activeSubTab) {
|
|
13
|
+
url.searchParams.set('subtab', this.activeSubTab);
|
|
14
|
+
} else {
|
|
15
|
+
url.searchParams.delete('subtab');
|
|
16
|
+
}
|
|
17
|
+
history.replaceState({}, '', url);
|
|
18
|
+
}
|
|
19
|
+
}">
|
|
7
20
|
<!-- Tab Navigation -->
|
|
8
21
|
<div class="border-b border-gray-200 dark:border-gray-700 mb-6">
|
|
9
22
|
<nav class="-mb-px flex space-x-6" aria-label="Tabs">
|
|
10
23
|
<!-- Agents Tab -->
|
|
11
|
-
<button type="button" @click="activeTab = 'agents'; activeSubTab = null"
|
|
24
|
+
<button type="button" @click="activeTab = 'agents'; activeSubTab = null; updateUrl()"
|
|
12
25
|
:class="activeTab === 'agents' ? 'border-blue-500 text-blue-600 dark:text-blue-400' : 'border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300'"
|
|
13
26
|
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm flex items-center gap-2 transition-colors">
|
|
14
27
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -22,7 +35,7 @@
|
|
|
22
35
|
</button>
|
|
23
36
|
|
|
24
37
|
<!-- Workflows Tab -->
|
|
25
|
-
<button type="button" @click="activeTab = 'workflows'; activeSubTab = null"
|
|
38
|
+
<button type="button" @click="activeTab = 'workflows'; activeSubTab = null; updateUrl()"
|
|
26
39
|
:class="activeTab === 'workflows' ? 'border-blue-500 text-blue-600 dark:text-blue-400' : 'border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300'"
|
|
27
40
|
class="whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm flex items-center gap-2 transition-colors">
|
|
28
41
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
@@ -37,25 +50,66 @@
|
|
|
37
50
|
</nav>
|
|
38
51
|
</div>
|
|
39
52
|
|
|
53
|
+
<!-- Agent Sub-tabs -->
|
|
54
|
+
<div x-show="activeTab === 'agents'" x-cloak class="mb-4">
|
|
55
|
+
<div class="flex flex-wrap gap-2">
|
|
56
|
+
<button type="button" @click="activeSubTab = null; updateUrl()"
|
|
57
|
+
:class="activeSubTab === null ? 'bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900' : 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600'"
|
|
58
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
59
|
+
All (<%= @agent_count %>)
|
|
60
|
+
</button>
|
|
61
|
+
<button type="button" @click="activeSubTab = 'agent'; updateUrl()"
|
|
62
|
+
:class="activeSubTab === 'agent' ? 'bg-blue-600 text-white' : 'bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-800'"
|
|
63
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
64
|
+
Agents (<%= @agents_by_type[:agent].size %>)
|
|
65
|
+
</button>
|
|
66
|
+
<button type="button" @click="activeSubTab = 'embedder'; updateUrl()"
|
|
67
|
+
:class="activeSubTab === 'embedder' ? 'bg-purple-600 text-white' : 'bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 hover:bg-purple-200 dark:hover:bg-purple-800'"
|
|
68
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
69
|
+
Embedders (<%= @agents_by_type[:embedder].size %>)
|
|
70
|
+
</button>
|
|
71
|
+
<button type="button" @click="activeSubTab = 'moderator'; updateUrl()"
|
|
72
|
+
:class="activeSubTab === 'moderator' ? 'bg-orange-600 text-white' : 'bg-orange-100 dark:bg-orange-900/50 text-orange-700 dark:text-orange-300 hover:bg-orange-200 dark:hover:bg-orange-800'"
|
|
73
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
74
|
+
Moderators (<%= @agents_by_type[:moderator].size %>)
|
|
75
|
+
</button>
|
|
76
|
+
<% audio_count = @agents_by_type[:speaker].size + @agents_by_type[:transcriber].size %>
|
|
77
|
+
<% if audio_count > 0 %>
|
|
78
|
+
<button type="button" @click="activeSubTab = 'audio'; updateUrl()"
|
|
79
|
+
:class="activeSubTab === 'audio' ? 'bg-pink-600 text-white' : 'bg-pink-100 dark:bg-pink-900/50 text-pink-700 dark:text-pink-300 hover:bg-pink-200 dark:hover:bg-pink-800'"
|
|
80
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
81
|
+
Audio (<%= audio_count %>)
|
|
82
|
+
</button>
|
|
83
|
+
<% end %>
|
|
84
|
+
<% if @agents_by_type[:image_generator].size > 0 %>
|
|
85
|
+
<button type="button" @click="activeSubTab = 'image_generator'; updateUrl()"
|
|
86
|
+
:class="activeSubTab === 'image_generator' ? 'bg-teal-600 text-white' : 'bg-teal-100 dark:bg-teal-900/50 text-teal-700 dark:text-teal-300 hover:bg-teal-200 dark:hover:bg-teal-800'"
|
|
87
|
+
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
88
|
+
Image Generators (<%= @agents_by_type[:image_generator].size %>)
|
|
89
|
+
</button>
|
|
90
|
+
<% end %>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
40
94
|
<!-- Workflow Sub-tabs -->
|
|
41
95
|
<div x-show="activeTab === 'workflows'" x-cloak class="mb-4">
|
|
42
96
|
<div class="flex flex-wrap gap-2">
|
|
43
|
-
<button type="button" @click="activeSubTab = null"
|
|
97
|
+
<button type="button" @click="activeSubTab = null; updateUrl()"
|
|
44
98
|
:class="activeSubTab === null ? 'bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900' : 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600'"
|
|
45
99
|
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors">
|
|
46
100
|
All (<%= @workflow_count %>)
|
|
47
101
|
</button>
|
|
48
|
-
<button type="button" @click="activeSubTab = 'pipeline'"
|
|
102
|
+
<button type="button" @click="activeSubTab = 'pipeline'; updateUrl()"
|
|
49
103
|
:class="activeSubTab === 'pipeline' ? 'bg-indigo-600 text-white' : 'bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700 dark:text-indigo-300 hover:bg-indigo-200 dark:hover:bg-indigo-800'"
|
|
50
104
|
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors inline-flex items-center gap-1.5">
|
|
51
105
|
<span aria-hidden="true">-></span> Pipeline (<%= @workflows_by_type[:pipeline].size %>)
|
|
52
106
|
</button>
|
|
53
|
-
<button type="button" @click="activeSubTab = 'parallel'"
|
|
107
|
+
<button type="button" @click="activeSubTab = 'parallel'; updateUrl()"
|
|
54
108
|
:class="activeSubTab === 'parallel' ? 'bg-cyan-600 text-white' : 'bg-cyan-100 dark:bg-cyan-900/50 text-cyan-700 dark:text-cyan-300 hover:bg-cyan-200 dark:hover:bg-cyan-800'"
|
|
55
109
|
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors inline-flex items-center gap-1.5">
|
|
56
110
|
<span aria-hidden="true">//</span> Parallel (<%= @workflows_by_type[:parallel].size %>)
|
|
57
111
|
</button>
|
|
58
|
-
<button type="button" @click="activeSubTab = 'router'"
|
|
112
|
+
<button type="button" @click="activeSubTab = 'router'; updateUrl()"
|
|
59
113
|
:class="activeSubTab === 'router' ? 'bg-amber-600 text-white' : 'bg-amber-100 dark:bg-amber-900/50 text-amber-700 dark:text-amber-300 hover:bg-amber-200 dark:hover:bg-amber-800'"
|
|
60
114
|
class="px-3 py-1.5 rounded-md text-sm font-medium transition-colors inline-flex items-center gap-1.5">
|
|
61
115
|
<span aria-hidden="true"><></span> Router (<%= @workflows_by_type[:router].size %>)
|
|
@@ -70,7 +124,18 @@
|
|
|
70
124
|
<% else %>
|
|
71
125
|
<div class="space-y-3 sm:space-y-4">
|
|
72
126
|
<% @agents.each do |agent| %>
|
|
73
|
-
|
|
127
|
+
<%
|
|
128
|
+
# Determine if this agent should be shown based on sub-tab
|
|
129
|
+
# 'audio' sub-tab shows both speakers and transcribers
|
|
130
|
+
show_condition = if agent[:agent_type] == 'speaker' || agent[:agent_type] == 'transcriber'
|
|
131
|
+
"activeSubTab === null || activeSubTab === 'audio' || activeSubTab === '#{agent[:agent_type]}'"
|
|
132
|
+
else
|
|
133
|
+
"activeSubTab === null || activeSubTab === '#{agent[:agent_type]}'"
|
|
134
|
+
end
|
|
135
|
+
%>
|
|
136
|
+
<div x-show="<%= show_condition %>">
|
|
137
|
+
<%= render partial: "ruby_llm/agents/agents/agent", locals: { agent: agent, current_tab: params[:tab] || 'agents', current_subtab: params[:subtab] } %>
|
|
138
|
+
</div>
|
|
74
139
|
<% end %>
|
|
75
140
|
</div>
|
|
76
141
|
<% end %>
|
|
@@ -84,7 +149,7 @@
|
|
|
84
149
|
<div class="space-y-3 sm:space-y-4">
|
|
85
150
|
<% @workflows.each do |workflow| %>
|
|
86
151
|
<div x-show="activeSubTab === null || activeSubTab === '<%= workflow[:workflow_type] %>'">
|
|
87
|
-
<%= render partial: "ruby_llm/agents/agents/workflow", locals: { workflow: workflow } %>
|
|
152
|
+
<%= render partial: "ruby_llm/agents/agents/workflow", locals: { workflow: workflow, current_tab: params[:tab] || 'workflows', current_subtab: params[:subtab] } %>
|
|
88
153
|
</div>
|
|
89
154
|
<% end %>
|
|
90
155
|
</div>
|