Module: Legion::Extensions::Llm::Vllm::Provider::Capabilities

Defined in:
lib/legion/extensions/llm/vllm/provider.rb

Overview

Capability predicates for vLLM OpenAI-compatible model offerings.

Class Method Summary collapse

Class Method Details

.chat?(_model) ⇒ Boolean

Returns:

  • (Boolean)


475
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 475

def chat?(_model) = true

.critical_capabilities_for(model) ⇒ Object



481
482
483
484
485
486
487
488
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 481

def critical_capabilities_for(model)
  [
    ('streaming' if streaming?(model)),
    ('function_calling' if functions?(model)),
    ('vision' if vision?(model)),
    ('embeddings' if embeddings?(model))
  ].compact
end

.embeddings?(_model) ⇒ Boolean

Returns:

  • (Boolean)


479
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 479

def embeddings?(_model) = false

.functions?(_model) ⇒ Boolean

Returns:

  • (Boolean)


478
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 478

def functions?(_model) = false

.streaming?(_model) ⇒ Boolean

Returns:

  • (Boolean)


476
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 476

def streaming?(_model) = true

.vision?(_model) ⇒ Boolean

Returns:

  • (Boolean)


477
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 477

def vision?(_model) = false