tencentcloud-sdk-python-tokenhub 3.1.214__tar.gz → 3.1.218__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.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/setup.py +1 -1
  3. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/v20260322/models.py +280 -0
  5. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/v20260322/tokenhub_client.py +26 -1
  6. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/v20260322/tokenhub_client_async.py +21 -1
  7. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud_sdk_python_tokenhub.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_tokenhub-3.1.218/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_tokenhub-3.1.214/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/README.rst +0 -0
  11. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/__init__.py +0 -0
  13. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/v20260322/__init__.py +0 -0
  14. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud/tokenhub/v20260322/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud_sdk_python_tokenhub.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud_sdk_python_tokenhub.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_tokenhub-3.1.214 → tencentcloud_sdk_python_tokenhub-3.1.218}/tencentcloud_sdk_python_tokenhub.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-tokenhub
3
- Version: 3.1.214
3
+ Version: 3.1.218
4
4
  Summary: Tencent Cloud Tokenhub 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.214
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.218
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-tokenhub',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.214,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.218,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Tokenhub SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.214'
17
+ __version__ = '3.1.218'
@@ -692,6 +692,8 @@ class CreateEndpointRequest(AbstractModel):
692
692
  :type EndpointName: str
693
693
  :param _ModelId: <p>模型 ID。可通过 DescribeModelList 接口获取。</p>
694
694
  :type ModelId: str
695
+ :param _ServiceType: <p>服务类型。取值:TEXT_GENERATION(文本生成)、IMAGE_GENERATION(图片生成)、VIDEO_GENERATION(视频生成)。</p>
696
+ :type ServiceType: str
695
697
  :param _ChargeType: <p>计费方式。取值:FREE(免费体验)、TOKEN(按 Token 计费)、TPM(TPM 保障)、COMPUTE_UNIT(按算力单元计费)。</p>
696
698
  :type ChargeType: str
697
699
  :param _RPM: <p>RPM(每分钟请求数)限流上限。可选。必须大于 0,且不能超过用户在该模型上的 RPM 上限。不传则使用默认值(60)。</p>
@@ -705,6 +707,7 @@ class CreateEndpointRequest(AbstractModel):
705
707
  """
706
708
  self._EndpointName = None
707
709
  self._ModelId = None
710
+ self._ServiceType = None
708
711
  self._ChargeType = None
709
712
  self._RPM = None
710
713
  self._TPM = None
@@ -733,6 +736,17 @@ class CreateEndpointRequest(AbstractModel):
733
736
  def ModelId(self, ModelId):
734
737
  self._ModelId = ModelId
735
738
 
739
+ @property
740
+ def ServiceType(self):
741
+ r"""<p>服务类型。取值:TEXT_GENERATION(文本生成)、IMAGE_GENERATION(图片生成)、VIDEO_GENERATION(视频生成)。</p>
742
+ :rtype: str
743
+ """
744
+ return self._ServiceType
745
+
746
+ @ServiceType.setter
747
+ def ServiceType(self, ServiceType):
748
+ self._ServiceType = ServiceType
749
+
736
750
  @property
737
751
  def ChargeType(self):
738
752
  r"""<p>计费方式。取值:FREE(免费体验)、TOKEN(按 Token 计费)、TPM(TPM 保障)、COMPUTE_UNIT(按算力单元计费)。</p>
@@ -792,6 +806,7 @@ class CreateEndpointRequest(AbstractModel):
792
806
  def _deserialize(self, params):
793
807
  self._EndpointName = params.get("EndpointName")
794
808
  self._ModelId = params.get("ModelId")
809
+ self._ServiceType = params.get("ServiceType")
795
810
  self._ChargeType = params.get("ChargeType")
796
811
  self._RPM = params.get("RPM")
797
812
  self._TPM = params.get("TPM")
@@ -2846,6 +2861,190 @@ class DescribeGlossaryEntriesResponse(AbstractModel):
2846
2861
  self._RequestId = params.get("RequestId")
