Class: TencentCloud::Es::V20250101::ChatCompletionsRequest
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Es::V20250101::ChatCompletionsRequest
- Defined in:
- lib/v20250101/models.rb
Overview
ChatCompletions请求参数结构体
Instance Attribute Summary collapse
- #CustomTool ⇒ Object
- #Messages ⇒ Object
- #ModelName ⇒ Object
- #OnlineSearch ⇒ Object
- #OnlineSearchOptions ⇒ Object
- #Stream ⇒ Object
- #Temperature ⇒ Object
- #ToolChoice ⇒ Object
- #Tools ⇒ Object
- #TopP ⇒ Object
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(messages = nil, modelname = nil, stream = nil, topp = nil, temperature = nil, onlinesearch = nil, onlinesearchoptions = nil, tools = nil, toolchoice = nil, customtool = nil) ⇒ ChatCompletionsRequest
constructor
A new instance of ChatCompletionsRequest.
Constructor Details
#initialize(messages = nil, modelname = nil, stream = nil, topp = nil, temperature = nil, onlinesearch = nil, onlinesearchoptions = nil, tools = nil, toolchoice = nil, customtool = nil) ⇒ ChatCompletionsRequest
Returns a new instance of ChatCompletionsRequest.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/v20250101/models.rb', line 45 def initialize(=nil, modelname=nil, stream=nil, topp=nil, temperature=nil, onlinesearch=nil, =nil, tools=nil, toolchoice=nil, customtool=nil) @Messages = @ModelName = modelname @Stream = stream @TopP = topp @Temperature = temperature @OnlineSearch = onlinesearch @OnlineSearchOptions = @Tools = tools @ToolChoice = toolchoice @CustomTool = customtool end |
Instance Attribute Details
#CustomTool ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def CustomTool @CustomTool end |
#Messages ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def Messages @Messages end |
#ModelName ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def ModelName @ModelName end |
#OnlineSearch ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def OnlineSearch @OnlineSearch end |
#OnlineSearchOptions ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def OnlineSearchOptions @OnlineSearchOptions end |
#Stream ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def Stream @Stream end |
#Temperature ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def Temperature @Temperature end |
#ToolChoice ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def ToolChoice @ToolChoice end |
#Tools ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def Tools @Tools end |
#TopP ⇒ Object
43 44 45 |
# File 'lib/v20250101/models.rb', line 43 def TopP @TopP end |
Instance Method Details
#deserialize(params) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/v20250101/models.rb', line 58 def deserialize(params) unless params['Messages'].nil? @Messages = [] params['Messages'].each do |i| = Message.new .deserialize(i) @Messages << end end @ModelName = params['ModelName'] @Stream = params['Stream'] @TopP = params['TopP'] @Temperature = params['Temperature'] @OnlineSearch = params['OnlineSearch'] unless params['OnlineSearchOptions'].nil? @OnlineSearchOptions = OnlineSearchOptions.new @OnlineSearchOptions.deserialize(params['OnlineSearchOptions']) end unless params['Tools'].nil? @Tools = [] params['Tools'].each do |i| tool_tmp = Tool.new tool_tmp.deserialize(i) @Tools << tool_tmp end end @ToolChoice = params['ToolChoice'] unless params['CustomTool'].nil? @CustomTool = Tool.new @CustomTool.deserialize(params['CustomTool']) end end |