Class: LLMs::Models::Provider
- Inherits:
-
Object
- Object
- LLMs::Models::Provider
- Defined in:
- lib/llms/models/provider.rb
Instance Attribute Summary collapse
-
#api_key_env_var ⇒ Object
readonly
Returns the value of attribute api_key_env_var.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#exclude_params ⇒ Object
readonly
Returns the value of attribute exclude_params.
-
#executor_class_name ⇒ Object
readonly
Returns the value of attribute executor_class_name.
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
-
#supports_thinking ⇒ Object
readonly
Returns the value of attribute supports_thinking.
-
#supports_tools ⇒ Object
readonly
Returns the value of attribute supports_tools.
-
#supports_vision ⇒ Object
readonly
Returns the value of attribute supports_vision.
Instance Method Summary collapse
- #certainly_supports_thinking? ⇒ Boolean
- #certainly_supports_tools? ⇒ Boolean
- #certainly_supports_vision? ⇒ Boolean
-
#initialize(provider_name, executor_class_name, base_url: nil, api_key_env_var: nil, supports_tools: nil, supports_vision: nil, supports_thinking: nil, enabled: nil, exclude_params: nil) ⇒ Provider
constructor
A new instance of Provider.
- #is_enabled? ⇒ Boolean
- #possibly_supports_thinking? ⇒ Boolean
- #possibly_supports_tools? ⇒ Boolean
- #possibly_supports_vision? ⇒ Boolean
Constructor Details
#initialize(provider_name, executor_class_name, base_url: nil, api_key_env_var: nil, supports_tools: nil, supports_vision: nil, supports_thinking: nil, enabled: nil, exclude_params: nil) ⇒ Provider
Returns a new instance of Provider.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/llms/models/provider.rb', line 6 def initialize(provider_name, executor_class_name, base_url: nil, api_key_env_var: nil, supports_tools: nil, supports_vision: nil, supports_thinking: nil, enabled: nil, exclude_params: nil) @provider_name = provider_name.to_s @executor_class_name = executor_class_name.to_s @base_url = base_url @api_key_env_var = api_key_env_var @supports_tools = supports_tools @supports_vision = supports_vision @supports_thinking = supports_thinking @enabled = enabled @exclude_params = exclude_params end |
Instance Attribute Details
#api_key_env_var ⇒ Object (readonly)
Returns the value of attribute api_key_env_var.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def api_key_env_var @api_key_env_var end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def base_url @base_url end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def enabled @enabled end |
#exclude_params ⇒ Object (readonly)
Returns the value of attribute exclude_params.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def exclude_params @exclude_params end |
#executor_class_name ⇒ Object (readonly)
Returns the value of attribute executor_class_name.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def executor_class_name @executor_class_name end |
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def provider_name @provider_name end |
#supports_thinking ⇒ Object (readonly)
Returns the value of attribute supports_thinking.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def supports_thinking @supports_thinking end |
#supports_tools ⇒ Object (readonly)
Returns the value of attribute supports_tools.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def supports_tools @supports_tools end |
#supports_vision ⇒ Object (readonly)
Returns the value of attribute supports_vision.
4 5 6 |
# File 'lib/llms/models/provider.rb', line 4 def supports_vision @supports_vision end |
Instance Method Details
#certainly_supports_thinking? ⇒ Boolean
38 39 40 |
# File 'lib/llms/models/provider.rb', line 38 def certainly_supports_thinking? @supports_thinking == true end |
#certainly_supports_tools? ⇒ Boolean
22 23 24 |
# File 'lib/llms/models/provider.rb', line 22 def certainly_supports_tools? @supports_tools == true end |
#certainly_supports_vision? ⇒ Boolean
30 31 32 |
# File 'lib/llms/models/provider.rb', line 30 def certainly_supports_vision? @supports_vision == true end |
#is_enabled? ⇒ Boolean
42 43 44 |
# File 'lib/llms/models/provider.rb', line 42 def is_enabled? @enabled != false end |
#possibly_supports_thinking? ⇒ Boolean
34 35 36 |
# File 'lib/llms/models/provider.rb', line 34 def possibly_supports_thinking? @supports_thinking != false end |
#possibly_supports_tools? ⇒ Boolean
18 19 20 |
# File 'lib/llms/models/provider.rb', line 18 def possibly_supports_tools? @supports_tools != false end |
#possibly_supports_vision? ⇒ Boolean
26 27 28 |
# File 'lib/llms/models/provider.rb', line 26 def possibly_supports_vision? @supports_vision != false end |