Class: LLMs::Models::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/llms/models/provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_varObject (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_urlObject (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

#enabledObject (readonly)

Returns the value of attribute enabled.



4
5
6
# File 'lib/llms/models/provider.rb', line 4

def enabled
  @enabled
end

#exclude_paramsObject (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_nameObject (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_nameObject (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_thinkingObject (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_toolsObject (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_visionObject (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

Returns:

  • (Boolean)


38
39
40
# File 'lib/llms/models/provider.rb', line 38

def certainly_supports_thinking?
  @supports_thinking == true
end

#certainly_supports_tools?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/llms/models/provider.rb', line 22

def certainly_supports_tools?
  @supports_tools == true
end

#certainly_supports_vision?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/llms/models/provider.rb', line 30

def certainly_supports_vision?
  @supports_vision == true
end

#is_enabled?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/llms/models/provider.rb', line 42

def is_enabled?
  @enabled != false
end

#possibly_supports_thinking?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/llms/models/provider.rb', line 34

def possibly_supports_thinking?
  @supports_thinking != false
end

#possibly_supports_tools?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/llms/models/provider.rb', line 18

def possibly_supports_tools?
  @supports_tools != false
end

#possibly_supports_vision?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/llms/models/provider.rb', line 26

def possibly_supports_vision?
  @supports_vision != false
end