2847
2862
 
2848
2863
 
2864
+ class DescribeModelCapabilityListRequest(AbstractModel):
2865
+ r"""DescribeModelCapabilityList请求参数结构体
2866
+
2867
+ """
2868
+
2869
+ def __init__(self):
2870
+ r"""
2871
+ :param _Source: <p>API 来源。取值:Model(模型广场)、ApiKey(推理服务)。默认值为 Model。</p>
2872
+ :type Source: str
2873
+ :param _ModelId: <p>模型 ID,不传则查询所有能力,传入则查询指定模型的能力。可通过 DescribeModelList 接口获取。</p>
2874
+ :type ModelId: str
2875
+ :param _Limit: <p>返回数量,默认为 20,最大值为 100。</p>
2876
+ :type Limit: int
2877
+ :param _Offset: <p>偏移量,默认为 0。</p>
2878
+ :type Offset: int
2879
+ :param _Filters: <p>过滤条件列表。支持的过滤字段:CapabilityName。</p>
2880
+ :type Filters: list of RequestFilter
2881
+ :param _Sorts: <p>排序条件列表。</p>
2882
+ :type Sorts: list of RequestSort
2883
+ """
2884
+ self._Source = None
2885
+ self._ModelId = None
2886
+ self._Limit = None
2887
+ self._Offset = None
2888
+ self._Filters = None
2889
+ self._Sorts = None
2890
+
2891
+ @property
2892
+ def Source(self):
2893
+ r"""<p>API 来源。取值:Model(模型广场)、ApiKey(推理服务)。默认值为 Model。</p>
2894
+ :rtype: str
2895
+ """
2896
+ return self._Source
2897
+
2898
+ @Source.setter
2899
+ def Source(self, Source):
2900
+ self._Source = Source
2901
+
2902
+ @property
2903
+ def ModelId(self):
2904
+ r"""<p>模型 ID,不传则查询所有能力,传入则查询指定模型的能力。可通过 DescribeModelList 接口获取。</p>
2905
+ :rtype: str
2906
+ """
2907
+ return self._ModelId
2908
+
2909
+ @ModelId.setter
2910
+ def ModelId(self, ModelId):
2911
+ self._ModelId = ModelId
2912
+
2913
+ @property
2914
+ def Limit(self):
2915
+ r"""<p>返回数量,默认为 20,最大值为 100。</p>
2916
+ :rtype: int
2917
+ """
2918
+ return self._Limit
2919
+
2920
+ @Limit.setter
2921
+ def Limit(self, Limit):
2922
+ self._Limit = Limit
2923
+
2924
+ @property
2925
+ def Offset(self):
2926
+ r"""<p>偏移量,默认为 0。</p>
2927
+ :rtype: int
2928
+ """
2929
+ return self._Offset
2930
+
2931
+ @Offset.setter
2932
+ def Offset(self, Offset):
2933
+ self._Offset = Offset
2934
+
2935
+ @property
2936
+ def Filters(self):
2937
+ r"""<p>过滤条件列表。支持的过滤字段:CapabilityName。</p>
2938
+ :rtype: list of RequestFilter
2939
+ """
2940
+ return self._Filters
2941
+
2942
+ @Filters.setter
2943
+ def Filters(self, Filters):
2944
+ self._Filters = Filters
2945
+
2946
+ @property
2947
+ def Sorts(self):
2948
+ r"""<p>排序条件列表。</p>
2949
+ :rtype: list of RequestSort
2950
+ """
2951
+ return self._Sorts
2952
+
2953
+ @Sorts.setter
2954
+ def Sorts(self, Sorts):
2955
+ self._Sorts = Sorts
2956
+
2957
+
2958
+ def _deserialize(self, params):
2959
+ self._Source = params.get("Source")
2960
+ self._ModelId = params.get("ModelId")
2961
+ self._Limit = params.get("Limit")
2962
+ self._Offset = params.get("Offset")
2963
+ if params.get("Filters") is not None:
2964
+ self._Filters = []
2965
+ for item in params.get("Filters"):
2966
+ obj = RequestFilter()
2967
+ obj._deserialize(item)
2968
+ self._Filters.append(obj)
2969
+ if params.get("Sorts") is not None:
2970
+ self._Sorts = []
2971
+ for item in params.get("Sorts"):
2972
+ obj = RequestSort()
2973
+ obj._deserialize(item)
2974
+ self._Sorts.append(obj)
2975
+ memeber_set = set(params.keys())
2976
+ for name, value in vars(self).items():
2977
+ property_name = name[1:]
2978
+ if property_name in memeber_set:
2979
+ memeber_set.remove(property_name)
2980
+ if len(memeber_set) > 0:
2981
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
2982
+
2983
+
2984
+
2985
+ class DescribeModelCapabilityListResponse(AbstractModel):
2986
+ r"""DescribeModelCapabilityList返回参数结构体
2987
+
2988
+ """
2989
+
2990
+ def __init__(self):
2991
+ r"""
2992
+ :param _CapabilitySet: <p>能力列表。</p>
2993
+ :type CapabilitySet: list of ModelCapability
2994
+ :param _TotalCount: <p>符合条件的能力总数。</p>
2995
+ :type TotalCount: int
2996
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
2997
+ :type RequestId: str
2998
+ """
2999
+ self._CapabilitySet = None
3000
+ self._TotalCount = None
3001
+ self._RequestId = None
3002
+
3003
+ @property
3004
+ def CapabilitySet(self):
3005
+ r"""<p>能力列表。</p>
3006
+ :rtype: list of ModelCapability
3007
+ """
3008
+ return self._CapabilitySet
3009
+
3010
+ @CapabilitySet.setter
3011
+ def CapabilitySet(self, CapabilitySet):
3012
+ self._CapabilitySet = CapabilitySet
3013
+
3014
+ @property
3015
+ def TotalCount(self):
3016
+ r"""<p>符合条件的能力总数。</p>
3017
+ :rtype: int
3018
+ """
3019
+ return self._TotalCount
3020
+
3021
+ @TotalCount.setter
3022
+ def TotalCount(self, TotalCount):
3023
+ self._TotalCount = TotalCount
3024
+
3025
+ @property
3026
+ def RequestId(self):
3027
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3028
+ :rtype: str
3029
+ """
3030
+ return self._RequestId
3031
+
3032
+ @RequestId.setter
3033
+ def RequestId(self, RequestId):
3034
+ self._RequestId = RequestId
3035
+
3036
+
3037
+ def _deserialize(self, params):
3038
+ if params.get("CapabilitySet") is not None:
3039
+ self._CapabilitySet = []
3040
+ for item in params.get("CapabilitySet"):
3041
+ obj = ModelCapability()
3042
+ obj._deserialize(item)
3043
+ self._CapabilitySet.append(obj)
3044
+ self._TotalCount = params.get("TotalCount")
3045
+ self._RequestId = params.get("RequestId")
3046
+
3047
+
2849
3048
  class DescribeModelEndpointListRequest(AbstractModel):
2850
3049
  r"""DescribeModelEndpointList请求参数结构体
