Class: Cadenya::Types::AIProviderConfig_Openai
- Inherits:
-
Object
- Object
- Cadenya::Types::AIProviderConfig_Openai
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#openai ⇒ Object
readonly
Returns the value of attribute openai.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, openai: nil) ⇒ AIProviderConfig_Openai
constructor
A new instance of AIProviderConfig_Openai.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, openai: nil) ⇒ AIProviderConfig_Openai
Returns a new instance of AIProviderConfig_Openai.
9325 9326 9327 9328 |
# File 'lib/cadenya/types.rb', line 9325 def initialize(type: nil, openai: nil) @type = type @openai = openai end |
Instance Attribute Details
#openai ⇒ Object (readonly)
Returns the value of attribute openai.
9323 9324 9325 |
# File 'lib/cadenya/types.rb', line 9323 def openai @openai end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9323 9324 9325 |
# File 'lib/cadenya/types.rb', line 9323 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
9330 9331 9332 9333 9334 9335 |
# File 'lib/cadenya/types.rb', line 9330 def self.from_json(data) new( type: data["type"], openai: data["openai"].nil? ? nil : Types::OpenAIConfig.from_json(data["openai"]), ) end |