Class: TencentCloud::Es::V20250101::ChatCompletionsResponse
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Es::V20250101::ChatCompletionsResponse
- Defined in:
- lib/v20250101/models.rb
Overview
ChatCompletions返回参数结构体
Instance Attribute Summary collapse
-
#Choices ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。.
-
#Id ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。.
-
#OnlineSearchContent ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。.
-
#RequestId ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。.
-
#Usage ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(id = nil, choices = nil, usage = nil, onlinesearchcontent = nil, requestid = nil) ⇒ ChatCompletionsResponse
constructor
A new instance of ChatCompletionsResponse.
Constructor Details
#initialize(id = nil, choices = nil, usage = nil, onlinesearchcontent = nil, requestid = nil) ⇒ ChatCompletionsResponse
Returns a new instance of ChatCompletionsResponse.
108 109 110 111 112 113 114 |
# File 'lib/v20250101/models.rb', line 108 def initialize(id=nil, choices=nil, usage=nil, onlinesearchcontent=nil, requestid=nil) @Id = id @Choices = choices @Usage = usage @OnlineSearchContent = onlinesearchcontent @RequestId = requestid end |
Instance Attribute Details
#Choices ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。
106 107 108 |
# File 'lib/v20250101/models.rb', line 106 def Choices @Choices end |
#Id ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。
106 107 108 |
# File 'lib/v20250101/models.rb', line 106 def Id @Id end |
#OnlineSearchContent ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。
106 107 108 |
# File 'lib/v20250101/models.rb', line 106 def OnlineSearchContent @OnlineSearchContent end |
#RequestId ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。
106 107 108 |
# File 'lib/v20250101/models.rb', line 106 def RequestId @RequestId end |
#Usage ⇒ Object
注意:此字段可能返回 null,表示取不到有效值。
106 107 108 |
# File 'lib/v20250101/models.rb', line 106 def Usage @Usage end |
Instance Method Details
#deserialize(params) ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/v20250101/models.rb', line 116 def deserialize(params) @Id = params['Id'] unless params['Choices'].nil? @Choices = [] params['Choices'].each do |i| choice_tmp = Choice.new choice_tmp.deserialize(i) @Choices << choice_tmp end end unless params['Usage'].nil? @Usage = TokenUsage.new @Usage.deserialize(params['Usage']) end unless params['OnlineSearchContent'].nil? @OnlineSearchContent = [] params['OnlineSearchContent'].each do |i| webcontent_tmp = WebContent.new webcontent_tmp.deserialize(i) @OnlineSearchContent << webcontent_tmp end end @RequestId = params['RequestId'] end |