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)


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

def chat?(_model) = true

.critical_capabilities_for(model) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/legion/extensions/llm/vllm/provider.rb', line 32

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)


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

def embeddings?(_model) = true

.functions?(_model) ⇒ Boolean

Returns:

  • (Boolean)


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

def functions?(_model) = true

.streaming?(_model) ⇒ Boolean

Returns:

  • (Boolean)


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

def streaming?(_model) = true

.vision?(_model) ⇒ Boolean

Returns:

  • (Boolean)


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

def vision?(_model) = true