tencentcloud-sdk-hunyuan 3.0.864 → 3.0.866

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67940715c0ff7d8e7a17461f2af921116ffeae4b
4
- data.tar.gz: f9ee8894304a9934bce283eff47500c62a23eef1
3
+ metadata.gz: 2214f750dbd5a981a233b8484dec0fe14c077867
4
+ data.tar.gz: eceb8b5ea390c7bccd6de3b7b62a43ad6c663f53
5
5
  SHA512:
6
- metadata.gz: d48ea6c6fa9aad03fc6a87575f9746d485b7853d3bd049ef17d215b2558604acb3667dccf2fb43b25a96dd92cc30e2ce9f74cc0c45d3bc9b56a2b747ac368c14
7
- data.tar.gz: caed179db7ade3d52479f6757a326389bf145d6e9b581fd6893c4d3e2f23a4a6ccf4b72f698a47977bd200e387d51d1b64b2cd563346c44731c44dcd9df853c2
6
+ metadata.gz: 3438a49d31b6d333a79645d7f795f0b93d0614484b6c14ae15fff125b2e955d0e50bf4ea6efdabd5c640a75ccb33632c766d13b1642bfeacf404eaf9d71fac84
7
+ data.tar.gz: e5118b5b3c3578a230c90d521db458f1266a2495810bad48505af467887f322a4020720fe964dfc244b4a99da9670210183c040ca15433f8710572ab433859c2
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.864
1
+ 3.0.866
@@ -160,6 +160,31 @@ module TencentCloud
160
160
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
161
161
  end
162
162
 
163
+ # 文生图轻量版接口根据输入的文本描述,智能生成与之相关的结果图。
164
+ # 文生图轻量版默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。
165
+
166
+ # @param request: Request instance for TextToImageLite.
167
+ # @type request: :class:`Tencentcloud::hunyuan::V20230901::TextToImageLiteRequest`
168
+ # @rtype: :class:`Tencentcloud::hunyuan::V20230901::TextToImageLiteResponse`
169
+ def TextToImageLite(request)
170
+ body = send_request('TextToImageLite', request.serialize)
171
+ response = JSON.parse(body)
172
+ if response['Response'].key?('Error') == false
173
+ model = TextToImageLiteResponse.new
174
+ model.deserialize(response['Response'])
175
+ model
176
+ else
177
+ code = response['Response']['Error']['Code']
178
+ message = response['Response']['Error']['Message']
179
+ reqid = response['Response']['RequestId']
180
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
181
+ end
182
+ rescue TencentCloud::Common::TencentCloudSDKException => e
183
+ raise e
184
+ rescue StandardError => e
185
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
186
+ end
187
+
163
188
 
164
189
  end
165
190
  end
@@ -145,18 +145,21 @@ module TencentCloud
145
145
  # 如果流式返回中服务处理异常,返回该错误信息。
146
146
  # 注意:此字段可能返回 null,表示取不到有效值。
147
147
  # @type ErrorMsg: :class:`Tencentcloud::Hunyuan.v20230901.models.ErrorMsg`
148
+ # @param ModerationLevel: 多轮会话风险审核,值为1时,表明存在信息安全风险,建议终止客户多轮会话。
149
+ # @type ModerationLevel: String
148
150
  # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
149
151
  # @type RequestId: String
150
152
 
151
- attr_accessor :Created, :Usage, :Note, :Id, :Choices, :ErrorMsg, :RequestId
153
+ attr_accessor :Created, :Usage, :Note, :Id, :Choices, :ErrorMsg, :ModerationLevel, :RequestId
152
154
 
153
- def initialize(created=nil, usage=nil, note=nil, id=nil, choices=nil, errormsg=nil, requestid=nil)
155
+ def initialize(created=nil, usage=nil, note=nil, id=nil, choices=nil, errormsg=nil, moderationlevel=nil, requestid=nil)
154
156
  @Created = created
155
157
  @Usage = usage
156
158
  @Note = note
157
159
  @Id = id
158
160
  @Choices = choices
159
161
  @ErrorMsg = errormsg
162
+ @ModerationLevel = moderationlevel
160
163
  @RequestId = requestid
161
164
  end
162
165
 
@@ -180,6 +183,7 @@ module TencentCloud
180
183
  @ErrorMsg = ErrorMsg.new
181
184
  @ErrorMsg.deserialize(params['ErrorMsg'])
182
185
  end
186
+ @ModerationLevel = params['ModerationLevel']
183
187
  @RequestId = params['RequestId']
184
188
  end
185
189
  end
@@ -636,6 +640,73 @@ module TencentCloud
636
640
  end
637
641
  end
638
642
 
643
+ # TextToImageLite请求参数结构体
644
+ class TextToImageLiteRequest < TencentCloud::Common::AbstractModel
645
+ # @param Prompt: 文本描述。
646
+ # 算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
647
+ # 不能为空,推荐使用中文。最多可传256个 utf-8 字符。
648
+ # @type Prompt: String
649
+ # @param NegativePrompt: 反向文本描述。
650
+ # 用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
651
+ # 推荐使用中文。最多可传256个 utf-8 字符。
652
+ # @type NegativePrompt: String
653
+ # @param Style: 绘画风格。
654
+ # 请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
655
+ # 推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
656
+ # @type Style: String
657
+ # @param Resolution: 生成图分辨率。
658
+ # 支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。
659
+ # @type Resolution: String
660
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
661
+ # 1:添加标识。
662
+ # 0:不添加标识。
663
+ # 其他数值:默认按0处理。
664
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
665
+ # @type LogoAdd: Integer
666
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
667
+ # @type RspImgType: String
668
+
669
+ attr_accessor :Prompt, :NegativePrompt, :Style, :Resolution, :LogoAdd, :RspImgType
670
+
671
+ def initialize(prompt=nil, negativeprompt=nil, style=nil, resolution=nil, logoadd=nil, rspimgtype=nil)
672
+ @Prompt = prompt
673
+ @NegativePrompt = negativeprompt
674
+ @Style = style
675
+ @Resolution = resolution
676
+ @LogoAdd = logoadd
677
+ @RspImgType = rspimgtype
678
+ end
679
+
680
+ def deserialize(params)
681
+ @Prompt = params['Prompt']
682
+ @NegativePrompt = params['NegativePrompt']
683
+ @Style = params['Style']
684
+ @Resolution = params['Resolution']
685
+ @LogoAdd = params['LogoAdd']
686
+ @RspImgType = params['RspImgType']
687
+ end
688
+ end
689
+
690
+ # TextToImageLite返回参数结构体
691
+ class TextToImageLiteResponse < TencentCloud::Common::AbstractModel
692
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。如果传入 base64 则返回生成图 Base64 编码。如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
693
+ # @type ResultImage: String
694
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
695
+ # @type RequestId: String
696
+
697
+ attr_accessor :ResultImage, :RequestId
698
+
699
+ def initialize(resultimage=nil, requestid=nil)
700
+ @ResultImage = resultimage
701
+ @RequestId = requestid
702
+ end
703
+
704
+ def deserialize(params)
705
+ @ResultImage = params['ResultImage']
706
+ @RequestId = params['RequestId']
707
+ end
708
+ end
709
+
639
710
  # 用户指定模型使用的工具
640
711
  class Tool < TencentCloud::Common::AbstractModel
641
712
  # @param Type: 工具类型,当前只支持function
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.864
4
+ version: 3.0.866
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-07-14 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common