第一次提交:阿龙电竞 Django 后端最新版本

This commit is contained in:
XingQue
2026-06-14 02:23:24 +08:00
commit 4f7bf00224
9654 changed files with 5417000 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.cii.v20201210 import models
class CiiClient(AbstractClient):
_apiVersion = '2020-12-10'
_endpoint = 'cii.tencentcloudapi.com'
_service = 'cii'
def CreateStructureTask(self, request):
r"""基于提供的客户及保单信息,启动结构化识别任务。
:param request: Request instance for CreateStructureTask.
:type request: :class:`tencentcloud.cii.v20201210.models.CreateStructureTaskRequest`
:rtype: :class:`tencentcloud.cii.v20201210.models.CreateStructureTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateStructureTask", params, headers=headers)
response = json.loads(body)
model = models.CreateStructureTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeStructCompareData(self, request):
r"""结构化对比查询接口,对比结构化复核前后数据差异,查询识别正确率,召回率。
:param request: Request instance for DescribeStructCompareData.
:type request: :class:`tencentcloud.cii.v20201210.models.DescribeStructCompareDataRequest`
:rtype: :class:`tencentcloud.cii.v20201210.models.DescribeStructCompareDataResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeStructCompareData", params, headers=headers)
response = json.loads(body)
model = models.DescribeStructCompareDataResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeStructureTaskResult(self, request):
r"""依据任务ID获取结构化结果接口。
:param request: Request instance for DescribeStructureTaskResult.
:type request: :class:`tencentcloud.cii.v20201210.models.DescribeStructureTaskResultRequest`
:rtype: :class:`tencentcloud.cii.v20201210.models.DescribeStructureTaskResultResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeStructureTaskResult", params, headers=headers)
response = json.loads(body)
model = models.DescribeStructureTaskResultResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))

View File

@@ -0,0 +1,80 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from tencentcloud.common.abstract_client_async import AbstractClient
from tencentcloud.cii.v20201210 import models
from typing import Dict
class CiiClient(AbstractClient):
_apiVersion = '2020-12-10'
_endpoint = 'cii.tencentcloudapi.com'
_service = 'cii'
async def CreateStructureTask(
self,
request: models.CreateStructureTaskRequest,
opts: Dict = None,
) -> models.CreateStructureTaskResponse:
"""
基于提供的客户及保单信息,启动结构化识别任务。
"""
kwargs = {}
kwargs["action"] = "CreateStructureTask"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.CreateStructureTaskResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeStructCompareData(
self,
request: models.DescribeStructCompareDataRequest,
opts: Dict = None,
) -> models.DescribeStructCompareDataResponse:
"""
结构化对比查询接口,对比结构化复核前后数据差异,查询识别正确率,召回率。
"""
kwargs = {}
kwargs["action"] = "DescribeStructCompareData"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeStructCompareDataResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeStructureTaskResult(
self,
request: models.DescribeStructureTaskResultRequest,
opts: Dict = None,
) -> models.DescribeStructureTaskResultResponse:
"""
依据任务ID获取结构化结果接口。
"""
kwargs = {}
kwargs["action"] = "DescribeStructureTaskResult"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeStructureTaskResultResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)

View File

@@ -0,0 +1,36 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# CAM签名/鉴权错误。
AUTHFAILURE = 'AuthFailure'
# 操作失败。
FAILEDOPERATION = 'FailedOperation'
# 内部错误。
INTERNALERROR = 'InternalError'
# 参数错误。
INVALIDPARAMETER = 'InvalidParameter'
# 参数取值错误。
INVALIDPARAMETERVALUE = 'InvalidParameterValue'
# 超过配额限制。
LIMITEXCEEDED = 'LimitExceeded'
# 缺少参数错误。
MISSINGPARAMETER = 'MissingParameter'

View File

