tencentcloud-sdk-python-ocr 3.1.171__tar.gz → 3.1.173__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_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/v20181119/models.py +247 -4
  5. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  6. tencentcloud_sdk_python_ocr-3.1.173/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  7. tencentcloud_sdk_python_ocr-3.1.171/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  8. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/README.rst +0 -0
  9. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/setup.cfg +0 -0
  10. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/__init__.py +0 -0
  11. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/v20181119/ocr_client.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud/ocr/v20181119/ocr_client_async.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.171 → tencentcloud_sdk_python_ocr-3.1.173}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.171
3
+ Version: 3.1.173
4
4
  Summary: Tencent Cloud Ocr 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.171
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.173
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-ocr',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.171,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.173,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Ocr SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.171'
17
+ __version__ = '3.1.173'
@@ -21503,10 +21503,10 @@ class PortraitImageInfo(AbstractModel):
21503
21503
 
21504
21504
  def __init__(self):
21505
21505
  r"""
21506
- :param _PortraitImage: 头像
21506
+ :param _PortraitImage: <p>头像</p>
21507
21507
  注意:此字段可能返回 null,表示取不到有效值。
21508
21508
  :type PortraitImage: str
21509
- :param _ImageCoordinates: 头像坐标
21509
+ :param _ImageCoordinates: <p>头像坐标</p>
21510
21510
  注意:此字段可能返回 null,表示取不到有效值。
21511
21511
  :type ImageCoordinates: :class:`tencentcloud.ocr.v20181119.models.ImageCoordinates`
21512
21512
  """
@@ -21515,7 +21515,7 @@ class PortraitImageInfo(AbstractModel):
21515
21515
 
21516
21516
  @property
21517
21517
  def PortraitImage(self):
21518
- r"""头像
21518
+ r"""<p>头像</p>
21519
21519
  注意:此字段可能返回 null,表示取不到有效值。
21520
21520
  :rtype: str
21521
21521
  """
@@ -21527,7 +21527,7 @@ class PortraitImageInfo(AbstractModel):
21527
21527
 
21528
21528
  @property
21529
21529
  def ImageCoordinates(self):
21530
- r"""头像坐标
21530
+ r"""<p>头像坐标</p>
21531
21531
  注意:此字段可能返回 null,表示取不到有效值。
21532
21532
  :rtype: :class:`tencentcloud.ocr.v20181119.models.ImageCoordinates`
21533
21533
  """
@@ -23124,6 +23124,183 @@ class RailwayTicketInfo(AbstractModel):
23124
23124
 
23125
23125
 
23126
23126
 
