tencentcloud-sdk-python 3.0.1275__py2.py3-none-any.whl → 3.0.1276__py2.py3-none-any.whl
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.
- tencentcloud/__init__.py +1 -1
- tencentcloud/autoscaling/v20180419/models.py +15 -0
- tencentcloud/batch/v20170312/models.py +48 -68
- tencentcloud/billing/v20180709/models.py +45 -0
- tencentcloud/cbs/v20170312/models.py +2 -2
- tencentcloud/cdb/v20170320/models.py +732 -48
- tencentcloud/cdwdoris/v20211228/models.py +2 -2
- tencentcloud/cfs/v20190719/models.py +30 -0
- tencentcloud/ckafka/v20190819/ckafka_client.py +1 -1
- tencentcloud/ckafka/v20190819/models.py +490 -324
- tencentcloud/cloudapp/v20220530/models.py +4 -4
- tencentcloud/cvm/v20170312/models.py +48 -68
- tencentcloud/cwp/v20180228/models.py +2 -2
- tencentcloud/cynosdb/v20190107/cynosdb_client.py +46 -0
- tencentcloud/cynosdb/v20190107/models.py +226 -4
- tencentcloud/dts/v20211206/models.py +30 -0
- tencentcloud/emr/v20190103/models.py +33 -16
- tencentcloud/ess/v20201111/models.py +242 -0
- tencentcloud/essbasic/v20210526/models.py +241 -6
- tencentcloud/faceid/v20180301/models.py +0 -2
- tencentcloud/hunyuan/v20230901/hunyuan_client.py +23 -0
- tencentcloud/hunyuan/v20230901/models.py +591 -0
- tencentcloud/ims/v20201229/models.py +4 -4
- tencentcloud/iotexplorer/v20190423/iotexplorer_client.py +23 -0
- tencentcloud/iotexplorer/v20190423/models.py +286 -6
- tencentcloud/ivld/v20210903/ivld_client.py +0 -1
- tencentcloud/ivld/v20210903/models.py +133 -15
- tencentcloud/lcic/v20220817/models.py +2 -8
- tencentcloud/live/v20180801/errorcodes.py +18 -0
- tencentcloud/live/v20180801/live_client.py +208 -0
- tencentcloud/live/v20180801/models.py +1649 -255
- tencentcloud/lke/v20231130/lke_client.py +161 -0
- tencentcloud/lke/v20231130/models.py +1517 -187
- tencentcloud/mps/v20190612/errorcodes.py +2 -173
- tencentcloud/mps/v20190612/models.py +377 -17
- tencentcloud/mrs/v20200910/models.py +0 -2652
- tencentcloud/ocr/v20181119/models.py +0 -273
- tencentcloud/ocr/v20181119/ocr_client.py +0 -23
- tencentcloud/organization/v20210331/models.py +2 -24
- tencentcloud/privatedns/v20201028/models.py +47 -0
- tencentcloud/rce/v20201103/models.py +2 -2
- tencentcloud/redis/v20180412/models.py +2 -2
- tencentcloud/scf/v20180416/models.py +2 -2
- tencentcloud/teo/v20220901/models.py +366 -18
- tencentcloud/teo/v20220901/teo_client.py +69 -0
- tencentcloud/tke/v20220501/models.py +200 -0
- tencentcloud/tmt/v20180321/tmt_client.py +1 -1
- tencentcloud/trocket/v20230308/models.py +24 -24
- tencentcloud/trtc/v20190722/models.py +230 -0
- tencentcloud/tsf/v20180326/models.py +2405 -334
- tencentcloud/tsf/v20180326/tsf_client.py +3 -0
- tencentcloud/tts/v20190823/models.py +2 -2
- tencentcloud/tts/v20190823/tts_client.py +1 -1
- tencentcloud/vclm/v20240523/models.py +156 -10
- tencentcloud/vclm/v20240523/vclm_client.py +23 -0
- tencentcloud/vcube/__init__.py +0 -0
- tencentcloud/vcube/v20220410/__init__.py +0 -0
- tencentcloud/vcube/v20220410/errorcodes.py +72 -0
- tencentcloud/vcube/v20220410/models.py +7325 -0
- tencentcloud/vcube/v20220410/vcube_client.py +808 -0
- tencentcloud/vdb/v20230616/models.py +45 -0
- tencentcloud/vod/v20180717/errorcodes.py +6 -0
- tencentcloud/vod/v20180717/models.py +62 -2
- tencentcloud/vod/v20180717/vod_client.py +2 -2
- tencentcloud/vpc/v20170312/models.py +272 -2
- tencentcloud/vpc/v20170312/vpc_client.py +23 -0
- {tencentcloud_sdk_python-3.0.1275.dist-info → tencentcloud_sdk_python-3.0.1276.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1275.dist-info → tencentcloud_sdk_python-3.0.1276.dist-info}/RECORD +71 -66
- {tencentcloud_sdk_python-3.0.1275.dist-info → tencentcloud_sdk_python-3.0.1276.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1275.dist-info → tencentcloud_sdk_python-3.0.1276.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1275.dist-info → tencentcloud_sdk_python-3.0.1276.dist-info}/top_level.txt +0 -0
@@ -172,6 +172,11 @@ class ChatCompletionsRequest(AbstractModel):
|
|
172
172
|
:type EnableDeepSearch: bool
|
173
173
|
:param _Seed: 说明: 1. 确保模型的输出是可复现的。 2. 取值区间为非0正整数,最大值10000。 3. 非必要不建议使用,不合理的取值会影响效果。
|
174
174
|
:type Seed: int
|
175
|
+
:param _ForceSearchEnhancement: 强制搜索增强开关。
|
176
|
+
说明:
|
177
|
+
1. 未传值时默认关闭。
|
178
|
+
2. 开启后,将强制走AI搜索,当AI搜索结果为空时,由大模型回复兜底话术。
|
179
|
+
:type ForceSearchEnhancement: bool
|
175
180
|
"""
|
176
181
|
self._Model = None
|
177
182
|
self._Messages = None
|
@@ -189,6 +194,7 @@ class ChatCompletionsRequest(AbstractModel):
|
|
189
194
|
self._EnableMultimedia = None
|
190
195
|
self._EnableDeepSearch = None
|
191
196
|
self._Seed = None
|
197
|
+
self._ForceSearchEnhancement = None
|
192
198
|
|
193
199
|
@property
|
194
200
|
def Model(self):
|
@@ -417,6 +423,20 @@ class ChatCompletionsRequest(AbstractModel):
|
|
417
423
|
def Seed(self, Seed):
|
418
424
|
self._Seed = Seed
|
419
425
|
|
426
|
+
@property
|
427
|
+
def ForceSearchEnhancement(self):
|
428
|
+
"""强制搜索增强开关。
|
429
|
+
说明:
|
430
|
+
1. 未传值时默认关闭。
|
431
|
+
2. 开启后,将强制走AI搜索,当AI搜索结果为空时,由大模型回复兜底话术。
|
432
|
+
:rtype: bool
|
433
|
+
"""
|
434
|
+
return self._ForceSearchEnhancement
|
435
|
+
|
436
|
+
@ForceSearchEnhancement.setter
|
437
|
+
def ForceSearchEnhancement(self, ForceSearchEnhancement):
|
438
|
+
self._ForceSearchEnhancement = ForceSearchEnhancement
|
439
|
+
|
420
440
|
|
421
441
|
def _deserialize(self, params):
|
422
442
|
self._Model = params.get("Model")
|
@@ -447,6 +467,7 @@ class ChatCompletionsRequest(AbstractModel):
|
|
447
467
|
self._EnableMultimedia = params.get("EnableMultimedia")
|
448
468
|
self._EnableDeepSearch = params.get("EnableDeepSearch")
|
449
469
|
self._Seed = params.get("Seed")
|
470
|
+
self._ForceSearchEnhancement = params.get("ForceSearchEnhancement")
|
450
471
|
memeber_set = set(params.keys())
|
451
472
|
for name, value in vars(self).items():
|
452
473
|
property_name = name[1:]
|
@@ -648,6 +669,300 @@ class ChatCompletionsResponse(AbstractModel):
|
|
648
669
|
self._RequestId = params.get("RequestId")
|
649
670
|
|
650
671
|
|
672
|
+
class ChatTranslationsRequest(AbstractModel):
|
673
|
+
"""ChatTranslations请求参数结构体
|
674
|
+
|
675
|
+
"""
|
676
|
+
|
677
|
+
def __init__(self):
|
678
|
+
r"""
|
679
|
+
:param _Model: 模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。
|
680
|
+
各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
|
681
|
+
|
682
|
+
注意:
|
683
|
+
不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
684
|
+
:type Model: str
|
685
|
+
:param _Stream: 流式调用开关。
|
686
|
+
说明:
|
687
|
+
1. 未传值时默认为非流式调用(false)。
|
688
|
+
2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
|
689
|
+
3. 非流式调用时:
|
690
|
+
调用方式与普通 HTTP 请求无异。
|
691
|
+
接口响应耗时较长,**如需更低时延建议设置为 true**。
|
692
|
+
只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
|
693
|
+
|
694
|
+
注意:
|
695
|
+
通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
|
696
|
+
:type Stream: bool
|
697
|
+
:param _Text: 待翻译的文本
|
698
|
+
:type Text: str
|
699
|
+
:param _Source: 源语言。
|
700
|
+
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id
|
701
|
+
:type Source: str
|
702
|
+
:param _Target: 目标语言。
|
703
|
+
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id
|
704
|
+
:type Target: str
|
705
|
+
:param _Field: 待翻译文本所属领域,例如游戏剧情等
|
706
|
+
:type Field: str
|
707
|
+
:param _References: 参考示例,最多10个
|
708
|
+
:type References: list of Reference
|
709
|
+
"""
|
710
|
+
self._Model = None
|
711
|
+
self._Stream = None
|
712
|
+
self._Text = None
|
713
|
+
self._Source = None
|
714
|
+
self._Target = None
|
715
|
+
self._Field = None
|
716
|
+
self._References = None
|
717
|
+
|
718
|
+
@property
|
719
|
+
def Model(self):
|
720
|
+
"""模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。
|
721
|
+
各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
|
722
|
+
|
723
|
+
注意:
|
724
|
+
不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
725
|
+
:rtype: str
|
726
|
+
"""
|
727
|
+
return self._Model
|
728
|
+
|
729
|
+
@Model.setter
|
730
|
+
def Model(self, Model):
|
731
|
+
self._Model = Model
|
732
|
+
|
733
|
+
@property
|
734
|
+
def Stream(self):
|
735
|
+
"""流式调用开关。
|
736
|
+
说明:
|
737
|
+
1. 未传值时默认为非流式调用(false)。
|
738
|
+
2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
|
739
|
+
3. 非流式调用时:
|
740
|
+
调用方式与普通 HTTP 请求无异。
|
741
|
+
接口响应耗时较长,**如需更低时延建议设置为 true**。
|
742
|
+
只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
|
743
|
+
|
744
|
+
注意:
|
745
|
+
通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
|
746
|
+
:rtype: bool
|
747
|
+
"""
|
748
|
+
return self._Stream
|
749
|
+
|
750
|
+
@Stream.setter
|
751
|
+
def Stream(self, Stream):
|
752
|
+
self._Stream = Stream
|
753
|
+
|
754
|
+
@property
|
755
|
+
def Text(self):
|
756
|
+
"""待翻译的文本
|
757
|
+
:rtype: str
|
758
|
+
"""
|
759
|
+
return self._Text
|
760
|
+
|
761
|
+
@Text.setter
|
762
|
+
def Text(self, Text):
|
763
|
+
self._Text = Text
|
764
|
+
|
765
|
+
@property
|
766
|
+
def Source(self):
|
767
|
+
"""源语言。
|
768
|
+
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id
|
769
|
+
:rtype: str
|
770
|
+
"""
|
771
|
+
return self._Source
|
772
|
+
|
773
|
+
@Source.setter
|
774
|
+
def Source(self, Source):
|
775
|
+
self._Source = Source
|
776
|
+
|
777
|
+
@property
|
778
|
+
def Target(self):
|
779
|
+
"""目标语言。
|
780
|
+
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id
|
781
|
+
:rtype: str
|
782
|
+
"""
|
783
|
+
return self._Target
|
784
|
+
|
785
|
+
@Target.setter
|
786
|
+
def Target(self, Target):
|
787
|
+
self._Target = Target
|
788
|
+
|
789
|
+
@property
|
790
|
+
def Field(self):
|
791
|
+
"""待翻译文本所属领域,例如游戏剧情等
|
792
|
+
:rtype: str
|
793
|
+
"""
|
794
|
+
return self._Field
|
795
|
+
|
796
|
+
@Field.setter
|
797
|
+
def Field(self, Field):
|
798
|
+
self._Field = Field
|
799
|
+
|
800
|
+
@property
|
801
|
+
def References(self):
|
802
|
+
"""参考示例,最多10个
|
803
|
+
:rtype: list of Reference
|
804
|
+
"""
|
805
|
+
return self._References
|
806
|
+
|
807
|
+
@References.setter
|
808
|
+
def References(self, References):
|
809
|
+
self._References = References
|
810
|
+
|
811
|
+
|
812
|
+
def _deserialize(self, params):
|
813
|
+
self._Model = params.get("Model")
|
814
|
+
self._Stream = params.get("Stream")
|
815
|
+
self._Text = params.get("Text")
|
816
|
+
self._Source = params.get("Source")
|
817
|
+
self._Target = params.get("Target")
|
818
|
+
self._Field = params.get("Field")
|
819
|
+
if params.get("References") is not None:
|
820
|
+
self._References = []
|
821
|
+
for item in params.get("References"):
|
822
|
+
obj = Reference()
|
823
|
+
obj._deserialize(item)
|
824
|
+
self._References.append(obj)
|
825
|
+
memeber_set = set(params.keys())
|
826
|
+
for name, value in vars(self).items():
|
827
|
+
property_name = name[1:]
|
828
|
+
if property_name in memeber_set:
|
829
|
+
memeber_set.remove(property_name)
|
830
|
+
if len(memeber_set) > 0:
|
831
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
class ChatTranslationsResponse(AbstractModel):
|
836
|
+
"""ChatTranslations返回参数结构体
|
837
|
+
|
838
|
+
"""
|
839
|
+
|
840
|
+
def __init__(self):
|
841
|
+
r"""
|
842
|
+
:param _Id: 本次请求的 RequestId。
|
843
|
+
:type Id: str
|
844
|
+
:param _Note: 免责声明。
|
845
|
+
:type Note: str
|
846
|
+
:param _Created: Unix 时间戳,单位为秒。
|
847
|
+
:type Created: int
|
848
|
+
:param _Usage: Token 统计信息。
|
849
|
+
按照总 Token 数量计费。
|
850
|
+
:type Usage: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
851
|
+
:param _Choices: 回复内容。
|
852
|
+
:type Choices: list of TranslationChoice
|
853
|
+
:param _ErrorMsg: 错误信息。
|
854
|
+
如果流式返回中服务处理异常,返回该错误信息。
|
855
|
+
:type ErrorMsg: :class:`tencentcloud.hunyuan.v20230901.models.ErrorMsg`
|
856
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
857
|
+
:type RequestId: str
|
858
|
+
"""
|
859
|
+
self._Id = None
|
860
|
+
self._Note = None
|
861
|
+
self._Created = None
|
862
|
+
self._Usage = None
|
863
|
+
self._Choices = None
|
864
|
+
self._ErrorMsg = None
|
865
|
+
self._RequestId = None
|
866
|
+
|
867
|
+
@property
|
868
|
+
def Id(self):
|
869
|
+
"""本次请求的 RequestId。
|
870
|
+
:rtype: str
|
871
|
+
"""
|
872
|
+
return self._Id
|
873
|
+
|
874
|
+
@Id.setter
|
875
|
+
def Id(self, Id):
|
876
|
+
self._Id = Id
|
877
|
+
|
878
|
+
@property
|
879
|
+
def Note(self):
|
880
|
+
"""免责声明。
|
881
|
+
:rtype: str
|
882
|
+
"""
|
883
|
+
return self._Note
|
884
|
+
|
885
|
+
@Note.setter
|
886
|
+
def Note(self, Note):
|
887
|
+
self._Note = Note
|
888
|
+
|
889
|
+
@property
|
890
|
+
def Created(self):
|
891
|
+
"""Unix 时间戳,单位为秒。
|
892
|
+
:rtype: int
|
893
|
+
"""
|
894
|
+
return self._Created
|
895
|
+
|
896
|
+
@Created.setter
|
897
|
+
def Created(self, Created):
|
898
|
+
self._Created = Created
|
899
|
+
|
900
|
+
@property
|
901
|
+
def Usage(self):
|
902
|
+
"""Token 统计信息。
|
903
|
+
按照总 Token 数量计费。
|
904
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
905
|
+
"""
|
906
|
+
return self._Usage
|
907
|
+
|
908
|
+
@Usage.setter
|
909
|
+
def Usage(self, Usage):
|
910
|
+
self._Usage = Usage
|
911
|
+
|
912
|
+
@property
|
913
|
+
def Choices(self):
|
914
|
+
"""回复内容。
|
915
|
+
:rtype: list of TranslationChoice
|
916
|
+
"""
|
917
|
+
return self._Choices
|
918
|
+
|
919
|
+
@Choices.setter
|
920
|
+
def Choices(self, Choices):
|
921
|
+
self._Choices = Choices
|
922
|
+
|
923
|
+
@property
|
924
|
+
def ErrorMsg(self):
|
925
|
+
"""错误信息。
|
926
|
+
如果流式返回中服务处理异常,返回该错误信息。
|
927
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.ErrorMsg`
|
928
|
+
"""
|
929
|
+
return self._ErrorMsg
|
930
|
+
|
931
|
+
@ErrorMsg.setter
|
932
|
+
def ErrorMsg(self, ErrorMsg):
|
933
|
+
self._ErrorMsg = ErrorMsg
|
934
|
+
|
935
|
+
@property
|
936
|
+
def RequestId(self):
|
937
|
+
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
938
|
+
:rtype: str
|
939
|
+
"""
|
940
|
+
return self._RequestId
|
941
|
+
|
942
|
+
@RequestId.setter
|
943
|
+
def RequestId(self, RequestId):
|
944
|
+
self._RequestId = RequestId
|
945
|
+
|
946
|
+
|
947
|
+
def _deserialize(self, params):
|
948
|
+
self._Id = params.get("Id")
|
949
|
+
self._Note = params.get("Note")
|
950
|
+
self._Created = params.get("Created")
|
951
|
+
if params.get("Usage") is not None:
|
952
|
+
self._Usage = Usage()
|
953
|
+
self._Usage._deserialize(params.get("Usage"))
|
954
|
+
if params.get("Choices") is not None:
|
955
|
+
self._Choices = []
|
956
|
+
for item in params.get("Choices"):
|
957
|
+
obj = TranslationChoice()
|
958
|
+
obj._deserialize(item)
|
959
|
+
self._Choices.append(obj)
|
960
|
+
if params.get("ErrorMsg") is not None:
|
961
|
+
self._ErrorMsg = ErrorMsg()
|
962
|
+
self._ErrorMsg._deserialize(params.get("ErrorMsg"))
|
963
|
+
self._RequestId = params.get("RequestId")
|
964
|
+
|
965
|
+
|
651
966
|
class Choice(AbstractModel):
|
652
967
|
"""返回的回复, 支持多个
|
653
968
|
|
@@ -3530,6 +3845,72 @@ class QueryHunyuanImageJobResponse(AbstractModel):
|
|
3530
3845
|
self._RequestId = params.get("RequestId")
|
3531
3846
|
|
3532
3847
|
|
3848
|
+
class Reference(AbstractModel):
|
3849
|
+
"""翻译对话参考示例
|
3850
|
+
|
3851
|
+
"""
|
3852
|
+
|
3853
|
+
def __init__(self):
|
3854
|
+
r"""
|
3855
|
+
:param _Type: 翻译文本类型,枚举"sentence"表示句子, "term"表示术语
|
3856
|
+
:type Type: str
|
3857
|
+
:param _Text: 原文
|
3858
|
+
:type Text: str
|
3859
|
+
:param _Translation: 译文
|
3860
|
+
:type Translation: str
|
3861
|
+
"""
|
3862
|
+
self._Type = None
|
3863
|
+
self._Text = None
|
3864
|
+
self._Translation = None
|
3865
|
+
|
3866
|
+
@property
|
3867
|
+
def Type(self):
|
3868
|
+
"""翻译文本类型,枚举"sentence"表示句子, "term"表示术语
|
3869
|
+
:rtype: str
|
3870
|
+
"""
|
3871
|
+
return self._Type
|
3872
|
+
|
3873
|
+
@Type.setter
|
3874
|
+
def Type(self, Type):
|
3875
|
+
self._Type = Type
|
3876
|
+
|
3877
|
+
@property
|
3878
|
+
def Text(self):
|
3879
|
+
"""原文
|
3880
|
+
:rtype: str
|
3881
|
+
"""
|
3882
|
+
return self._Text
|
3883
|
+
|
3884
|
+
@Text.setter
|
3885
|
+
def Text(self, Text):
|
3886
|
+
self._Text = Text
|
3887
|
+
|
3888
|
+
@property
|
3889
|
+
def Translation(self):
|
3890
|
+
"""译文
|
3891
|
+
:rtype: str
|
3892
|
+
"""
|
3893
|
+
return self._Translation
|
3894
|
+
|
3895
|
+
@Translation.setter
|
3896
|
+
def Translation(self, Translation):
|
3897
|
+
self._Translation = Translation
|
3898
|
+
|
3899
|
+
|
3900
|
+
def _deserialize(self, params):
|
3901
|
+
self._Type = params.get("Type")
|
3902
|
+
self._Text = params.get("Text")
|
3903
|
+
self._Translation = params.get("Translation")
|
3904
|
+
memeber_set = set(params.keys())
|
3905
|
+
for name, value in vars(self).items():
|
3906
|
+
property_name = name[1:]
|
3907
|
+
if property_name in memeber_set:
|
3908
|
+
memeber_set.remove(property_name)
|
3909
|
+
if len(memeber_set) > 0:
|
3910
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
3911
|
+
|
3912
|
+
|
3913
|
+
|
3533
3914
|
class RelevantEntity(AbstractModel):
|
3534
3915
|
"""相关组织及人物
|
3535
3916
|
|
@@ -4515,6 +4896,10 @@ class SubmitHunyuanImageJobRequest(AbstractModel):
|
|
4515
4896
|
不传:随机种子生成。
|
4516
4897
|
正数:固定种子生成。
|
4517
4898
|
:type Seed: int
|
4899
|
+
:param _Clarity: 超分选项,默认不做超分,可选开启。
|
4900
|
+
x2:2倍超分
|
4901
|
+
x4:4倍超分
|
4902
|
+
:type Clarity: str
|
4518
4903
|
:param _Revise: prompt 扩写开关。1为开启,0为关闭,不传默认开启。
|
4519
4904
|
开启扩写后,将自动扩写原始输入的 prompt 并使用扩写后的 prompt 生成图片,返回生成图片结果时将一并返回扩写后的 prompt 文本。
|
4520
4905
|
如果关闭扩写,将直接使用原始输入的 prompt 生成图片。
|
@@ -4536,6 +4921,7 @@ class SubmitHunyuanImageJobRequest(AbstractModel):
|
|
4536
4921
|
self._Resolution = None
|
4537
4922
|
self._Num = None
|
4538
4923
|
self._Seed = None
|
4924
|
+
self._Clarity = None
|
4539
4925
|
self._Revise = None
|
4540
4926
|
self._LogoAdd = None
|
4541
4927
|
self._LogoParam = None
|
@@ -4615,6 +5001,19 @@ class SubmitHunyuanImageJobRequest(AbstractModel):
|
|
4615
5001
|
def Seed(self, Seed):
|
4616
5002
|
self._Seed = Seed
|
4617
5003
|
|
5004
|
+
@property
|
5005
|
+
def Clarity(self):
|
5006
|
+
"""超分选项,默认不做超分,可选开启。
|
5007
|
+
x2:2倍超分
|
5008
|
+
x4:4倍超分
|
5009
|
+
:rtype: str
|
5010
|
+
"""
|
5011
|
+
return self._Clarity
|
5012
|
+
|
5013
|
+
@Clarity.setter
|
5014
|
+
def Clarity(self, Clarity):
|
5015
|
+
self._Clarity = Clarity
|
5016
|
+
|
4618
5017
|
@property
|
4619
5018
|
def Revise(self):
|
4620
5019
|
"""prompt 扩写开关。1为开启,0为关闭,不传默认开启。
|
@@ -4664,6 +5063,7 @@ class SubmitHunyuanImageJobRequest(AbstractModel):
|
|
4664
5063
|
self._Resolution = params.get("Resolution")
|
4665
5064
|
self._Num = params.get("Num")
|
4666
5065
|
self._Seed = params.get("Seed")
|
5066
|
+
self._Clarity = params.get("Clarity")
|
4667
5067
|
self._Revise = params.get("Revise")
|
4668
5068
|
self._LogoAdd = params.get("LogoAdd")
|
4669
5069
|
if params.get("LogoParam") is not None:
|
@@ -5677,6 +6077,197 @@ class ToolFunction(AbstractModel):
|
|
5677
6077
|
|
5678
6078
|
|
5679
6079
|
|
6080
|
+
class TranslationChoice(AbstractModel):
|
6081
|
+
"""翻译接口返回的回复,支持多个
|
6082
|
+
|
6083
|
+
"""
|
6084
|
+
|
6085
|
+
def __init__(self):
|
6086
|
+
r"""
|
6087
|
+
:param _FinishReason: 结束标志位,可能为 stop、 sensitive。
|
6088
|
+
stop 表示输出正常结束。
|
6089
|
+
sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。
|
6090
|
+
:type FinishReason: str
|
6091
|
+
:param _Index: 索引值,流式调用时使用该字段。
|
6092
|
+
:type Index: int
|
6093
|
+
:param _Delta: 增量返回值,流式调用时使用该字段。
|
6094
|
+
:type Delta: :class:`tencentcloud.hunyuan.v20230901.models.TranslationDelta`
|
6095
|
+
:param _Message: 返回值,非流式调用时使用该字段。
|
6096
|
+
:type Message: :class:`tencentcloud.hunyuan.v20230901.models.TranslationMessage`
|
6097
|
+
"""
|
6098
|
+
self._FinishReason = None
|
6099
|
+
self._Index = None
|
6100
|
+
self._Delta = None
|
6101
|
+
self._Message = None
|
6102
|
+
|
6103
|
+
@property
|
6104
|
+
def FinishReason(self):
|
6105
|
+
"""结束标志位,可能为 stop、 sensitive。
|
6106
|
+
stop 表示输出正常结束。
|
6107
|
+
sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。
|
6108
|
+
:rtype: str
|
6109
|
+
"""
|
6110
|
+
return self._FinishReason
|
6111
|
+
|
6112
|
+
@FinishReason.setter
|
6113
|
+
def FinishReason(self, FinishReason):
|
6114
|
+
self._FinishReason = FinishReason
|
6115
|
+
|
6116
|
+
@property
|
6117
|
+
def Index(self):
|
6118
|
+
"""索引值,流式调用时使用该字段。
|
6119
|
+
:rtype: int
|
6120
|
+
"""
|
6121
|
+
return self._Index
|
6122
|
+
|
6123
|
+
@Index.setter
|
6124
|
+
def Index(self, Index):
|
6125
|
+
self._Index = Index
|
6126
|
+
|
6127
|
+
@property
|
6128
|
+
def Delta(self):
|
6129
|
+
"""增量返回值,流式调用时使用该字段。
|
6130
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.TranslationDelta`
|
6131
|
+
"""
|
6132
|
+
return self._Delta
|
6133
|
+
|
6134
|
+
@Delta.setter
|
6135
|
+
def Delta(self, Delta):
|
6136
|
+
self._Delta = Delta
|
6137
|
+
|
6138
|
+
@property
|
6139
|
+
def Message(self):
|
6140
|
+
"""返回值,非流式调用时使用该字段。
|
6141
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.TranslationMessage`
|
6142
|
+
"""
|
6143
|
+
return self._Message
|
6144
|
+
|
6145
|
+
@Message.setter
|
6146
|
+
def Message(self, Message):
|
6147
|
+
self._Message = Message
|
6148
|
+
|
6149
|
+
|
6150
|
+
def _deserialize(self, params):
|
6151
|
+
self._FinishReason = params.get("FinishReason")
|
6152
|
+
self._Index = params.get("Index")
|
6153
|
+
if params.get("Delta") is not None:
|
6154
|
+
self._Delta = TranslationDelta()
|
6155
|
+
self._Delta._deserialize(params.get("Delta"))
|
6156
|
+
if params.get("Message") is not None:
|
6157
|
+
self._Message = TranslationMessage()
|
6158
|
+
self._Message._deserialize(params.get("Message"))
|
6159
|
+
memeber_set = set(params.keys())
|
6160
|
+
for name, value in vars(self).items():
|
6161
|
+
property_name = name[1:]
|
6162
|
+
if property_name in memeber_set:
|
6163
|
+
memeber_set.remove(property_name)
|
6164
|
+
if len(memeber_set) > 0:
|
6165
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
6166
|
+
|
6167
|
+
|
6168
|
+
|
6169
|
+
class TranslationDelta(AbstractModel):
|
6170
|
+
"""翻译接口返回的内容(流式返回)
|
6171
|
+
|
6172
|
+
"""
|
6173
|
+
|
6174
|
+
def __init__(self):
|
6175
|
+
r"""
|
6176
|
+
:param _Role: 角色名称。
|
6177
|
+
:type Role: str
|
6178
|
+
:param _Content: 内容详情。
|
6179
|
+
:type Content: str
|
6180
|
+
"""
|
6181
|
+
self._Role = None
|
6182
|
+
self._Content = None
|
6183
|
+
|
6184
|
+
@property
|
6185
|
+
def Role(self):
|
6186
|
+
"""角色名称。
|
6187
|
+
:rtype: str
|
6188
|
+
"""
|
6189
|
+
return self._Role
|
6190
|
+
|
6191
|
+
@Role.setter
|
6192
|
+
def Role(self, Role):
|
6193
|
+
self._Role = Role
|
6194
|
+
|
6195
|
+
@property
|
6196
|
+
def Content(self):
|
6197
|
+
"""内容详情。
|
6198
|
+
:rtype: str
|
6199
|
+
"""
|
6200
|
+
return self._Content
|
6201
|
+
|
6202
|
+
@Content.setter
|
6203
|
+
def Content(self, Content):
|
6204
|
+
self._Content = Content
|
6205
|
+
|
6206
|
+
|
6207
|
+
def _deserialize(self, params):
|
6208
|
+
self._Role = params.get("Role")
|
6209
|
+
self._Content = params.get("Content")
|
6210
|
+
memeber_set = set(params.keys())
|
6211
|
+
for name, value in vars(self).items():
|
6212
|
+
property_name = name[1:]
|
6213
|
+
if property_name in memeber_set:
|
6214
|
+
memeber_set.remove(property_name)
|
6215
|
+
if len(memeber_set) > 0:
|
6216
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
6217
|
+
|
6218
|
+
|
6219
|
+
|
6220
|
+
class TranslationMessage(AbstractModel):
|
6221
|
+
"""翻译接口会话内容
|
6222
|
+
|
6223
|
+
"""
|
6224
|
+
|
6225
|
+
def __init__(self):
|
6226
|
+
r"""
|
6227
|
+
:param _Role: 角色,可选值包括 system、user、assistant、 tool。
|
6228
|
+
:type Role: str
|
6229
|
+
:param _Content: 文本内容
|
6230
|
+
:type Content: str
|
6231
|
+
"""
|
6232
|
+
self._Role = None
|
6233
|
+
self._Content = None
|
6234
|
+
|
6235
|
+
@property
|
6236
|
+
def Role(self):
|
6237
|
+
"""角色,可选值包括 system、user、assistant、 tool。
|
6238
|
+
:rtype: str
|
6239
|
+
"""
|
6240
|
+
return self._Role
|
6241
|
+
|
6242
|
+
@Role.setter
|
6243
|
+
def Role(self, Role):
|
6244
|
+
self._Role = Role
|
6245
|
+
|
6246
|
+
@property
|
6247
|
+
def Content(self):
|
6248
|
+
"""文本内容
|
6249
|
+
:rtype: str
|
6250
|
+
"""
|
6251
|
+
return self._Content
|
6252
|
+
|
6253
|
+
@Content.setter
|
6254
|
+
def Content(self, Content):
|
6255
|
+
self._Content = Content
|
6256
|
+
|
6257
|
+
|
6258
|
+
def _deserialize(self, params):
|
6259
|
+
self._Role = params.get("Role")
|
6260
|
+
self._Content = params.get("Content")
|
6261
|
+
memeber_set = set(params.keys())
|
6262
|
+
for name, value in vars(self).items():
|
6263
|
+
property_name = name[1:]
|
6264
|
+
if property_name in memeber_set:
|
6265
|
+
memeber_set.remove(property_name)
|
6266
|
+
if len(memeber_set) > 0:
|
6267
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
6268
|
+
|
6269
|
+
|
6270
|
+
|
5680
6271
|
class Usage(AbstractModel):
|
5681
6272
|
"""Token 数量
|
5682
6273
|
|
@@ -375,9 +375,9 @@ class ImageModerationRequest(AbstractModel):
|
|
375
375
|
:type BizType: str
|
376
376
|
:param _DataId: 该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。<br>取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,**长度不超过64个字符**。
|
377
377
|
:type DataId: str
|
378
|
-
:param _FileContent: 该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl
|
378
|
+
:param _FileContent: 该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl必须选择输入其中一个**。
|
379
379
|
:type FileContent: str
|
380
|
-
:param _FileUrl: 该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。
|
380
|
+
:param _FileUrl: 该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。
|
381
381
|
:type FileUrl: str
|
382
382
|
:param _Interval: **GIF检测专用**,用于表示GIF截帧频率(每隔多少张图片抽取一帧进行检测);默认值为0,此时只会检测GIF的第一帧或不进行切分处理。<br>备注:Interval与MaxFrames参数需要组合使用。例如,Interval=3, MaxFrames=400,则代表在检测GIF时,将每间隔2帧检测一次且最多检测400帧。
|
383
383
|
:type Interval: int
|
@@ -421,7 +421,7 @@ class ImageModerationRequest(AbstractModel):
|
|
421
421
|
|
422
422
|
@property
|
423
423
|
def FileContent(self):
|
424
|
-
"""该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl
|
424
|
+
"""该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl必须选择输入其中一个**。
|
425
425
|
:rtype: str
|
426
426
|
"""
|
427
427
|
return self._FileContent
|
@@ -432,7 +432,7 @@ class ImageModerationRequest(AbstractModel):
|
|
432
432
|
|
433
433
|
@property
|
434
434
|
def FileUrl(self):
|
435
|
-
"""该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。
|
435
|
+
"""该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。
|
436
436
|
:rtype: str
|
437
437
|
"""
|
438
438
|
return self._FileUrl
|