第一次提交:阿龙电竞 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,81 @@
# -*- 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.
# 请求超时。
INTERNALERROR_ERRTEXTTIMEOUT = 'InternalError.ErrTextTimeOut'
# 查询异常:请求被限流
INTERNALERROR_QUERYREQLIMITED = 'InternalError.QueryReqLimited'
# 错误的action。
INVALIDPARAMETER_ERRACTION = 'InvalidParameter.ErrAction'
# 请求的文本长度过长。
INVALIDPARAMETER_ERRTEXTCONTENTLEN = 'InvalidParameter.ErrTextContentLen'
# 文本类型错误需要base64的文本。
INVALIDPARAMETER_ERRTEXTCONTENTTYPE = 'InvalidParameter.ErrTextContentType'
# InvalidParameter.ParameterError
INVALIDPARAMETER_PARAMETERERROR = 'InvalidParameter.ParameterError'
# FileContent不可用传入的Base64编码无法转换成标准utf8内容。
INVALIDPARAMETERVALUE_ERRFILECONTENT = 'InvalidParameterValue.ErrFileContent'
# 请求的文本长度超过限制。
INVALIDPARAMETERVALUE_ERRTEXTCONTENTLEN = 'InvalidParameterValue.ErrTextContentLen'
# 请求的文本格式错误需要base64编码格式的文本
INVALIDPARAMETERVALUE_ERRTEXTCONTENTTYPE = 'InvalidParameterValue.ErrTextContentType'
# Type参数值不支持
INVALIDPARAMETERVALUE_ERRTYPE = 'InvalidParameterValue.ErrType'
# BizType参数错误
INVALIDPARAMETERVALUE_INVALIDBIZTYPE = 'InvalidParameterValue.InvalidBizType'
# InvalidParameterValue.InvalidContent
INVALIDPARAMETERVALUE_INVALIDCONTENT = 'InvalidParameterValue.InvalidContent'
# ContentType参数错误
INVALIDPARAMETERVALUE_INVALIDCONTENTTYPE = 'InvalidParameterValue.InvalidContentType'
# FileName参数错误
INVALIDPARAMETERVALUE_INVALIDFILENAME = 'InvalidParameterValue.InvalidFileName'
# FileType参数错误
INVALIDPARAMETERVALUE_INVALIDFILETYPE = 'InvalidParameterValue.InvalidFileType'
# FileUrl参数错误
INVALIDPARAMETERVALUE_INVALIDFILEURL = 'InvalidParameterValue.InvalidFileUrl'
# Requirement参数错误
INVALIDPARAMETERVALUE_INVALIDREQUIREMENT = 'InvalidParameterValue.InvalidRequirement'
# TaskId参数错误
INVALIDPARAMETERVALUE_INVALIDTASKID = 'InvalidParameterValue.InvalidTaskId'
# Verbose参数错误
INVALIDPARAMETERVALUE_INVALIDVERBOSE = 'InvalidParameterValue.InvalidVerbose'
# 任务ID不存在
INVALIDPARAMETERVALUE_TASKIDNOTFOUND = 'InvalidParameterValue.TaskIdNotFound'
# 请求的次数超过了频率限制。
REQUESTLIMITEXCEEDED = 'RequestLimitExceeded'
# 未开通权限/无有效套餐包/账号已欠费。
UNAUTHORIZEDOPERATION_UNAUTHORIZED = 'UnauthorizedOperation.Unauthorized'

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,122 @@
# -*- 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.tms.v20201229 import models
class TmsClient(AbstractClient):
_apiVersion = '2020-12-29'
_endpoint = 'tms.tencentcloudapi.com'
_service = 'tms'
def CreateFinancialLLMTask(self, request):
r"""本接口适用于“金融大模型审校”服务。在对接前,请参考快速入门文档并配置好业务基础信息。
- **快速入门**[快速入门文档](https://cloud.tencent.com/document/product/1124/124604)
### 接口功能说明:
由于大模型审校服务耗时较长,通常达到分钟级,因此采用异步模式,整体流程分为两步:
1. 创建金融大模型审校任务(详见本文档)。
2. 查询审校结果(详见 [查询结果文档](https://cloud.tencent.com/document/product/1124/124463))。
### 接口调用说明:
- **请求域名**tms.tencentcloudapi.com
- **并发限制**每个账号最多可同时进行3个审校任务。
- **支持的文件格式**纯文本、PDF、DOC、DOCX。
### 文件限制说明:
- **文档大小限制**PDF/DOC/DOCX 格式文件不超过 200M该大小为Base64编码后
- **文档下载时长**:不超过 15 秒(建议将文档存储在腾讯云 URL以确保更高的下载稳定性
:param request: Request instance for CreateFinancialLLMTask.
:type request: :class:`tencentcloud.tms.v20201229.models.CreateFinancialLLMTaskRequest`
:rtype: :class:`tencentcloud.tms.v20201229.models.CreateFinancialLLMTaskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateFinancialLLMTask", params, headers=headers)
response = json.loads(body)
model = models.CreateFinancialLLMTaskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def GetFinancialLLMTaskResult(self, request):
r"""本接口适用于“金融大模型审校”服务的结果查询。
:param request: Request instance for GetFinancialLLMTaskResult.
:type request: :class:`tencentcloud.tms.v20201229.models.GetFinancialLLMTaskResultRequest`
:rtype: :class:`tencentcloud.tms.v20201229.models.GetFinancialLLMTaskResultResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("GetFinancialLLMTaskResult", params, headers=headers)
response = json.loads(body)
model = models.GetFinancialLLMTaskResultResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def TextModeration(self, request):
r"""本接口提供“内容安全”和“AI生成识别”服务。在对接之前请先参考快速入门以配置业务基础信息。
- **内容安全**[快速入门](https://cloud.tencent.com/document/product/1124/37119)
- **AI生成识别**[快速入门](https://cloud.tencent.com/document/product/1124/118694)
### 接口功能说明:
- **内容安全**:对输入的文本,识别其中是否存在色情、违法等风险,返回处置建议、风险标签及对应的模型阈值。
- **AI生成识别**对输入的文本判断其是否为AI工具生成返回AI生成的概率分数。
### 接口调用说明:
- **请求域名**tms.tencentcloudapi.com
- **文本长度限制**最长10,000个字符以Unicode编码计量
- **请求频率**内容安全默认1000次/秒AI生成识别默认50次/秒。
- **支持语言**:中文、英文。
:param request: Request instance for TextModeration.
:type request: :class:`tencentcloud.tms.v20201229.models.TextModerationRequest`
:rtype: :class:`tencentcloud.tms.v20201229.models.TextModerationResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("TextModeration", params, headers=headers)
response = json.loads(body)
model = models.TextModerationResponse()
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,107 @@
# -*- 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.tms.v20201229 import models
from typing import Dict
class TmsClient(AbstractClient):
_apiVersion = '2020-12-29'
_endpoint = 'tms.tencentcloudapi.com'
_service = 'tms'
async def CreateFinancialLLMTask(
self,
request: models.CreateFinancialLLMTaskRequest,
opts: Dict = None,
) -> models.CreateFinancialLLMTaskResponse:
"""
本接口适用于“金融大模型审校”服务。在对接前,请参考快速入门文档并配置好业务基础信息。
- **快速入门**[快速入门文档](https://cloud.tencent.com/document/product/1124/124604)
### 接口功能说明:
由于大模型审校服务耗时较长,通常达到分钟级,因此采用异步模式,整体流程分为两步:
1. 创建金融大模型审校任务(详见本文档)。
2. 查询审校结果(详见 [查询结果文档](https://cloud.tencent.com/document/product/1124/124463))。
### 接口调用说明:
- **请求域名**tms.tencentcloudapi.com
- **并发限制**每个账号最多可同时进行3个审校任务。
- **支持的文件格式**纯文本、PDF、DOC、DOCX。
### 文件限制说明:
- **文档大小限制**PDF/DOC/DOCX 格式文件不超过 200M该大小为Base64编码后
- **文档下载时长**:不超过 15 秒(建议将文档存储在腾讯云 URL以确保更高的下载稳定性
"""
kwargs = {}
kwargs["action"] = "CreateFinancialLLMTask"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.CreateFinancialLLMTaskResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def GetFinancialLLMTaskResult(
self,
request: models.GetFinancialLLMTaskResultRequest,
opts: Dict = None,
) -> models.GetFinancialLLMTaskResultResponse:
"""
本接口适用于“金融大模型审校”服务的结果查询。
"""
kwargs = {}
kwargs["action"] = "GetFinancialLLMTaskResult"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.GetFinancialLLMTaskResultResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def TextModeration(
self,
request: models.TextModerationRequest,
opts: Dict = None,
) -> models.TextModerationResponse:
"""
本接口提供“内容安全”和“AI生成识别”服务。在对接之前请先参考快速入门以配置业务基础信息。
- **内容安全**[快速入门](https://cloud.tencent.com/document/product/1124/37119)
- **AI生成识别**[快速入门](https://cloud.tencent.com/document/product/1124/118694)
### 接口功能说明:
- **内容安全**:对输入的文本,识别其中是否存在色情、违法等风险,返回处置建议、风险标签及对应的模型阈值。
- **AI生成识别**对输入的文本判断其是否为AI工具生成返回AI生成的概率分数。
### 接口调用说明:
- **请求域名**tms.tencentcloudapi.com
- **文本长度限制**最长10,000个字符以Unicode编码计量
- **请求频率**内容安全默认1000次/秒AI生成识别默认50次/秒。
- **支持语言**:中文、英文。
"""
kwargs = {}
kwargs["action"] = "TextModeration"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.TextModerationResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)