23127
+ class ReasoningConfig(AbstractModel):
23128
+ r"""推理输出配置
23129
+
23130
+ """
23131
+
23132
+ def __init__(self):
23133
+ r"""
23134
+ :param _OutputMode: <p>实际使用的推理输出模式:enum 或 string。</p>
23135
+ :type OutputMode: str
23136
+ :param _EnumValues: <p>枚举值集合,仅在 OutputMode=enum 时生效。 VLM 输出必须精确命中此集合中的某个值。</p>
23137
+ :type EnumValues: list of str
23138
+ :param _MaxLength: <p>文本输出最大长度,仅在 OutputMode=string 时生效。</p><p>取值范围:[1, 500]</p><p>默认值:200</p>
23139
+ :type MaxLength: int
23140
+ :param _EnableImageInput: <p>是否在推理调用时向 VLM 传入原图进行多模态理解。 true(默认):VLM 同时接收原图和渲染后的 Prompt,具备多模态理解能力,可直接&quot;看&quot;图片内容进行推理。 false:不传入原图,仅以渲染后的 Prompt(含变量注入值)进行纯文本推理。适用于推理逻辑完全基于结构化出参字段(如水印文字、置信度比较等)的场景,可降低推理延迟和计费成本。 建议:当 ReasoningPrompt 中未涉及&quot;观察图片&quot;、&quot;直接看图&quot;等多模态指令,且推理规则完全基于 ${变量名} 引用的文字结果时,可设为 false 以优化性能。</p>
23141
+ :type EnableImageInput: bool
23142
+ """
23143
+ self._OutputMode = None
23144
+ self._EnumValues = None
23145
+ self._MaxLength = None
23146
+ self._EnableImageInput = None
23147
+
23148
+ @property
23149
+ def OutputMode(self):
23150
+ r"""<p>实际使用的推理输出模式:enum 或 string。</p>
23151
+ :rtype: str
23152
+ """
23153
+ return self._OutputMode
23154
+
23155
+ @OutputMode.setter
23156
+ def OutputMode(self, OutputMode):
23157
+ self._OutputMode = OutputMode
23158
+
23159
+ @property
23160
+ def EnumValues(self):
23161
+ r"""<p>枚举值集合,仅在 OutputMode=enum 时生效。 VLM 输出必须精确命中此集合中的某个值。</p>
23162
+ :rtype: list of str
23163
+ """
23164
+ return self._EnumValues
23165
+
23166
+ @EnumValues.setter
23167
+ def EnumValues(self, EnumValues):
23168
+ self._EnumValues = EnumValues
23169
+
23170
+ @property
23171
+ def MaxLength(self):
23172
+ r"""<p>文本输出最大长度,仅在 OutputMode=string 时生效。</p><p>取值范围:[1, 500]</p><p>默认值:200</p>
23173
+ :rtype: int
23174
+ """
23175
+ return self._MaxLength
23176
+
23177
+ @MaxLength.setter
23178
+ def MaxLength(self, MaxLength):
23179
+ self._MaxLength = MaxLength
23180
+
23181
+ @property
23182
+ def EnableImageInput(self):
23183
+ r"""<p>是否在推理调用时向 VLM 传入原图进行多模态理解。 true(默认):VLM 同时接收原图和渲染后的 Prompt,具备多模态理解能力,可直接&quot;看&quot;图片内容进行推理。 false:不传入原图,仅以渲染后的 Prompt(含变量注入值)进行纯文本推理。适用于推理逻辑完全基于结构化出参字段(如水印文字、置信度比较等)的场景,可降低推理延迟和计费成本。 建议:当 ReasoningPrompt 中未涉及&quot;观察图片&quot;、&quot;直接看图&quot;等多模态指令,且推理规则完全基于 ${变量名} 引用的文字结果时,可设为 false 以优化性能。</p>
23184
+ :rtype: bool
23185
+ """
23186
+ return self._EnableImageInput
23187
+
23188
+ @EnableImageInput.setter
23189
+ def EnableImageInput(self, EnableImageInput):
23190
+ self._EnableImageInput = EnableImageInput
23191
+
23192
+
23193
+ def _deserialize(self, params):
23194
+ self._OutputMode = params.get("OutputMode")
23195
+ self._EnumValues = params.get("EnumValues")
23196
+ self._MaxLength = params.get("MaxLength")
23197
+ self._EnableImageInput = params.get("EnableImageInput")
23198
+ memeber_set = set(params.keys())
23199
+ for name, value in vars(self).items():
23200
+ property_name = name[1:]
23201
+ if property_name in memeber_set:
23202
+ memeber_set.remove(property_name)
23203
+ if len(memeber_set) > 0:
23204
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
23205
+
23206
+
23207
+
23208
+ class ReasoningResult(AbstractModel):
23209
+ r"""VLM 推理结果
23210
+
23211
+ """
23212
+
23213
+ def __init__(self):
23214
+ r"""
23215
+ :param _OutputMode: <p>实际使用的推理输出模式:enum 或 string。</p>
23216
+ :type OutputMode: str
23217
+ :param _EnumValue: <p>枚举模式下的推理结果值。当 OutputMode=enum 时返回,必定命中请求中 EnumValues 的某个值。 若 VLM 输出无法匹配任何枚举值,则返回 <strong>UNCERTAIN</strong>。</p>
23218
+ :type EnumValue: str
23219
+ :param _TextValue: <p>文本模式下的推理结果值。当 OutputMode=string 时返回。 若 VLM 无法得出结论,则返回 <strong>UNCERTAIN</strong>。</p>
23220
+ :type TextValue: str
23221
+ :param _RawOutput: <p>VLM 原始输出文本(未经过结构化校验)。</p>
23222
+ :type RawOutput: str
23223
+ :param _RenderedPrompt: <p>变量替换后的实际 Prompt(脱敏后)。</p>
23224
+ :type RenderedPrompt: str
23225
+ """
23226
+ self._OutputMode = None
23227
+ self._EnumValue = None
23228
+ self._TextValue = None
23229
+ self._RawOutput = None
23230
+ self._RenderedPrompt = None
23231
+
23232
+ @property
23233
+ def OutputMode(self):
23234
+ r"""<p>实际使用的推理输出模式:enum 或 string。</p>
23235
+ :rtype: str
23236
+ """
23237
+ return self._OutputMode
23238
+
23239
+ @OutputMode.setter
23240
+ def OutputMode(self, OutputMode):
23241
+ self._OutputMode = OutputMode
23242
+
23243
+ @property
23244
+ def EnumValue(self):
23245
+ r"""<p>枚举模式下的推理结果值。当 OutputMode=enum 时返回,必定命中请求中 EnumValues 的某个值。 若 VLM 输出无法匹配任何枚举值,则返回 <strong>UNCERTAIN</strong>。</p>
23246
+ :rtype: str
23247
+ """
23248
+ return self._EnumValue
23249
+
23250
+ @EnumValue.setter
23251
+ def EnumValue(self, EnumValue):
23252
+ self._EnumValue = EnumValue
23253
+
23254
+ @property
23255
+ def TextValue(self):
23256
+ r"""<p>文本模式下的推理结果值。当 OutputMode=string 时返回。 若 VLM 无法得出结论,则返回 <strong>UNCERTAIN</strong>。</p>
23257
+ :rtype: str
23258
+ """
23259
+ return self._TextValue
23260
+
23261
+ @TextValue.setter
23262
+ def TextValue(self, TextValue):
23263
+ self._TextValue = TextValue
23264
+
23265
+ @property
23266
+ def RawOutput(self):
23267
+ r"""<p>VLM 原始输出文本(未经过结构化校验)。</p>
23268
+ :rtype: str
23269
+ """
23270
+ return self._RawOutput
23271
+
23272
+ @RawOutput.setter
23273
+ def RawOutput(self, RawOutput):
23274
+ self._RawOutput = RawOutput
23275
+
23276
+ @property
23277
+ def RenderedPrompt(self):
23278
+ r"""<p>变量替换后的实际 Prompt(脱敏后)。</p>
23279
+ :rtype: str
23280
+ """
23281
+ return self._RenderedPrompt
23282
+
23283
+ @RenderedPrompt.setter
23284
+ def RenderedPrompt(self, RenderedPrompt):
23285
+ self._RenderedPrompt = RenderedPrompt
23286
+
23287
+
23288
+ def _deserialize(self, params):
23289
+ self._OutputMode = params.get("OutputMode")
23290
+ self._EnumValue = params.get("EnumValue")
23291
+ self._TextValue = params.get("TextValue")
23292
+ self._RawOutput = params.get("RawOutput")
23293
+ self._RenderedPrompt = params.get("RenderedPrompt")
23294
+ memeber_set = set(params.keys())
23295
+ for name, value in vars(self).items():
23296
+ property_name = name[1:]
23297
+ if property_name in memeber_set:
23298
+ memeber_set.remove(property_name)
23299
+ if len(memeber_set) > 0:
23300
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
23301
+
23302
+
23303
+
23127
23304
  class RecognizeAgentRequest(AbstractModel):
