Class: TencentCloud::Es::V20250101::Message
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Es::V20250101::Message
- Defined in:
- lib/v20250101/models.rb
Overview
会话内容,按对话时间从旧到新在数组中排列,长度受模型窗口大小限制。
Instance Attribute Summary collapse
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(role = nil, content = nil, toolcallid = nil, toolcalls = nil) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(role = nil, content = nil, toolcallid = nil, toolcalls = nil) ⇒ Message
Returns a new instance of Message.
689 690 691 692 693 694 |
# File 'lib/v20250101/models.rb', line 689 def initialize(role=nil, content=nil, toolcallid=nil, toolcalls=nil) @Role = role @Content = content @ToolCallId = toolcallid @ToolCalls = toolcalls end |
Instance Attribute Details
#Content ⇒ Object
687 688 689 |
# File 'lib/v20250101/models.rb', line 687 def Content @Content end |
#Role ⇒ Object
687 688 689 |
# File 'lib/v20250101/models.rb', line 687 def Role @Role end |
#ToolCallId ⇒ Object
687 688 689 |
# File 'lib/v20250101/models.rb', line 687 def ToolCallId @ToolCallId end |
#ToolCalls ⇒ Object
687 688 689 |
# File 'lib/v20250101/models.rb', line 687 def ToolCalls @ToolCalls end |
Instance Method Details
#deserialize(params) ⇒ Object
696 697 698 699 700 701 702 703 704 705 706 707 708 |
# File 'lib/v20250101/models.rb', line 696 def deserialize(params) @Role = params['Role'] @Content = params['Content'] @ToolCallId = params['ToolCallId'] unless params['ToolCalls'].nil? @ToolCalls = [] params['ToolCalls'].each do |i| toolcall_tmp = ToolCall.new toolcall_tmp.deserialize(i) @ToolCalls << toolcall_tmp end end end |