Class: Cadenya::Types::AIProviderConfig_Openrouter
- Inherits:
-
Object
- Object
- Cadenya::Types::AIProviderConfig_Openrouter
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#openrouter ⇒ Object
readonly
Returns the value of attribute openrouter.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, openrouter: nil) ⇒ AIProviderConfig_Openrouter
constructor
A new instance of AIProviderConfig_Openrouter.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, openrouter: nil) ⇒ AIProviderConfig_Openrouter
Returns a new instance of AIProviderConfig_Openrouter.
9302 9303 9304 9305 |
# File 'lib/cadenya/types.rb', line 9302 def initialize(type: nil, openrouter: nil) @type = type @openrouter = openrouter end |
Instance Attribute Details
#openrouter ⇒ Object (readonly)
Returns the value of attribute openrouter.
9300 9301 9302 |
# File 'lib/cadenya/types.rb', line 9300 def openrouter @openrouter end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9300 9301 9302 |
# File 'lib/cadenya/types.rb', line 9300 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
9307 9308 9309 9310 9311 9312 |
# File 'lib/cadenya/types.rb', line 9307 def self.from_json(data) new( type: data["type"], openrouter: data["openrouter"].nil? ? nil : Types::OpenRouterConfig.from_json(data["openrouter"]), ) end |