2851
3050
 
@@ -6142,6 +6341,87 @@ class ModelAccessInfo(AbstractModel):
6142
6341
 
6143
6342
 
6144
6343
 
6344
+ class ModelCapability(AbstractModel):
6345
+ r"""模型能力信息
6346
+
6347
+ """
6348
+
6349
+ def __init__(self):
6350
+ r"""
6351
+ :param _CapabilityName: <p>能力标识。</p><p>枚举值:</p><ul><li>DeepThink: 深度思考</li><li>StructOutput: 结构化输出</li><li>WebSearch: 联网搜索</li><li>FunctionCall: Function Calling</li><li>InputText: 文本输入</li><li>InputImage: 图片输入</li><li>InputVideo: 视频输入</li><li>InputAudio: 音频输入</li><li>Input3DModelFile: 3D模型文件输入</li><li>InputFile: 文件输入</li><li>OutputText: 文本输出</li><li>OutputImage: 图片输出</li><li>OutputVideo: 视频输出</li><li>OutputAudio: 音频输出</li><li>Output3DModelFile: 3D模型文件输出</li><li>CompletionsAPI: Completions API</li><li>AnthropicAPI: Anthropic API</li><li>ResponsesAPI: Response API</li></ul>
6352
+ :type CapabilityName: str
6353
+ :param _CapabilityValue: <p>能力值。</p><p>枚举值:</p><ul><li>true: 支持</li></ul>
6354
+ :type CapabilityValue: str
6355
+ :param _DisplayName: <p>能力显示名称。</p>
6356
+ :type DisplayName: str
6357
+ :param _Description: <p>能力描述。</p>
6358
+ :type Description: str
6359
+ """
6360
+ self._CapabilityName = None
6361
+ self._CapabilityValue = None
6362
+ self._DisplayName = None
6363
+ self._Description = None
6364
+
6365
+ @property
6366
+ def CapabilityName(self):
6367
+ r"""<p>能力标识。</p><p>枚举值:</p><ul><li>DeepThink: 深度思考</li><li>StructOutput: 结构化输出</li><li>WebSearch: 联网搜索</li><li>FunctionCall: Function Calling</li><li>InputText: 文本输入</li><li>InputImage: 图片输入</li><li>InputVideo: 视频输入</li><li>InputAudio: 音频输入</li><li>Input3DModelFile: 3D模型文件输入</li><li>InputFile: 文件输入</li><li>OutputText: 文本输出</li><li>OutputImage: 图片输出</li><li>OutputVideo: 视频输出</li><li>OutputAudio: 音频输出</li><li>Output3DModelFile: 3D模型文件输出</li><li>CompletionsAPI: Completions API</li><li>AnthropicAPI: Anthropic API</li><li>ResponsesAPI: Response API</li></ul>
6368
+ :rtype: str
6369
+ """
6370
+ return self._CapabilityName
6371
+
6372
+ @CapabilityName.setter
6373
+ def CapabilityName(self, CapabilityName):
6374
+ self._CapabilityName = CapabilityName
6375
+
6376
+ @property
6377
+ def CapabilityValue(self):
6378
+ r"""<p>能力值。</p><p>枚举值:</p><ul><li>true: 支持</li></ul>
6379
+ :rtype: str
6380
+ """
6381
+ return self._CapabilityValue
6382
+
6383
+ @CapabilityValue.setter
6384
+ def CapabilityValue(self, CapabilityValue):
6385
+ self._CapabilityValue = CapabilityValue
6386
+
6387
+ @property
6388
+ def DisplayName(self):
6389
+ r"""<p>能力显示名称。</p>
6390
+ :rtype: str
6391
+ """
6392
+ return self._DisplayName
6393
+
6394
+ @DisplayName.setter
6395
+ def DisplayName(self, DisplayName):
6396
+ self._DisplayName = DisplayName
6397
+
6398
+ @property
6399
+ def Description(self):
6400
+ r"""<p>能力描述。</p>
6401
+ :rtype: str
6402
+ """
6403
+ return self._Description
6404
+
6405
+ @Description.setter
6406
+ def Description(self, Description):
6407
+ self._Description = Description
6408
+
6409
+
6410
+ def _deserialize(self, params):
6411
+ self._CapabilityName = params.get("CapabilityName")
6412
+ self._CapabilityValue = params.get("CapabilityValue")
6413
+ self._DisplayName = params.get("DisplayName")
6414
+ self._Description = params.get("Description")
6415
+ memeber_set = set(params.keys())
6416
+ for name, value in vars(self).items():
6417
+ property_name = name[1:]
6418
+ if property_name in memeber_set:
6419
+ memeber_set.remove(property_name)
6420
+ if len(memeber_set) > 0:
6421
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
6422
+
6423
+
6424
+
6145
6425
  class ModelChargingInfo(AbstractModel):
