Module: Legion::Extensions::Llm::AzureFoundry::Capabilities
- Defined in:
- lib/legion/extensions/llm/azure_foundry/provider.rb
Overview
Capability predicates inferred from catalog metadata and model naming. Naming is a hint only — it never overrides explicit catalog facts.
Class Method Summary collapse
- .chat?(model) ⇒ Boolean
- .critical_capabilities_for(model) ⇒ Object
- .embeddings?(model) ⇒ Boolean
- .functions?(model) ⇒ Boolean
- .model_id(model) ⇒ Object
- .streaming?(model) ⇒ Boolean
- .vision?(model) ⇒ Boolean
Class Method Details
.chat?(model) ⇒ Boolean
18 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 18 def chat?(model) = !(model) |
.critical_capabilities_for(model) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 24 def critical_capabilities_for(model) [ ('streaming' if streaming?(model)), ('function_calling' if functions?(model)), ('vision' if vision?(model)), ('embeddings' if (model)) ].compact end |
.embeddings?(model) ⇒ Boolean
22 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 22 def (model) = model_id(model).match?(/embed/i) |
.functions?(model) ⇒ Boolean
20 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 20 def functions?(model) = chat?(model) |
.model_id(model) ⇒ Object
33 34 35 36 37 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 33 def model_id(model) return model.id.to_s if model.respond_to?(:id) model.to_s end |
.streaming?(model) ⇒ Boolean
19 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 19 def streaming?(model) = chat?(model) |
.vision?(model) ⇒ Boolean
21 |
# File 'lib/legion/extensions/llm/azure_foundry/provider.rb', line 21 def vision?(model) = chat?(model) && model_id(model).match?(/(gpt-4|gpt-5|llava|vision|phi-3.5)/i) |