Class: RubyLLM::ModelInfo
- Inherits:
-
Object
- Object
- RubyLLM::ModelInfo
- Defined in:
- lib/ruby_llm/model_info.rb
Instance Attribute Summary collapse
-
#context_window ⇒ Object
readonly
Returns the value of attribute context_window.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#input_price_per_million ⇒ Object
readonly
Returns the value of attribute input_price_per_million.
-
#max_tokens ⇒ Object
readonly
Returns the value of attribute max_tokens.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#output_price_per_million ⇒ Object
readonly
Returns the value of attribute output_price_per_million.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#supports_functions ⇒ Object
readonly
Returns the value of attribute supports_functions.
-
#supports_json_mode ⇒ Object
readonly
Returns the value of attribute supports_json_mode.
-
#supports_vision ⇒ Object
readonly
Returns the value of attribute supports_vision.
Instance Method Summary collapse
-
#initialize(id:, created_at:, display_name:, provider:, context_window:, max_tokens:, supports_vision:, supports_functions:, supports_json_mode:, input_price_per_million:, output_price_per_million:, metadata: {}) ⇒ ModelInfo
constructor
A new instance of ModelInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(id:, created_at:, display_name:, provider:, context_window:, max_tokens:, supports_vision:, supports_functions:, supports_json_mode:, input_price_per_million:, output_price_per_million:, metadata: {}) ⇒ ModelInfo
Returns a new instance of ModelInfo.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby_llm/model_info.rb', line 9 def initialize(id:, created_at:, display_name:, provider:, context_window:, max_tokens:, supports_vision:, supports_functions:, supports_json_mode:, input_price_per_million:, output_price_per_million:, metadata: {}) @id = id @created_at = created_at @display_name = display_name @provider = provider @metadata = @context_window = context_window @max_tokens = max_tokens @supports_vision = supports_vision @supports_functions = supports_functions @supports_json_mode = supports_json_mode @input_price_per_million = input_price_per_million @output_price_per_million = output_price_per_million end |
Instance Attribute Details
#context_window ⇒ Object (readonly)
Returns the value of attribute context_window.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def context_window @context_window end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def created_at @created_at end |
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def display_name @display_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def id @id end |
#input_price_per_million ⇒ Object (readonly)
Returns the value of attribute input_price_per_million.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def input_price_per_million @input_price_per_million end |
#max_tokens ⇒ Object (readonly)
Returns the value of attribute max_tokens.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def max_tokens @max_tokens end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def @metadata end |
#output_price_per_million ⇒ Object (readonly)
Returns the value of attribute output_price_per_million.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def output_price_per_million @output_price_per_million end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def provider @provider end |
#supports_functions ⇒ Object (readonly)
Returns the value of attribute supports_functions.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def supports_functions @supports_functions end |
#supports_json_mode ⇒ Object (readonly)
Returns the value of attribute supports_json_mode.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def supports_json_mode @supports_json_mode end |
#supports_vision ⇒ Object (readonly)
Returns the value of attribute supports_vision.
5 6 7 |
# File 'lib/ruby_llm/model_info.rb', line 5 def supports_vision @supports_vision end |
Instance Method Details
#to_h ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby_llm/model_info.rb', line 25 def to_h { id: id, created_at: created_at, display_name: display_name, provider: provider, metadata: , context_window: context_window, max_tokens: max_tokens, supports_vision: supports_vision, supports_functions: supports_functions, supports_json_mode: supports_json_mode, input_price_per_million: input_price_per_million, output_price_per_million: output_price_per_million } end |