6146
6426
  r"""模型计费信息
6147
6427
 
@@ -421,6 +421,31 @@ class TokenhubClient(AbstractClient):
421
421
  raise TencentCloudSDKException(type(e).__name__, str(e))
422
422
 
423
423
 
424
+ def DescribeModelCapabilityList(self, request):
425
+ r"""查询模型能力列表。
426
+
427
+ 支持查询所有能力或指定模型的能力列表,支持分页。
428
+
429
+ :param request: Request instance for DescribeModelCapabilityList.
430
+ :type request: :class:`tencentcloud.tokenhub.v20260322.models.DescribeModelCapabilityListRequest`
431
+ :rtype: :class:`tencentcloud.tokenhub.v20260322.models.DescribeModelCapabilityListResponse`
432
+
433
+ """
434
+ try:
435
+ params = request._serialize()
436
+ headers = request.headers
437
+ body = self.call("DescribeModelCapabilityList", params, headers=headers)
438
+ response = json.loads(body)
439
+ model = models.DescribeModelCapabilityListResponse()
440
+ model._deserialize(response["Response"])
441
+ return model
442
+ except Exception as e:
443
+ if isinstance(e, TencentCloudSDKException):
444
+ raise
445
+ else:
446
+ raise TencentCloudSDKException(type(e).__name__, str(e))
447
+
448
+
424
449
  def DescribeModelEndpointList(self, request):
425
450
  r"""查询模型接入点列表。
