tencentcloud-sdk-hunyuan 3.0.864 → 3.0.865

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: cf464a2821b14ca393c989db17d679baecd82888
4
+ data.tar.gz: 947d55808681d91b5f516c6b93f3f1adcb5cd266
5
5
  SHA512:
6
- metadata.gz: d48ea6c6fa9aad03fc6a87575f9746d485b7853d3bd049ef17d215b2558604acb3667dccf2fb43b25a96dd92cc30e2ce9f74cc0c45d3bc9b56a2b747ac368c14
7
- data.tar.gz: caed179db7ade3d52479f6757a326389bf145d6e9b581fd6893c4d3e2f23a4a6ccf4b72f698a47977bd200e387d51d1b64b2cd563346c44731c44dcd9df853c2
6
+ metadata.gz: 8c5673b4d58b1e3fddc90696163970a0a9ed40fca4e6080ba4fe9ff0c09e02fbacc346bd570f3888250ee3b598d30f79957fcb57f82ed5937ac6a99f91dbb38c
7
+ data.tar.gz: c7e779a4ed3c1088e5ceae39b58a3f4646bfda9683859dec72ab9b50dcf3b335654e7935a3918a2446fb7dbd1dfa17a0941b3ff9901e6cbb1c7a8a51165cc9ef
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.864
1
+ 3.0.865
@@ -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
@@ -636,6 +636,73 @@ module TencentCloud
636
636
  end
637
637
  end
638
638
 
639
+ # TextToImageLite请求参数结构体
640
+ class TextToImageLiteRequest < TencentCloud::Common::AbstractModel
641
+ # @param Prompt: 文本描述。
642
+ # 算法将根据输入的文本智能生成与之相关的图像。建议详细描述画面主体、细节、场景等,文本描述越丰富,生成效果越精美。
643
+ # 不能为空,推荐使用中文。最多可传256个 utf-8 字符。
644
+ # @type Prompt: String
645
+ # @param NegativePrompt: 反向文本描述。
646
+ # 用于一定程度上从反面引导模型生成的走向,减少生成结果中出现描述内容的可能,但不能完全杜绝。
647
+ # 推荐使用中文。最多可传256个 utf-8 字符。
648
+ # @type NegativePrompt: String
649
+ # @param Style: 绘画风格。
650
+ # 请在 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249) 中选择期望的风格,传入风格编号。
651
+ # 推荐使用且只使用一种风格。不传默认使用201(日系动漫风格)。
652
+ # @type Style: String
653
+ # @param Resolution: 生成图分辨率。
654
+ # 支持生成以下分辨率的图片: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。
655
+ # @type Resolution: String
656
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
657
+ # 1:添加标识。
658
+ # 0:不添加标识。
659
+ # 其他数值:默认按0处理。
660
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
661
+ # @type LogoAdd: Integer
662
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
663
+ # @type RspImgType: String
664
+
665
+ attr_accessor :Prompt, :NegativePrompt, :Style, :Resolution, :LogoAdd, :RspImgType
666
+
667
+ def initialize(prompt=nil, negativeprompt=nil, style=nil, resolution=nil, logoadd=nil, rspimgtype=nil)
668
+ @Prompt = prompt
669
+ @NegativePrompt = negativeprompt
670
+ @Style = style
671
+ @Resolution = resolution
672
+ @LogoAdd = logoadd
673
+ @RspImgType = rspimgtype
674
+ end
675
+
676
+ def deserialize(params)
677
+ @Prompt = params['Prompt']
678
+ @NegativePrompt = params['NegativePrompt']
679
+ @Style = params['Style']
680
+ @Resolution = params['Resolution']
681
+ @LogoAdd = params['LogoAdd']
682
+ @RspImgType = params['RspImgType']
683
+ end
684
+ end
685
+
686
+ # TextToImageLite返回参数结构体
687
+ class TextToImageLiteResponse < TencentCloud::Common::AbstractModel
688
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。如果传入 base64 则返回生成图 Base64 编码。如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
689
+ # @type ResultImage: String
690
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
691
+ # @type RequestId: String
692
+
693
+ attr_accessor :ResultImage, :RequestId
694
+
695
+ def initialize(resultimage=nil, requestid=nil)
696
+ @ResultImage = resultimage
697
+ @RequestId = requestid
698
+ end
699
+
700
+ def deserialize(params)
701
+ @ResultImage = params['ResultImage']
702
+ @RequestId = params['RequestId']
703
+ end
704
+ end
705
+
639
706
  # 用户指定模型使用的工具
640
707
  class Tool < TencentCloud::Common::AbstractModel
641
708
  # @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.865
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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common