Module: Zephira::Backends
- Defined in:
- lib/zephira/backends.rb,
lib/zephira/backends/open_ai_compatible.rb
Defined Under Namespace
Classes: OpenAiCompatible
Class Method Summary
collapse
Class Method Details
.available ⇒ Object
7
8
9
10
11
|
# File 'lib/zephira/backends.rb', line 7
def self.available
constants(false)
.map { |const| const_get(const) }
.select { |const| const.respond_to?(:name) && const.name.is_a?(String) }
end
|
.find_by_name(identifier) ⇒ Object
13
14
15
|
# File 'lib/zephira/backends.rb', line 13
def self.find_by_name(identifier)
available.find { |backend| backend.name == identifier }
end
|