426
451
 
@@ -449,7 +474,7 @@ class TokenhubClient(AbstractClient):
449
474
  def DescribeModelList(self, request):
450
475
  r"""查询模型列表。
451
476
 
452
- 支持按模型 ID、模型名称、模型能力等条件筛选,支持分页和排序。
477
+ 支持按模型 ID、模型名称等条件筛选,支持分页和排序。
453
478
 
454
479
  :param request: Request instance for DescribeModelList.
455
480
  :type request: :class:`tencentcloud.tokenhub.v20260322.models.DescribeModelListRequest`
@@ -340,6 +340,26 @@ class TokenhubClient(AbstractClient):
340
340
 
341
341
  return await self.call_and_deserialize(**kwargs)
342
342
 
343
+ async def DescribeModelCapabilityList(
344
+ self,
345
+ request: models.DescribeModelCapabilityListRequest,
346
+ opts: Dict = None,
347
+ ) -> models.DescribeModelCapabilityListResponse:
348
+ """
349
+ 查询模型能力列表。
350
+
351
+ 支持查询所有能力或指定模型的能力列表,支持分页。
352
+ """
353
+
354
+ kwargs = {}
355
+ kwargs["action"] = "DescribeModelCapabilityList"
356
+ kwargs["params"] = request._serialize()
357
+ kwargs["resp_cls"] = models.DescribeModelCapabilityListResponse
358
+ kwargs["headers"] = request.headers
359
+ kwargs["opts"] = opts or {}
360
+
361
+ return await self.call_and_deserialize(**kwargs)
362
+
343
363
  async def DescribeModelEndpointList(
344
364
  self,
345
365
  request: models.DescribeModelEndpointListRequest,
@@ -368,7 +388,7 @@ class TokenhubClient(AbstractClient):
368
388
  """
369
389
  查询模型列表。
370
390
 
371
- 支持按模型 ID、模型名称、模型能力等条件筛选,支持分页和排序。
391
+ 支持按模型 ID、模型名称等条件筛选,支持分页和排序。
372
392
  """
373
393
 
374
394
  kwargs = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-tokenhub
3
- Version: 3.1.214
3
+ Version: 3.1.218
4
4
  Summary: Tencent Cloud Tokenhub 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.214
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.218
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.218
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.214