tencentcloud-sdk-python-waf 3.1.84__tar.gz → 3.1.88__tar.gz
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_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/setup.py +1 -1
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/v20180125/models.py +262 -29
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/v20180125/waf_client.py +18 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/v20180125/waf_client_async.py +18 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud_sdk_python_waf.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_waf-3.1.88/tencentcloud_sdk_python_waf.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_waf-3.1.84/tencentcloud_sdk_python_waf.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/README.rst +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/setup.cfg +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/__init__.py +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/v20180125/__init__.py +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud/waf/v20180125/errorcodes.py +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud_sdk_python_waf.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud_sdk_python_waf.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_waf-3.1.84 → tencentcloud_sdk_python_waf-3.1.88}/tencentcloud_sdk_python_waf.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-waf
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.88
|
|
4
4
|
Summary: Tencent Cloud Waf SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.88
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-waf',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.1.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.88,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Waf SDK for Python',
|
|
@@ -25788,32 +25788,35 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25788
25788
|
|
|
25789
25789
|
def __init__(self):
|
|
25790
25790
|
r"""
|
|
25791
|
-
:param _ServiceId:
|
|
25791
|
+
:param _ServiceId: <p>服务id,使用哪一套防护策略,就需要传哪一套服务id,模型会检测该服务id下的所有规则</p>
|
|
25792
25792
|
:type ServiceId: str
|
|
25793
|
-
:param
|
|
25794
|
-
:type Content: str
|
|
25795
|
-
:param _Type: 流量类型,是入向流量还是出向流量,入向:1,出向:2;入向和出向必填
|
|
25793
|
+
:param _Type: <p>流量类型,是入向流量还是出向流量,入向:1,出向:2;入向和出向必填</p>
|
|
25796
25794
|
:type Type: int
|
|
25797
|
-
:param _InstanceId:
|
|
25795
|
+
:param _InstanceId: <p>实例id,必传</p>
|
|
25798
25796
|
:type InstanceId: str
|
|
25799
|
-
:param
|
|
25797
|
+
:param _Content: <p>要审核的内容</p>
|
|
25798
|
+
:type Content: str
|
|
25799
|
+
:param _ChatId: <p>对话的id</p>
|
|
25800
25800
|
:type ChatId: str
|
|
25801
|
-
:param _UserId:
|
|
25801
|
+
:param _UserId: <p>标识用户的id,限速使用,不填,则限速会不生效</p>
|
|
25802
25802
|
:type UserId: str
|
|
25803
|
-
:param _TokenUsage: token使用量,不填,会采用默认的token计算方法,计算的是模型的消耗,因为该值时在出向方向上添加,即Type=2
|
|
25803
|
+
:param _TokenUsage: <p>token使用量,不填,会采用默认的token计算方法,计算的是模型的消耗,因为该值时在出向方向上添加,即Type=2</p>
|
|
25804
25804
|
:type TokenUsage: int
|
|
25805
|
+
:param _ImageEncode: <p>图片base64编码后的数据,body大小最大支持10M</p>
|
|
25806
|
+
:type ImageEncode: str
|
|
25805
25807
|
"""
|
|
25806
25808
|
self._ServiceId = None
|
|
25807
|
-
self._Content = None
|
|
25808
25809
|
self._Type = None
|
|
25809
25810
|
self._InstanceId = None
|
|
25811
|
+
self._Content = None
|
|
25810
25812
|
self._ChatId = None
|
|
25811
25813
|
self._UserId = None
|
|
25812
25814
|
self._TokenUsage = None
|
|
25815
|
+
self._ImageEncode = None
|
|
25813
25816
|
|
|
25814
25817
|
@property
|
|
25815
25818
|
def ServiceId(self):
|
|
25816
|
-
r"""
|
|
25819
|
+
r"""<p>服务id,使用哪一套防护策略,就需要传哪一套服务id,模型会检测该服务id下的所有规则</p>
|
|
25817
25820
|
:rtype: str
|
|
25818
25821
|
"""
|
|
25819
25822
|
return self._ServiceId
|
|
@@ -25822,20 +25825,9 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25822
25825
|
def ServiceId(self, ServiceId):
|
|
25823
25826
|
self._ServiceId = ServiceId
|
|
25824
25827
|
|
|
25825
|
-
@property
|
|
25826
|
-
def Content(self):
|
|
25827
|
-
r"""要审核的内容
|
|
25828
|
-
:rtype: str
|
|
25829
|
-
"""
|
|
25830
|
-
return self._Content
|
|
25831
|
-
|
|
25832
|
-
@Content.setter
|
|
25833
|
-
def Content(self, Content):
|
|
25834
|
-
self._Content = Content
|
|
25835
|
-
|
|
25836
25828
|
@property
|
|
25837
25829
|
def Type(self):
|
|
25838
|
-
r"""
|
|
25830
|
+
r"""<p>流量类型,是入向流量还是出向流量,入向:1,出向:2;入向和出向必填</p>
|
|
25839
25831
|
:rtype: int
|
|
25840
25832
|
"""
|
|
25841
25833
|
return self._Type
|
|
@@ -25846,7 +25838,7 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25846
25838
|
|
|
25847
25839
|
@property
|
|
25848
25840
|
def InstanceId(self):
|
|
25849
|
-
r"""
|
|
25841
|
+
r"""<p>实例id,必传</p>
|
|
25850
25842
|
:rtype: str
|
|
25851
25843
|
"""
|
|
25852
25844
|
return self._InstanceId
|
|
@@ -25855,9 +25847,20 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25855
25847
|
def InstanceId(self, InstanceId):
|
|
25856
25848
|
self._InstanceId = InstanceId
|
|
25857
25849
|
|
|
25850
|
+
@property
|
|
25851
|
+
def Content(self):
|
|
25852
|
+
r"""<p>要审核的内容</p>
|
|
25853
|
+
:rtype: str
|
|
25854
|
+
"""
|
|
25855
|
+
return self._Content
|
|
25856
|
+
|
|
25857
|
+
@Content.setter
|
|
25858
|
+
def Content(self, Content):
|
|
25859
|
+
self._Content = Content
|
|
25860
|
+
|
|
25858
25861
|
@property
|
|
25859
25862
|
def ChatId(self):
|
|
25860
|
-
r"""
|
|
25863
|
+
r"""<p>对话的id</p>
|
|
25861
25864
|
:rtype: str
|
|
25862
25865
|
"""
|
|
25863
25866
|
return self._ChatId
|
|
@@ -25868,7 +25871,7 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25868
25871
|
|
|
25869
25872
|
@property
|
|
25870
25873
|
def UserId(self):
|
|
25871
|
-
r"""
|
|
25874
|
+
r"""<p>标识用户的id,限速使用,不填,则限速会不生效</p>
|
|
25872
25875
|
:rtype: str
|
|
25873
25876
|
"""
|
|
25874
25877
|
return self._UserId
|
|
@@ -25879,7 +25882,7 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25879
25882
|
|
|
25880
25883
|
@property
|
|
25881
25884
|
def TokenUsage(self):
|
|
25882
|
-
r"""token使用量,不填,会采用默认的token计算方法,计算的是模型的消耗,因为该值时在出向方向上添加,即Type=2
|
|
25885
|
+
r"""<p>token使用量,不填,会采用默认的token计算方法,计算的是模型的消耗,因为该值时在出向方向上添加,即Type=2</p>
|
|
25883
25886
|
:rtype: int
|
|
25884
25887
|
"""
|
|
25885
25888
|
return self._TokenUsage
|
|
@@ -25888,15 +25891,27 @@ class DescribeLLMContentSecCheckRequest(AbstractModel):
|
|
|
25888
25891
|
def TokenUsage(self, TokenUsage):
|
|
25889
25892
|
self._TokenUsage = TokenUsage
|
|
25890
25893
|
|
|
25894
|
+
@property
|
|
25895
|
+
def ImageEncode(self):
|
|
25896
|
+
r"""<p>图片base64编码后的数据,body大小最大支持10M</p>
|
|
25897
|
+
:rtype: str
|
|
25898
|
+
"""
|
|
25899
|
+
return self._ImageEncode
|
|
25900
|
+
|
|
25901
|
+
@ImageEncode.setter
|
|
25902
|
+
def ImageEncode(self, ImageEncode):
|
|
25903
|
+
self._ImageEncode = ImageEncode
|
|
25904
|
+
|
|
25891
25905
|
|
|
25892
25906
|
def _deserialize(self, params):
|
|
25893
25907
|
self._ServiceId = params.get("ServiceId")
|
|
25894
|
-
self._Content = params.get("Content")
|
|
25895
25908
|
self._Type = params.get("Type")
|
|
25896
25909
|
self._InstanceId = params.get("InstanceId")
|
|
25910
|
+
self._Content = params.get("Content")
|
|
25897
25911
|
self._ChatId = params.get("ChatId")
|
|
25898
25912
|
self._UserId = params.get("UserId")
|
|
25899
25913
|
self._TokenUsage = params.get("TokenUsage")
|
|
25914
|
+
self._ImageEncode = params.get("ImageEncode")
|
|
25900
25915
|
memeber_set = set(params.keys())
|
|
25901
25916
|
for name, value in vars(self).items():
|
|
25902
25917
|
property_name = name[1:]
|
|
@@ -25914,7 +25929,7 @@ class DescribeLLMContentSecCheckResponse(AbstractModel):
|
|
|
25914
25929
|
|
|
25915
25930
|
def __init__(self):
|
|
25916
25931
|
r"""
|
|
25917
|
-
:param _Data:
|
|
25932
|
+
:param _Data: <p>检测结果</p>
|
|
25918
25933
|
:type Data: :class:`tencentcloud.waf.v20180125.models.LLMDetectResult`
|
|
25919
25934
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
25920
25935
|
:type RequestId: str
|
|
@@ -25924,7 +25939,7 @@ class DescribeLLMContentSecCheckResponse(AbstractModel):
|
|
|
25924
25939
|
|
|
25925
25940
|
@property
|
|
25926
25941
|
def Data(self):
|
|
25927
|
-
r"""
|
|
25942
|
+
r"""<p>检测结果</p>
|
|
25928
25943
|
:rtype: :class:`tencentcloud.waf.v20180125.models.LLMDetectResult`
|
|
25929
25944
|
"""
|
|
25930
25945
|
return self._Data
|
|
@@ -34493,6 +34508,87 @@ class GenerateDealsAndPayNewResponse(AbstractModel):
|
|
|
34493
34508
|
self._RequestId = params.get("RequestId")
|
|
34494
34509
|
|
|
34495
34510
|
|
|
34511
|
+
class GenerateLLMSecAnswerRequest(AbstractModel):
|
|
34512
|
+
r"""GenerateLLMSecAnswer请求参数结构体
|
|
34513
|
+
|
|
34514
|
+
"""
|
|
34515
|
+
|
|
34516
|
+
def __init__(self):
|
|
34517
|
+
r"""
|
|
34518
|
+
:param _Message: <p>消息结构体内容</p>
|
|
34519
|
+
:type Message: :class:`tencentcloud.waf.v20180125.models.SSEClientMessage`
|
|
34520
|
+
:param _MsgID: <p>消息id,传入 要回答的MsgID ,用于匹配自定义回答模板,最终可得到优化的代答结果</p>
|
|
34521
|
+
:type MsgID: str
|
|
34522
|
+
"""
|
|
34523
|
+
self._Message = None
|
|
34524
|
+
self._MsgID = None
|
|
34525
|
+
|
|
34526
|
+
@property
|
|
34527
|
+
def Message(self):
|
|
34528
|
+
r"""<p>消息结构体内容</p>
|
|
34529
|
+
:rtype: :class:`tencentcloud.waf.v20180125.models.SSEClientMessage`
|
|
34530
|
+
"""
|
|
34531
|
+
return self._Message
|
|
34532
|
+
|
|
34533
|
+
@Message.setter
|
|
34534
|
+
def Message(self, Message):
|
|
34535
|
+
self._Message = Message
|
|
34536
|
+
|
|
34537
|
+
@property
|
|
34538
|
+
def MsgID(self):
|
|
34539
|
+
r"""<p>消息id,传入 要回答的MsgID ,用于匹配自定义回答模板,最终可得到优化的代答结果</p>
|
|
34540
|
+
:rtype: str
|
|
34541
|
+
"""
|
|
34542
|
+
return self._MsgID
|
|
34543
|
+
|
|
34544
|
+
@MsgID.setter
|
|
34545
|
+
def MsgID(self, MsgID):
|
|
34546
|
+
self._MsgID = MsgID
|
|
34547
|
+
|
|
34548
|
+
|
|
34549
|
+
def _deserialize(self, params):
|
|
34550
|
+
if params.get("Message") is not None:
|
|
34551
|
+
self._Message = SSEClientMessage()
|
|
34552
|
+
self._Message._deserialize(params.get("Message"))
|
|
34553
|
+
self._MsgID = params.get("MsgID")
|
|
34554
|
+
memeber_set = set(params.keys())
|
|
34555
|
+
for name, value in vars(self).items():
|
|
34556
|
+
property_name = name[1:]
|
|
34557
|
+
if property_name in memeber_set:
|
|
34558
|
+
memeber_set.remove(property_name)
|
|
34559
|
+
if len(memeber_set) > 0:
|
|
34560
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
34561
|
+
|
|
34562
|
+
|
|
34563
|
+
|
|
34564
|
+
class GenerateLLMSecAnswerResponse(AbstractModel):
|
|
34565
|
+
r"""GenerateLLMSecAnswer返回参数结构体
|
|
34566
|
+
|
|
34567
|
+
"""
|
|
34568
|
+
|
|
34569
|
+
def __init__(self):
|
|
34570
|
+
r"""
|
|
34571
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
|
34572
|
+
:type RequestId: str
|
|
34573
|
+
"""
|
|
34574
|
+
self._RequestId = None
|
|
34575
|
+
|
|
34576
|
+
@property
|
|
34577
|
+
def RequestId(self):
|
|
34578
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
|
34579
|
+
:rtype: str
|
|
34580
|
+
"""
|
|
34581
|
+
return self._RequestId
|
|
34582
|
+
|
|
34583
|
+
@RequestId.setter
|
|
34584
|
+
def RequestId(self, RequestId):
|
|
34585
|
+
self._RequestId = RequestId
|
|
34586
|
+
|
|
34587
|
+
|
|
34588
|
+
def _deserialize(self, params):
|
|
34589
|
+
self._RequestId = params.get("RequestId")
|
|
34590
|
+
|
|
34591
|
+
|
|
34496
34592
|
class GetAttackDownloadRecordsRequest(AbstractModel):
|
|
34497
34593
|
r"""GetAttackDownloadRecords请求参数结构体
|
|
34498
34594
|
|
|
@@ -36586,6 +36682,57 @@ class HybridPkg(AbstractModel):
|
|
|
36586
36682
|
|
|
36587
36683
|
|
|
36588
36684
|
|
|
36685
|
+
class ImageResult(AbstractModel):
|
|
36686
|
+
r"""llm要检测的图片的检测结果
|
|
36687
|
+
|
|
36688
|
+
"""
|
|
36689
|
+
|
|
36690
|
+
def __init__(self):
|
|
36691
|
+
r"""
|
|
36692
|
+
:param _Category: <p>命中类别标识</p>
|
|
36693
|
+
:type Category: str
|
|
36694
|
+
:param _CategoryName: <p>类别的名称</p>
|
|
36695
|
+
:type CategoryName: str
|
|
36696
|
+
"""
|
|
36697
|
+
self._Category = None
|
|
36698
|
+
self._CategoryName = None
|
|
36699
|
+
|
|
36700
|
+
@property
|
|
36701
|
+
def Category(self):
|
|
36702
|
+
r"""<p>命中类别标识</p>
|
|
36703
|
+
:rtype: str
|
|
36704
|
+
"""
|
|
36705
|
+
return self._Category
|
|
36706
|
+
|
|
36707
|
+
@Category.setter
|
|
36708
|
+
def Category(self, Category):
|
|
36709
|
+
self._Category = Category
|
|
36710
|
+
|
|
36711
|
+
@property
|
|
36712
|
+
def CategoryName(self):
|
|
36713
|
+
r"""<p>类别的名称</p>
|
|
36714
|
+
:rtype: str
|
|
36715
|
+
"""
|
|
36716
|
+
return self._CategoryName
|
|
36717
|
+
|
|
36718
|
+
@CategoryName.setter
|
|
36719
|
+
def CategoryName(self, CategoryName):
|
|
36720
|
+
self._CategoryName = CategoryName
|
|
36721
|
+
|
|
36722
|
+
|
|
36723
|
+
def _deserialize(self, params):
|
|
36724
|
+
self._Category = params.get("Category")
|
|
36725
|
+
self._CategoryName = params.get("CategoryName")
|
|
36726
|
+
memeber_set = set(params.keys())
|
|
36727
|
+
for name, value in vars(self).items():
|
|
36728
|
+
property_name = name[1:]
|
|
36729
|
+
if property_name in memeber_set:
|
|
36730
|
+
memeber_set.remove(property_name)
|
|
36731
|
+
if len(memeber_set) > 0:
|
|
36732
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
36733
|
+
|
|
36734
|
+
|
|
36735
|
+
|
|
36589
36736
|
class ImportIpAccessControlRequest(AbstractModel):
|
|
36590
36737
|
r"""ImportIpAccessControl请求参数结构体
|
|
36591
36738
|
|
|
@@ -39166,6 +39313,8 @@ class LLMDetectResult(AbstractModel):
|
|
|
39166
39313
|
:type Action: str
|
|
39167
39314
|
:param _Payload: <p>攻击payload</p>
|
|
39168
39315
|
:type Payload: str
|
|
39316
|
+
:param _ImageResult: <p>图片检测结果</p>
|
|
39317
|
+
:type ImageResult: list of ImageResult
|
|
39169
39318
|
"""
|
|
39170
39319
|
self._SensitiveResult = None
|
|
39171
39320
|
self._KeyWordsResult = None
|
|
@@ -39175,6 +39324,7 @@ class LLMDetectResult(AbstractModel):
|
|
|
39175
39324
|
self._RuleName = None
|
|
39176
39325
|
self._Action = None
|
|
39177
39326
|
self._Payload = None
|
|
39327
|
+
self._ImageResult = None
|
|
39178
39328
|
|
|
39179
39329
|
@property
|
|
39180
39330
|
def SensitiveResult(self):
|
|
@@ -39264,6 +39414,17 @@ class LLMDetectResult(AbstractModel):
|
|
|
39264
39414
|
def Payload(self, Payload):
|
|
39265
39415
|
self._Payload = Payload
|
|
39266
39416
|
|
|
39417
|
+
@property
|
|
39418
|
+
def ImageResult(self):
|
|
39419
|
+
r"""<p>图片检测结果</p>
|
|
39420
|
+
:rtype: list of ImageResult
|
|
39421
|
+
"""
|
|
39422
|
+
return self._ImageResult
|
|
39423
|
+
|
|
39424
|
+
@ImageResult.setter
|
|
39425
|
+
def ImageResult(self, ImageResult):
|
|
39426
|
+
self._ImageResult = ImageResult
|
|
39427
|
+
|
|
39267
39428
|
|
|
39268
39429
|
def _deserialize(self, params):
|
|
39269
39430
|
if params.get("SensitiveResult") is not None:
|
|
@@ -39286,6 +39447,12 @@ class LLMDetectResult(AbstractModel):
|
|
|
39286
39447
|
self._RuleName = params.get("RuleName")
|
|
39287
39448
|
self._Action = params.get("Action")
|
|
39288
39449
|
self._Payload = params.get("Payload")
|
|
39450
|
+
if params.get("ImageResult") is not None:
|
|
39451
|
+
self._ImageResult = []
|
|
39452
|
+
for item in params.get("ImageResult"):
|
|
39453
|
+
obj = ImageResult()
|
|
39454
|
+
obj._deserialize(item)
|
|
39455
|
+
self._ImageResult.append(obj)
|
|
39289
39456
|
memeber_set = set(params.keys())
|
|
39290
39457
|
for name, value in vars(self).items():
|
|
39291
39458
|
property_name = name[1:]
|
|
@@ -54061,6 +54228,72 @@ class RuleType(AbstractModel):
|
|
|
54061
54228
|
|
|
54062
54229
|
|
|
54063
54230
|
|
|
54231
|
+
class SSEClientMessage(AbstractModel):
|
|
54232
|
+
r"""对话消息结构体
|
|
54233
|
+
|
|
54234
|
+
"""
|
|
54235
|
+
|
|
54236
|
+
def __init__(self):
|
|
54237
|
+
r"""
|
|
54238
|
+
:param _Role: <p>对话角色,填user</p>
|
|
54239
|
+
:type Role: str
|
|
54240
|
+
:param _Content: <p>prompt内容</p>
|
|
54241
|
+
:type Content: str
|
|
54242
|
+
:param _ContentType: <p>检测类型,0是文本内容代答,目前只支持0,可以不传,默认值是0</p><p>枚举值:</p><ul><li>0: 文件内容代答</li></ul>
|
|
54243
|
+
:type ContentType: int
|
|
54244
|
+
"""
|
|
54245
|
+
self._Role = None
|
|
54246
|
+
self._Content = None
|
|
54247
|
+
self._ContentType = None
|
|
54248
|
+
|
|
54249
|
+
@property
|
|
54250
|
+
def Role(self):
|
|
54251
|
+
r"""<p>对话角色,填user</p>
|
|
54252
|
+
:rtype: str
|
|
54253
|
+
"""
|
|
54254
|
+
return self._Role
|
|
54255
|
+
|
|
54256
|
+
@Role.setter
|
|
54257
|
+
def Role(self, Role):
|
|
54258
|
+
self._Role = Role
|
|
54259
|
+
|
|
54260
|
+
@property
|
|
54261
|
+
def Content(self):
|
|
54262
|
+
r"""<p>prompt内容</p>
|
|
54263
|
+
:rtype: str
|
|
54264
|
+
"""
|
|
54265
|
+
return self._Content
|
|
54266
|
+
|
|
54267
|
+
@Content.setter
|
|
54268
|
+
def Content(self, Content):
|
|
54269
|
+
self._Content = Content
|
|
54270
|
+
|
|
54271
|
+
@property
|
|
54272
|
+
def ContentType(self):
|
|
54273
|
+
r"""<p>检测类型,0是文本内容代答,目前只支持0,可以不传,默认值是0</p><p>枚举值:</p><ul><li>0: 文件内容代答</li></ul>
|
|
54274
|
+
:rtype: int
|
|
54275
|
+
"""
|
|
54276
|
+
return self._ContentType
|
|
54277
|
+
|
|
54278
|
+
@ContentType.setter
|
|
54279
|
+
def ContentType(self, ContentType):
|
|
54280
|
+
self._ContentType = ContentType
|
|
54281
|
+
|
|
54282
|
+
|
|
54283
|
+
def _deserialize(self, params):
|
|
54284
|
+
self._Role = params.get("Role")
|
|
54285
|
+
self._Content = params.get("Content")
|
|
54286
|
+
self._ContentType = params.get("ContentType")
|
|
54287
|
+
memeber_set = set(params.keys())
|
|
54288
|
+
for name, value in vars(self).items():
|
|
54289
|
+
property_name = name[1:]
|
|
54290
|
+
if property_name in memeber_set:
|
|
54291
|
+
memeber_set.remove(property_name)
|
|
54292
|
+
if len(memeber_set) > 0:
|
|
54293
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
54294
|
+
|
|
54295
|
+
|
|
54296
|
+
|
|
54064
54297
|
class ScanIpInfo(AbstractModel):
|
|
54065
54298
|
r"""扫描ip信息
|
|
54066
54299
|
|
|
@@ -3156,6 +3156,24 @@ class WafClient(AbstractClient):
|
|
|
3156
3156
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
3157
3157
|
|
|
3158
3158
|
|
|
3159
|
+
def GenerateLLMSecAnswer(self, request):
|
|
3160
|
+
r"""大模型安全代答生成接口。当用户输入命中内容安全风险检测规则时,调用本接口由大模型实时生成安全合规的替代回答。
|
|
3161
|
+
|
|
3162
|
+
:param request: Request instance for GenerateLLMSecAnswer.
|
|
3163
|
+
:type request: :class:`tencentcloud.waf.v20180125.models.GenerateLLMSecAnswerRequest`
|
|
3164
|
+
:rtype: :class:`tencentcloud.waf.v20180125.models.GenerateLLMSecAnswerResponse`
|
|
3165
|
+
|
|
3166
|
+
"""
|
|
3167
|
+
try:
|
|
3168
|
+
params = request._serialize()
|
|
3169
|
+
return self._call_and_deserialize("GenerateLLMSecAnswer", params, models.GenerateLLMSecAnswerResponse, headers=request.headers)
|
|
3170
|
+
except Exception as e:
|
|
3171
|
+
if isinstance(e, TencentCloudSDKException):
|
|
3172
|
+
raise
|
|
3173
|
+
else:
|
|
3174
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
3175
|
+
|
|
3176
|
+
|
|
3159
3177
|
def GetAttackDownloadRecords(self, request):
|
|
3160
3178
|
r"""查询下载攻击日志任务记录列表
|
|
3161
3179
|
|
|
@@ -2475,6 +2475,24 @@ class WafClient(AbstractClient):
|
|
|
2475
2475
|
|
|
2476
2476
|
return await self.call_and_deserialize(**kwargs)
|
|
2477
2477
|
|
|
2478
|
+
async def GenerateLLMSecAnswer(
|
|
2479
|
+
self,
|
|
2480
|
+
request: models.GenerateLLMSecAnswerRequest,
|
|
2481
|
+
opts: Dict = None,
|
|
2482
|
+
) -> models.GenerateLLMSecAnswerResponse:
|
|
2483
|
+
"""
|
|
2484
|
+
大模型安全代答生成接口。当用户输入命中内容安全风险检测规则时,调用本接口由大模型实时生成安全合规的替代回答。
|
|
2485
|
+
"""
|
|
2486
|
+
|
|
2487
|
+
kwargs = {}
|
|
2488
|
+
kwargs["action"] = "GenerateLLMSecAnswer"
|
|
2489
|
+
kwargs["params"] = request._serialize()
|
|
2490
|
+
kwargs["resp_cls"] = models.GenerateLLMSecAnswerResponse
|
|
2491
|
+
kwargs["headers"] = request.headers
|
|
2492
|
+
kwargs["opts"] = opts or {}
|
|
2493
|
+
|
|
2494
|
+
return await self.call_and_deserialize(**kwargs)
|
|
2495
|
+
|
|
2478
2496
|
async def GetAttackDownloadRecords(
|
|
2479
2497
|
self,
|
|
2480
2498
|
request: models.GetAttackDownloadRecordsRequest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-waf
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.88
|
|
4
4
|
Summary: Tencent Cloud Waf SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.88
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.1.88
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.1.84
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|