def CreatePerson(self, request): """创建人员,添加人脸、姓名、性别及其他相关信息。 > - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 :param request: Request instance for CreatePerson. :type request: :class:`tencentcloud.iai.v20180301.models.CreatePersonRequest` :rtype: :class:`tencentcloud.iai.v20180301.models.CreatePersonResponse` """ try: params = request._serialize() body = self.call("CreatePerson", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreatePersonResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def CreatePerson(self, request): """创建人员,添加人脸、姓名、性别及其他相关信息。 > - 创建人员完成后,生效时间一般不超过 1 秒,极端情况最多不超过 5 秒,之后您可以进行[人脸搜索](https://cloud.tencent.com/document/product/867/32798)或[人脸验证](https://cloud.tencent.com/document/product/867/32806)。 :param request: 调用CreatePerson所需参数的结构体。 :type request: :class:`tencentcloud.iai.v20180301.models.CreatePersonRequest` :rtype: :class:`tencentcloud.iai.v20180301.models.CreatePersonResponse` """ try: params = request._serialize() body = self.call("CreatePerson", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreatePersonResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)