@@ -0,0 +1,693 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import warnings
from tencentcloud.common.abstract_model import AbstractModel
class CompareMetricsData(AbstractModel):
r"""结构化对比指标(准确率/召回率)数据
"""
def __init__(self):
r"""
:param _ShortStructAccuracy: 短文准确率
:type ShortStructAccuracy: str
:param _ShortStructRecall: 短文召回率
:type ShortStructRecall: str
:param _LongStructAccuracy: 长文结构化准确率
:type LongStructAccuracy: str
:param _LongStructRecall: 长文结构化召回率
:type LongStructRecall: str
:param _LongContentAccuracy: 长文提取准确率
:type LongContentAccuracy: str
:param _LongContentRecall: 长文提取召回率
:type LongContentRecall: str
"""
self._ShortStructAccuracy = None
self._ShortStructRecall = None
self._LongStructAccuracy = None
self._LongStructRecall = None
self._LongContentAccuracy = None
self._LongContentRecall = None
@property
def ShortStructAccuracy(self):
r"""短文准确率
:rtype: str
"""
return self._ShortStructAccuracy
@ShortStructAccuracy.setter
def ShortStructAccuracy(self, ShortStructAccuracy):
self._ShortStructAccuracy = ShortStructAccuracy
@property
def ShortStructRecall(self):
r"""短文召回率
:rtype: str
"""
return self._ShortStructRecall
@ShortStructRecall.setter
def ShortStructRecall(self, ShortStructRecall):
self._ShortStructRecall = ShortStructRecall
@property
def LongStructAccuracy(self):
r"""长文结构化准确率
:rtype: str
"""
return self._LongStructAccuracy
@LongStructAccuracy.setter
def LongStructAccuracy(self, LongStructAccuracy):
self._LongStructAccuracy = LongStructAccuracy
@property
def LongStructRecall(self):
r"""长文结构化召回率
:rtype: str
"""
return self._LongStructRecall
@LongStructRecall.setter
def LongStructRecall(self, LongStructRecall):
self._LongStructRecall = LongStructRecall
@property
def LongContentAccuracy(self):
r"""长文提取准确率
:rtype: str
"""
return self._LongContentAccuracy
@LongContentAccuracy.setter
def LongContentAccuracy(self, LongContentAccuracy):
self._LongContentAccuracy = LongContentAccuracy
@property
def LongContentRecall(self):
r"""长文提取召回率
:rtype: str
"""
return self._LongContentRecall
@LongContentRecall.setter
def LongContentRecall(self, LongContentRecall):
self._LongContentRecall = LongContentRecall
def _deserialize(self, params):
self._ShortStructAccuracy = params.get("ShortStructAccuracy")
self._ShortStructRecall = params.get("ShortStructRecall")
self._LongStructAccuracy = params.get("LongStructAccuracy")
self._LongStructRecall = params.get("LongStructRecall")
self._LongContentAccuracy = params.get("LongContentAccuracy")
self._LongContentRecall = params.get("LongContentRecall")
memeber_set = set(params.keys())
for name, value in vars(self).items():
property_name = name[1:]
if property_name in memeber_set:
memeber_set.remove(property_name)
if len(memeber_set) > 0:
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
class CreateStructureTaskRequest(AbstractModel):
r"""CreateStructureTask请求参数结构体
"""
def __init__(self):
r"""
:param _PolicyId: 保单号
:type PolicyId: str
:param _CustomerId: 客户号
:type CustomerId: str
:param _CustomerName: 客户姓名
:type CustomerName: str
:param _TaskType: 文件类型目前只支持体检报告类型对应的值为HealthReport
:type TaskType: str
:param _Year: 报告年份
:type Year: str
:param _FileList: 报告文件上传的地址列表需按顺序排列。如果使用ImageList参数置为空数组即可
:type FileList: list of str
:param _InsuranceTypes: 险种,如果是体检报告类型,此参数是必填,类型说明如下:
CriticalDiseaseInsurance:重疾险
LifeInsurance寿险
AccidentInsurance意外险
:type InsuranceTypes: list of str
:param _ImageList: 报告上传的图片内容数组图片内容采用base64编码需按顺序排列
:type ImageList: list of str
"""
self._PolicyId = None
self._CustomerId = None
self._CustomerName = None
self._TaskType = None
self._Year = None
self._FileList = None
self._InsuranceTypes = None
self._ImageList = None
@property
def PolicyId(self):
r"""保单号
:rtype: str
"""
return self._PolicyId
@PolicyId.setter
def PolicyId(self, PolicyId):
self._PolicyId = PolicyId
@property
def CustomerId(self):
r"""客户号
:rtype: str
"""
return self._CustomerId
@CustomerId.setter
def CustomerId(self, CustomerId):
self._CustomerId = CustomerId
@property
def CustomerName(self):
r"""客户姓名
:rtype: str
"""
return self._CustomerName
@CustomerName.setter
def CustomerName(self, CustomerName):
self._CustomerName = CustomerName
@property
def TaskType(self):
r"""文件类型目前只支持体检报告类型对应的值为HealthReport
:rtype: str
"""
return self._TaskType
@TaskType.setter
def TaskType(self, TaskType):
self._TaskType = TaskType
@property
def Year(self):
r"""报告年份
:rtype: str
"""
return self._Year
@Year.setter
def Year(self, Year):
self._Year = Year
@property
def FileList(self):
r"""报告文件上传的地址列表需按顺序排列。如果使用ImageList参数置为空数组即可
:rtype: list of str
"""
return self._FileList
@FileList.setter
def FileList(self, FileList):
self._FileList = FileList
@property
def InsuranceTypes(self):
r"""险种,如果是体检报告类型,此参数是必填,类型说明如下:
CriticalDiseaseInsurance:重疾险
LifeInsurance寿险
AccidentInsurance意外险
:rtype: list of str
"""
return self._InsuranceTypes
@InsuranceTypes.setter
def InsuranceTypes(self, InsuranceTypes):
self._InsuranceTypes = InsuranceTypes
@property
def ImageList(self):
r"""报告上传的图片内容数组图片内容采用base64编码需按顺序排列
:rtype: list of str
"""
return self._ImageList
@ImageList.setter
def ImageList(self, ImageList):
self._ImageList = ImageList
def _deserialize(self, params):
self._PolicyId = params.get("PolicyId")
self._CustomerId = params.get("CustomerId")
self._CustomerName = params.get("CustomerName")
self._TaskType = params.get("TaskType")
self._Year = params.get("Year")
self._FileList = params.get("FileList")
self._InsuranceTypes = params.get("InsuranceTypes")
self._ImageList = params.get("ImageList")
memeber_set = set(params.keys())
for name, value in vars(self).items():
property_name = name[1:]
if property_name in memeber_set:
memeber_set.remove(property_name)
if len(memeber_set) > 0:
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
class CreateStructureTaskResponse(AbstractModel):
r"""CreateStructureTask返回参数结构体
"""
def __init__(self):
r"""
:param _TaskId: 本次结构化任务的ID
:type TaskId: str
:param _RequestId: 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:type RequestId: str
"""
self._TaskId = None
self._RequestId = None
@property
def TaskId(self):
r"""本次结构化任务的ID
:rtype: str
"""
return self._TaskId
@TaskId.setter
def TaskId(self, TaskId):
self._TaskId = TaskId
@property
def RequestId(self):
r"""唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:rtype: str
"""
return self._RequestId
@RequestId.setter
def RequestId(self, RequestId):
self._RequestId = RequestId
def _deserialize(self, params):
self._TaskId = params.get("TaskId")
self._RequestId = params.get("RequestId")
class DescribeStructCompareDataRequest(AbstractModel):
r"""DescribeStructCompareData请求参数结构体
"""
def __init__(self):
r"""
:param _TaskId: 结构化任务ID
:type TaskId: str
"""
self._TaskId = None
@property
def TaskId(self):
r"""结构化任务ID
:rtype: str
"""
return self._TaskId
@TaskId.setter
def TaskId(self, TaskId):
self._TaskId = TaskId
def _deserialize(self, params):
self._TaskId = params.get("TaskId")
memeber_set = set(params.keys())
for name, value in vars(self).items():
property_name = name[1:]
if property_name in memeber_set:
memeber_set.remove(property_name)
if len(memeber_set) > 0:
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
class DescribeStructCompareDataResponse(AbstractModel):
r"""DescribeStructCompareData返回参数结构体
"""
def __init__(self):
r"""
:param _PolicyId: 保单号
:type PolicyId: str
:param _TaskId: 结构化任务ID
:type TaskId: str
:param _CustomerId: 客户号
:type CustomerId: str
:param _CustomerName: 客户姓名
:type CustomerName: str
:param _ReviewTime: 复核时间
:type ReviewTime: str
:param _MachineResult: 算法识别结果
:type MachineResult: str
:param _ManualResult: 人工复核结果
:type ManualResult: str
:param _Metrics: 结构化对比指标数据
:type Metrics: :class:`tencentcloud.cii.v20201210.models.CompareMetricsData`
:param _NewItems: 新增项
:type NewItems: str
:param _ModifyItems: 修改项
:type ModifyItems: str
:param _RequestId: 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:type RequestId: str
"""
self._PolicyId = None
self._TaskId = None
self._CustomerId = None
self._CustomerName = None
self._ReviewTime = None
self._MachineResult = None
self._ManualResult = None
self._Metrics = None
self._NewItems = None
self._ModifyItems = None
self._RequestId = None
@property
def PolicyId(self):
r"""保单号
:rtype: str
"""
return self._PolicyId
@PolicyId.setter
def PolicyId(self, PolicyId):
self._PolicyId = PolicyId
@property
def TaskId(self):
r"""结构化任务ID
:rtype: str
"""
return self._TaskId
@TaskId.setter
def TaskId(self, TaskId):
self._TaskId = TaskId
@property
def CustomerId(self):
r"""客户号
:rtype: str
"""
return self._CustomerId
@CustomerId.setter
def CustomerId(self, CustomerId):
self._CustomerId = CustomerId
@property
def CustomerName(self):
r"""客户姓名
:rtype: str
"""
return self._CustomerName
@CustomerName.setter
def CustomerName(self, CustomerName):
self._CustomerName = CustomerName
@property
def ReviewTime(self):
r"""复核时间
:rtype: str
"""
return self._ReviewTime
@ReviewTime.setter
def ReviewTime(self, ReviewTime):
self._ReviewTime = ReviewTime
@property
def MachineResult(self):
r"""算法识别结果
:rtype: str
"""
return self._MachineResult
@MachineResult.setter
def MachineResult(self, MachineResult):
self._MachineResult = MachineResult
@property
def ManualResult(self):
r"""人工复核结果
:rtype: str
"""
return self._ManualResult
@ManualResult.setter
def ManualResult(self, ManualResult):
self._ManualResult = ManualResult
@property
def Metrics(self):
r"""结构化对比指标数据
:rtype: :class:`tencentcloud.cii.v20201210.models.CompareMetricsData`
"""
return self._Metrics
@Metrics.setter
def Metrics(self, Metrics):
self._Metrics = Metrics
@property
def NewItems(self):
r"""新增项
:rtype: str
"""
return self._NewItems
@NewItems.setter
def NewItems(self, NewItems):
self._NewItems = NewItems
@property
def ModifyItems(self):
r"""修改项
:rtype: str
"""
return self._ModifyItems
@ModifyItems.setter
def ModifyItems(self, ModifyItems):
self._ModifyItems = ModifyItems
@property
def RequestId(self):
r"""唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:rtype: str
"""
return self._RequestId
@RequestId.setter
def RequestId(self, RequestId):
self._RequestId = RequestId
def _deserialize(self, params):
self._PolicyId = params.get("PolicyId")
self._TaskId = params.get("TaskId")
self._CustomerId = params.get("CustomerId")
self._CustomerName = params.get("CustomerName")
self._ReviewTime = params.get("ReviewTime")
self._MachineResult = params.get("MachineResult")
self._ManualResult = params.get("ManualResult")
if params.get("Metrics") is not None:
self._Metrics = CompareMetricsData()
self._Metrics._deserialize(params.get("Metrics"))
self._NewItems = params.get("NewItems")
self._ModifyItems = params.get("ModifyItems")
self._RequestId = params.get("RequestId")
class DescribeStructureTaskResultRequest(AbstractModel):
r"""DescribeStructureTaskResult请求参数结构体
"""
def __init__(self):
r"""
:param _TaskId: 结构化任务ID
:type TaskId: str
"""
self._TaskId = None
@property
def TaskId(self):
r"""结构化任务ID
:rtype: str
"""
return self._TaskId
@TaskId.setter
def TaskId(self, TaskId):
self._TaskId = TaskId
def _deserialize(self, params):
self._TaskId = params.get("TaskId")
memeber_set = set(params.keys())
for name, value in vars(self).items():
property_name = name[1:]
if property_name in memeber_set:
memeber_set.remove(property_name)
if len(memeber_set) > 0:
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
class DescribeStructureTaskResultResponse(AbstractModel):
r"""DescribeStructureTaskResult返回参数结构体
"""
def __init__(self):
r"""
:param _Status: 结果状态:
0返回成功
1结果未生成
2结果生成失败
:type Status: int
:param _Results: 结构化识别结果数组每个数组元素对应一个图片的结构化结果顺序和输入参数的ImageList或FileList对应。
注意:此字段可能返回 null表示取不到有效值。
:type Results: list of ResultObject
:param _RequestId: 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:type RequestId: str
"""
self._Status = None
self._Results = None
self._RequestId = None
@property
def Status(self):
r"""结果状态:
0返回成功
1结果未生成
2结果生成失败
:rtype: int
"""
return self._Status
@Status.setter
def Status(self, Status):
self._Status = Status
@property
def Results(self):
r"""结构化识别结果数组每个数组元素对应一个图片的结构化结果顺序和输入参数的ImageList或FileList对应。
注意:此字段可能返回 null表示取不到有效值。
:rtype: list of ResultObject
"""
return self._Results
@Results.setter
def Results(self, Results):
self._Results = Results
@property
def RequestId(self):
r"""唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
:rtype: str
"""
return self._RequestId
@RequestId.setter
def RequestId(self, RequestId):
self._RequestId = RequestId
def _deserialize(self, params):
self._Status = params.get("Status")
if params.get("Results") is not None:
self._Results = []
for item in params.get("Results"):
obj = ResultObject()
obj._deserialize(item)
self._Results.append(obj)
self._RequestId = params.get("RequestId")
class ResultObject(AbstractModel):
r"""用于返回结构化任务结果
"""
def __init__(self):
r"""
:param _Quality: 图片质量分
:type Quality: float
:param _StructureResult: 由结构化算法结构化json转换的字符串具体协议参见算法结构化结果协议
:type StructureResult: str
"""
self._Quality = None
self._StructureResult = None
@property
def Quality(self):
r"""图片质量分
:rtype: float
"""
return self._Quality
@Quality.setter
def Quality(self, Quality):
self._Quality = Quality
@property
def StructureResult(self):
r"""由结构化算法结构化json转换的字符串具体协议参见算法结构化结果协议
:rtype: str
"""
return self._StructureResult
@StructureResult.setter
def StructureResult(self, StructureResult):
self._StructureResult = StructureResult
def _deserialize(self, params):
self._Quality = params.get("Quality")
self._StructureResult = params.get("StructureResult")
memeber_set = set(params.keys())
for name, value in vars(self).items():
property_name = name[1:]
if property_name in memeber_set:
memeber_set.remove(property_name)
if len(memeber_set) > 0:
warnings.warn("%s fileds are useless." % ",".join(memeber_set))