mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 07:09:39 +02:00
13 lines
276 B
Ruby
13 lines
276 B
Ruby
|
module Assistant::Provided
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
def get_model_provider(ai_model)
|
||
|
registry.providers.find { |provider| provider.supports_model?(ai_model) }
|
||
|
end
|
||
|
|
||
|
private
|
||
|
def registry
|
||
|
@registry ||= Provider::Registry.for_concept(:llm)
|
||
|
end
|
||
|
end
|