23128
23305
  r"""RecognizeAgent请求参数结构体
23129
23306
 
@@ -41472,10 +41649,16 @@ class VerifyScenePhotoRequest(AbstractModel):
41472
41649
  :type ImageUrl: str
41473
41650
  :param _ImageBase64: <p>图片的 Base64 值。要求图片经Base64编码后不超过 10M。</p>
41474
41651
  :type ImageBase64: str
41652
+ :param _ReasoningPrompt: <p>推理 Prompt 模板,默认使用 VLM 对图片进行理解推理,同时支持使用 ${变量名} 进行推理。传入该参数即开启推理流程。</p><p>入参限制:长度限制:1–2000 字符</p>
41653
+ :type ReasoningPrompt: str
41654
+ :param _ReasoningConfig: <p>推理输出配置。当 ReasoningPrompt 传入时建议同步传入,未传入时使用默认配置(OutputMode=enum, EnumValues=[&quot;true&quot;,&quot;false&quot;], EnableImageInput=true)。</p>
41655
+ :type ReasoningConfig: :class:`tencentcloud.ocr.v20181119.models.ReasoningConfig`
41475
41656
  """
41476
41657
  self._Scene = None
41477
41658
  self._ImageUrl = None
41478
41659
  self._ImageBase64 = None
41660
+ self._ReasoningPrompt = None
41661
+ self._ReasoningConfig = None
41479
41662
 
41480
41663
  @property
41481
41664
  def Scene(self):
@@ -41510,11 +41693,37 @@ class VerifyScenePhotoRequest(AbstractModel):
41510
41693
  def ImageBase64(self, ImageBase64):
41511
41694
  self._ImageBase64 = ImageBase64
41512
41695
 
