Class: Copilot::ModelLimits

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Model limits.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#max_context_window_tokensObject

Returns the value of attribute max_context_window_tokens

Returns:

  • (Object)

    the current value of max_context_window_tokens



385
386
387
# File 'lib/copilot/types.rb', line 385

def max_context_window_tokens
  @max_context_window_tokens
end

#max_prompt_tokensObject

Returns the value of attribute max_prompt_tokens

Returns:

  • (Object)

    the current value of max_prompt_tokens



385
386
387
# File 'lib/copilot/types.rb', line 385

def max_prompt_tokens
  @max_prompt_tokens
end

#visionObject

Returns the value of attribute vision

Returns:

  • (Object)

    the current value of vision



385
386
387
# File 'lib/copilot/types.rb', line 385

def vision
  @vision
end

Class Method Details

.from_hash(h) ⇒ Object



389
390
391
392
393
394
395
# File 'lib/copilot/types.rb', line 389

def self.from_hash(h)
  new(
    max_prompt_tokens: h["max_prompt_tokens"],
    max_context_window_tokens: h["max_context_window_tokens"],
    vision: h["vision"] ? ModelVisionLimits.from_hash(h["vision"]) : nil
  )
end