Class: TencentCloud::Hunyuan::V20230901::Choice

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20230901/models.rb

Overview

返回的回复, 支持多个

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(finishreason = nil, delta = nil, message = nil, index = nil, moderationlevel = nil) ⇒ Choice

Returns a new instance of Choice.



531
532
533
534
535
536
537
# File 'lib/v20230901/models.rb', line 531

def initialize(finishreason=nil, delta=nil, message=nil, index=nil, moderationlevel=nil)
  @FinishReason = finishreason
  @Delta = delta
  @Message = message
  @Index = index
  @ModerationLevel = moderationlevel
end

Instance Attribute Details

#DeltaObject

stop 表示输出正常结束。sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。tool_calls 标识函数调用。注意:此字段可能返回 null,表示取不到有效值。注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • FinishReason:

    结束标志位,可能为 stop、 sensitive或者tool_calls。

  • Delta:

    增量返回值,流式调用时使用该字段。

  • Message:

    返回值,非流式调用时使用该字段。

  • Index:

    索引值,流式调用时使用该字段。

  • ModerationLevel:

    多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。



529
530
531
# File 'lib/v20230901/models.rb', line 529

def Delta
  @Delta
end

#FinishReasonObject

stop 表示输出正常结束。sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。tool_calls 标识函数调用。注意:此字段可能返回 null,表示取不到有效值。注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • FinishReason:

    结束标志位,可能为 stop、 sensitive或者tool_calls。

  • Delta:

    增量返回值,流式调用时使用该字段。

  • Message:

    返回值,非流式调用时使用该字段。

  • Index:

    索引值,流式调用时使用该字段。

  • ModerationLevel:

    多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。



529
530
531
# File 'lib/v20230901/models.rb', line 529

def FinishReason
  @FinishReason
end

#IndexObject

stop 表示输出正常结束。sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。tool_calls 标识函数调用。注意:此字段可能返回 null,表示取不到有效值。注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • FinishReason:

    结束标志位,可能为 stop、 sensitive或者tool_calls。

  • Delta:

    增量返回值,流式调用时使用该字段。

  • Message:

    返回值,非流式调用时使用该字段。

  • Index:

    索引值,流式调用时使用该字段。

  • ModerationLevel:

    多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。



529
530
531
# File 'lib/v20230901/models.rb', line 529

def Index
  @Index
end

#MessageObject

stop 表示输出正常结束。sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。tool_calls 标识函数调用。注意:此字段可能返回 null,表示取不到有效值。注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • FinishReason:

    结束标志位,可能为 stop、 sensitive或者tool_calls。

  • Delta:

    增量返回值,流式调用时使用该字段。

  • Message:

    返回值,非流式调用时使用该字段。

  • Index:

    索引值,流式调用时使用该字段。

  • ModerationLevel:

    多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。



529
530
531
# File 'lib/v20230901/models.rb', line 529

def Message
  @Message
end

#ModerationLevelObject

stop 表示输出正常结束。sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。tool_calls 标识函数调用。注意:此字段可能返回 null,表示取不到有效值。注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • FinishReason:

    结束标志位,可能为 stop、 sensitive或者tool_calls。

  • Delta:

    增量返回值,流式调用时使用该字段。

  • Message:

    返回值,非流式调用时使用该字段。

  • Index:

    索引值,流式调用时使用该字段。

  • ModerationLevel:

    多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。



529
530
531
# File 'lib/v20230901/models.rb', line 529

def ModerationLevel
  @ModerationLevel
end

Instance Method Details

#deserialize(params) ⇒ Object



539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/v20230901/models.rb', line 539

def deserialize(params)
  @FinishReason = params['FinishReason']
  unless params['Delta'].nil?
    @Delta = Delta.new
    @Delta.deserialize(params['Delta'])
  end
  unless params['Message'].nil?
    @Message = Message.new
    @Message.deserialize(params['Message'])
  end
  @Index = params['Index']
  @ModerationLevel = params['ModerationLevel']
end