41696
+ @property
41697
+ def ReasoningPrompt(self):
41698
+ r"""<p>推理 Prompt 模板,默认使用 VLM 对图片进行理解推理,同时支持使用 ${变量名} 进行推理。传入该参数即开启推理流程。</p><p>入参限制:长度限制:1–2000 字符</p>
41699
+ :rtype: str
41700
+ """
41701
+ return self._ReasoningPrompt
41702
+
41703
+ @ReasoningPrompt.setter
41704
+ def ReasoningPrompt(self, ReasoningPrompt):
41705
+ self._ReasoningPrompt = ReasoningPrompt
41706
+
41707
+ @property
41708
+ def ReasoningConfig(self):
41709
+ r"""<p>推理输出配置。当 ReasoningPrompt 传入时建议同步传入,未传入时使用默认配置(OutputMode=enum, EnumValues=[&quot;true&quot;,&quot;false&quot;], EnableImageInput=true)。</p>
41710
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.ReasoningConfig`
41711
+ """
41712
+ return self._ReasoningConfig
41713
+
41714
+ @ReasoningConfig.setter
41715
+ def ReasoningConfig(self, ReasoningConfig):
41716
+ self._ReasoningConfig = ReasoningConfig
41717
+
41513
41718
 
41514
41719
  def _deserialize(self, params):
41515
41720
  self._Scene = params.get("Scene")
41516
41721
  self._ImageUrl = params.get("ImageUrl")
41517
41722
  self._ImageBase64 = params.get("ImageBase64")
41723
+ self._ReasoningPrompt = params.get("ReasoningPrompt")
41724
+ if params.get("ReasoningConfig") is not None:
41725
+ self._ReasoningConfig = ReasoningConfig()
41726
+ self._ReasoningConfig._deserialize(params.get("ReasoningConfig"))
41518
41727
  memeber_set = set(params.keys())
41519
41728
  for name, value in vars(self).items():
41520
41729
  property_name = name[1:]
@@ -41544,6 +41753,10 @@ class VerifyScenePhotoResponse(AbstractModel):
41544
41753
  :type TextWatermark: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
41545
41754
  :param _WatermarkContent: <p>水印内容,当未检测到文字水印时不返回,返回多组水印时以 | 分隔。</p>
41546
41755
  :type WatermarkContent: str
41756
+ :param _Template: <p>模板图片提示</p>
41757
+ :type Template: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
41758
+ :param _ReasoningResult: <p>VLM 推理结果。仅当请求中传入 ReasoningPrompt 时返回,否则不返回此字段。</p>
41759
+ :type ReasoningResult: :class:`tencentcloud.ocr.v20181119.models.ReasoningResult`
41547
41760
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
41548
41761
  :type RequestId: str
41549
41762
  """
@@ -41553,6 +41766,8 @@ class VerifyScenePhotoResponse(AbstractModel):
41553
41766
  self._Screenshot = None
41554
41767
  self._TextWatermark = None
41555
41768
  self._WatermarkContent = None
41769
+ self._Template = None
41770
+ self._ReasoningResult = None
41556
41771
  self._RequestId = None
41557
41772
 
41558
41773
  @property
@@ -41621,6 +41836,28 @@ class VerifyScenePhotoResponse(AbstractModel):
41621
41836
  def WatermarkContent(self, WatermarkContent):
41622
41837
  self._WatermarkContent = WatermarkContent
41623
41838
 
41839
+ @property
41840
+ def Template(self):
41841
+ r"""<p>模板图片提示</p>
41842
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
41843
+ """
41844
+ return self._Template
41845
+
41846
+ @Template.setter
41847
+ def Template(self, Template):
41848
+ self._Template = Template
41849
+
41850
+ @property
41851
+ def ReasoningResult(self):
41852
+ r"""<p>VLM 推理结果。仅当请求中传入 ReasoningPrompt 时返回,否则不返回此字段。</p>
41853
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.ReasoningResult`
41854
+ """
41855
+ return self._ReasoningResult
41856
+
41857
+ @ReasoningResult.setter
41858
+ def ReasoningResult(self, ReasoningResult):
41859
+ self._ReasoningResult = ReasoningResult
41860
+
41624
41861
  @property
41625
41862
  def RequestId(self):
41626
41863
  r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -41650,6 +41887,12 @@ class VerifyScenePhotoResponse(AbstractModel):
41650
41887
  self._TextWatermark = SceneWarnInfo()
41651
41888
  self._TextWatermark._deserialize(params.get("TextWatermark"))
41652
41889
  self._WatermarkContent = params.get("WatermarkContent")
41890
+ if params.get("Template") is not None:
41891
+ self._Template = SceneWarnInfo()
41892
+ self._Template._deserialize(params.get("Template"))
41893
+ if params.get("ReasoningResult") is not None:
41894
+ self._ReasoningResult = ReasoningResult()
41895
+ self._ReasoningResult._deserialize(params.get("ReasoningResult"))
41653
41896
  self._RequestId = params.get("RequestId")
41654
41897
 
41655
41898
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.171
3
+ Version: 3.1.173
4
4
  Summary: Tencent Cloud Ocr 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.171
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.173
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.173
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.171