tencentcloud-sdk-hunyuan 3.0.879 → 3.0.880
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20230901/client.rb +48 -0
- data/lib/v20230901/models.rb +68 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b07561a45d1d7b571ed467c8fdd1aac319c471d
|
4
|
+
data.tar.gz: 80f39d174f723d9c41f27906febec7c0a30a69fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5939d2fb4fc2e1ba571232e27410152afba5a83572ac885d9dcf4bcf15a66c45d0049204494b0974acc16c8fc634a5523358e1d29cb653344d5b0846079cd08f
|
7
|
+
data.tar.gz: dc5c879185a22f8423c6fbe3b033435d111112e7fc8dfc1dc79dd38aa30ebd963ef514596826bccad931c0d670b8e8db96381a7def957700be042cdbd5a28c36
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.880
|
data/lib/v20230901/client.rb
CHANGED
@@ -29,6 +29,30 @@ module TencentCloud
|
|
29
29
|
end
|
30
30
|
|
31
31
|
|
32
|
+
# 开通服务
|
33
|
+
|
34
|
+
# @param request: Request instance for ActivateService.
|
35
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::ActivateServiceRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::ActivateServiceResponse`
|
37
|
+
def ActivateService(request)
|
38
|
+
body = send_request('ActivateService', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = ActivateServiceResponse.new
|
42
|
+
model.deserialize(response['Response'])
|
43
|
+
model
|
44
|
+
else
|
45
|
+
code = response['Response']['Error']['Code']
|
46
|
+
message = response['Response']['Error']['Message']
|
47
|
+
reqid = response['Response']['RequestId']
|
48
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
49
|
+
end
|
50
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
51
|
+
raise e
|
52
|
+
rescue StandardError => e
|
53
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
54
|
+
end
|
55
|
+
|
32
56
|
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
33
57
|
|
34
58
|
# 1. 本接口暂不支持返回图片内容。
|
@@ -133,6 +157,30 @@ module TencentCloud
|
|
133
157
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
134
158
|
end
|
135
159
|
|
160
|
+
# 设置付费模式
|
161
|
+
|
162
|
+
# @param request: Request instance for SetPayMode.
|
163
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::SetPayModeRequest`
|
164
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::SetPayModeResponse`
|
165
|
+
def SetPayMode(request)
|
166
|
+
body = send_request('SetPayMode', request.serialize)
|
167
|
+
response = JSON.parse(body)
|
168
|
+
if response['Response'].key?('Error') == false
|
169
|
+
model = SetPayModeResponse.new
|
170
|
+
model.deserialize(response['Response'])
|
171
|
+
model
|
172
|
+
else
|
173
|
+
code = response['Response']['Error']['Code']
|
174
|
+
message = response['Response']['Error']['Message']
|
175
|
+
reqid = response['Response']['RequestId']
|
176
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
177
|
+
end
|
178
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
179
|
+
raise e
|
180
|
+
rescue StandardError => e
|
181
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
182
|
+
end
|
183
|
+
|
136
184
|
# 混元生图接口基于混元大模型,将根据输入的文本描述,智能生成与之相关的结果图。分为提交任务和查询任务2个接口。
|
137
185
|
# 提交任务:输入文本等,提交一个混元生图异步任务,获得任务 ID。
|
138
186
|
# 查询任务:根据任务 ID 查询任务的处理状态、处理结果,任务处理完成后可获得生成图像结果。
|
data/lib/v20230901/models.rb
CHANGED
@@ -17,6 +17,38 @@
|
|
17
17
|
module TencentCloud
|
18
18
|
module Hunyuan
|
19
19
|
module V20230901
|
20
|
+
# ActivateService请求参数结构体
|
21
|
+
class ActivateServiceRequest < TencentCloud::Common::AbstractModel
|
22
|
+
# @param PayMode: 开通之后,是否关闭后付费;默认为0,不关闭;1为关闭
|
23
|
+
# @type PayMode: Integer
|
24
|
+
|
25
|
+
attr_accessor :PayMode
|
26
|
+
|
27
|
+
def initialize(paymode=nil)
|
28
|
+
@PayMode = paymode
|
29
|
+
end
|
30
|
+
|
31
|
+
def deserialize(params)
|
32
|
+
@PayMode = params['PayMode']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# ActivateService返回参数结构体
|
37
|
+
class ActivateServiceResponse < TencentCloud::Common::AbstractModel
|
38
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
39
|
+
# @type RequestId: String
|
40
|
+
|
41
|
+
attr_accessor :RequestId
|
42
|
+
|
43
|
+
def initialize(requestid=nil)
|
44
|
+
@RequestId = requestid
|
45
|
+
end
|
46
|
+
|
47
|
+
def deserialize(params)
|
48
|
+
@RequestId = params['RequestId']
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
20
52
|
# ChatCompletions请求参数结构体
|
21
53
|
class ChatCompletionsRequest < TencentCloud::Common::AbstractModel
|
22
54
|
# @param Model: 模型名称,可选值包括 hunyuan-lite、hunyuan-standard、hunyuan-standard-256K、hunyuan-pro、 hunyuan-code、 hunyuan-role、 hunyuan-functioncall、 hunyuan-vision。
|
@@ -55,14 +87,12 @@ module TencentCloud
|
|
55
87
|
# 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
|
56
88
|
# @type StreamModeration: Boolean
|
57
89
|
# @param TopP: 说明:
|
58
|
-
# 1.
|
59
|
-
# 2.
|
60
|
-
# 3. 非必要不建议使用,不合理的取值会影响效果。
|
90
|
+
# 1. 影响输出文本的多样性,取值区间为 [0.0, 1.0]。取值越大,生成文本的多样性越强。
|
91
|
+
# 2. 模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。
|
61
92
|
# @type TopP: Float
|
62
93
|
# @param Temperature: 说明:
|
63
|
-
# 1.
|
64
|
-
# 2.
|
65
|
-
# 3. 非必要不建议使用,不合理的取值会影响效果。
|
94
|
+
# 1. 影响模型输出多样性,取值区间为 [0.0, 2.0]。较高的数值会使输出更加多样化和不可预测,而较低的数值会使其更加集中和确定。
|
95
|
+
# 2. 模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。
|
66
96
|
# @type Temperature: Float
|
67
97
|
# @param EnableEnhancement: 功能增强(如搜索)开关。
|
68
98
|
# 说明:
|
@@ -704,6 +734,38 @@ module TencentCloud
|
|
704
734
|
end
|
705
735
|
end
|
706
736
|
|
737
|
+
# SetPayMode请求参数结构体
|
738
|
+
class SetPayModeRequest < TencentCloud::Common::AbstractModel
|
739
|
+
# @param PayMode: 设置后付费状态,0:后付费;1:预付费
|
740
|
+
# @type PayMode: Integer
|
741
|
+
|
742
|
+
attr_accessor :PayMode
|
743
|
+
|
744
|
+
def initialize(paymode=nil)
|
745
|
+
@PayMode = paymode
|
746
|
+
end
|
747
|
+
|
748
|
+
def deserialize(params)
|
749
|
+
@PayMode = params['PayMode']
|
750
|
+
end
|
751
|
+
end
|
752
|
+
|
753
|
+
# SetPayMode返回参数结构体
|
754
|
+
class SetPayModeResponse < TencentCloud::Common::AbstractModel
|
755
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
756
|
+
# @type RequestId: String
|
757
|
+
|
758
|
+
attr_accessor :RequestId
|
759
|
+
|
760
|
+
def initialize(requestid=nil)
|
761
|
+
@RequestId = requestid
|
762
|
+
end
|
763
|
+
|
764
|
+
def deserialize(params)
|
765
|
+
@RequestId = params['RequestId']
|
766
|
+
end
|
767
|
+
end
|
768
|
+
|
707
769
|
# SubmitHunyuanImageJob请求参数结构体
|
708
770
|
class SubmitHunyuanImageJobRequest < TencentCloud::Common::AbstractModel
|
709
771
|
# @param Prompt: 文本描述。
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-hunyuan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.880
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|