tencentcloud-sdk-python-ocr 3.1.200__tar.gz → 3.1.202__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.200 → tencentcloud_sdk_python_ocr-3.1.202}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/v20181119/errorcodes.py +3 -0
  5. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/v20181119/models.py +399 -0
  6. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/v20181119/ocr_client.py +49 -3
  7. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/v20181119/ocr_client_async.py +39 -3
  8. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  9. tencentcloud_sdk_python_ocr-3.1.202/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  10. tencentcloud_sdk_python_ocr-3.1.200/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  11. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/README.rst +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/setup.cfg +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/__init__.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.200 → tencentcloud_sdk_python_ocr-3.1.202}/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.200
3
+ Version: 3.1.202
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.200
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.202
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.200,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.202,<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.200'
17
+ __version__ = '3.1.202'
@@ -80,6 +80,9 @@ FAILEDOPERATION_IMAGESIZETOOLARGE = 'FailedOperation.ImageSizeTooLarge'
80
80
  # 视读区信息与机读区信息不一致
81
81
  FAILEDOPERATION_INCONSISTENCYBETWEENMRZANDVRZ = 'FailedOperation.InconsistencyBetweenMRZAndVRZ'
82
82
 
83
+ # 输入文档格式不符合
84
+ FAILEDOPERATION_INVALIDFILEFORMAT = 'FailedOperation.InvalidFileFormat'
85
+
83
86
  # 马来西亚证件识别出的邮编长度不正确
84
87
  FAILEDOPERATION_INVALIDPOSTALCODELENGTH = 'FailedOperation.InvalidPostalCodeLength'
85
88
 
@@ -8388,6 +8388,57 @@ class Element(AbstractModel):
8388
8388
 
8389
8389
 
8390
8390
 
8391
+ class EmbeddingObject(AbstractModel):
8392
+ r"""文本向量化结果
8393
+
8394
+ """
8395
+
8396
+ def __init__(self):
8397
+ r"""
8398
+ :param _Index: 输入文本在 Inputs 列表中的索引,从 0 开始。
8399
+ :type Index: int
8400
+ :param _Embedding: 向量化结果,维度由所选模型决定。
8401
+ :type Embedding: list of float
8402
+ """
8403
+ self._Index = None
8404
+ self._Embedding = None
8405
+
8406
+ @property
8407
+ def Index(self):
8408
+ r"""输入文本在 Inputs 列表中的索引,从 0 开始。
8409
+ :rtype: int
8410
+ """
8411
+ return self._Index
8412
+
8413
+ @Index.setter
8414
+ def Index(self, Index):
8415
+ self._Index = Index
8416
+
8417
+ @property
8418
+ def Embedding(self):
8419
+ r"""向量化结果,维度由所选模型决定。
8420
+ :rtype: list of float
8421
+ """
8422
+ return self._Embedding
8423
+
8424
+ @Embedding.setter
8425
+ def Embedding(self, Embedding):
8426
+ self._Embedding = Embedding
8427
+
8428
+
8429
+ def _deserialize(self, params):
8430
+ self._Index = params.get("Index")
8431
+ self._Embedding = params.get("Embedding")
8432
+ memeber_set = set(params.keys())
8433
+ for name, value in vars(self).items():
8434
+ property_name = name[1:]
8435
+ if property_name in memeber_set:
8436
+ memeber_set.remove(property_name)
8437
+ if len(memeber_set) > 0:
8438
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
8439
+
8440
+
8441
+
8391
8442
  class Encryption(AbstractModel):
8392
8443
  r"""敏感数据加密
8393
8444
 
@@ -12492,6 +12543,354 @@ class GeneralMachineItem(AbstractModel):
12492
12543
 
12493
12544
 
12494
12545
 
12546
+ class GenerateTextEmbeddingRequest(AbstractModel):
12547
+ r"""GenerateTextEmbedding请求参数结构体
12548
+
12549
+ """
12550
+
12551
+ def __init__(self):
12552
+ r"""
12553
+ :param _Model: <p>选择生成向量的模型(不同模型计费单价不同)。取值:</p><ul><li>0:text-embedding-0.6b</li><li>1:text-embedding-4b</li></ul>
12554
+ :type Model: str
12555
+ :param _Inputs: <p>输入文本列表。单次最多 7 条,单条不超过 2000 字符。</p>
12556
+ :type Inputs: list of str
12557
+ :param _TextType: <p>文本向量化类型。取值:</p><ul><li>query:查询文本,用于检索场景的查询侧</li><li>document:文档文本,用于检索场景的文档侧</li></ul><p>默认为 document</p>
12558
+ :type TextType: str
12559
+ :param _Instruction: <p>自定义任务指令词,用于指定向量化任务。最大 2000 字符。不传时按 TextType 使用系统默认指令词。</p>
12560
+ :type Instruction: str
12561
+ """
12562
+ self._Model = None
12563
+ self._Inputs = None
12564
+ self._TextType = None
12565
+ self._Instruction = None
12566
+
12567
+ @property
12568
+ def Model(self):
12569
+ r"""<p>选择生成向量的模型(不同模型计费单价不同)。取值:</p><ul><li>0:text-embedding-0.6b</li><li>1:text-embedding-4b</li></ul>
12570
+ :rtype: str
12571
+ """
12572
+ return self._Model
12573
+
12574
+ @Model.setter
12575
+ def Model(self, Model):
12576
+ self._Model = Model
12577
+
12578
+ @property
12579
+ def Inputs(self):
12580
+ r"""<p>输入文本列表。单次最多 7 条,单条不超过 2000 字符。</p>
12581
+ :rtype: list of str
12582
+ """
12583
+ return self._Inputs
12584
+
12585
+ @Inputs.setter
12586
+ def Inputs(self, Inputs):
12587
+ self._Inputs = Inputs
12588
+
12589
+ @property
12590
+ def TextType(self):
12591
+ r"""<p>文本向量化类型。取值:</p><ul><li>query:查询文本,用于检索场景的查询侧</li><li>document:文档文本,用于检索场景的文档侧</li></ul><p>默认为 document</p>
12592
+ :rtype: str
12593
+ """
12594
+ return self._TextType
12595
+
12596
+ @TextType.setter
12597
+ def TextType(self, TextType):
12598
+ self._TextType = TextType
12599
+
12600
+ @property
12601
+ def Instruction(self):
12602
+ r"""<p>自定义任务指令词,用于指定向量化任务。最大 2000 字符。不传时按 TextType 使用系统默认指令词。</p>
12603
+ :rtype: str
12604
+ """
12605
+ return self._Instruction
12606
+
12607
+ @Instruction.setter
12608
+ def Instruction(self, Instruction):
12609
+ self._Instruction = Instruction
12610
+
12611
+
12612
+ def _deserialize(self, params):
12613
+ self._Model = params.get("Model")
12614
+ self._Inputs = params.get("Inputs")
12615
+ self._TextType = params.get("TextType")
12616
+ self._Instruction = params.get("Instruction")
12617
+ memeber_set = set(params.keys())
12618
+ for name, value in vars(self).items():
12619
+ property_name = name[1:]
12620
+ if property_name in memeber_set:
12621
+ memeber_set.remove(property_name)
12622
+ if len(memeber_set) > 0:
12623
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
12624
+
12625
+
12626
+
12627
+ class GenerateTextEmbeddingResponse(AbstractModel):
12628
+ r"""GenerateTextEmbedding返回参数结构体
12629
+
12630
+ """
12631
+
12632
+ def __init__(self):
12633
+ r"""
12634
+ :param _Data: <p>向量化结果列表。顺序与输入 Inputs 列表一一对应。</p>
12635
+ :type Data: list of EmbeddingObject
12636
+ :param _InputTokens: <p>输入 Token 数。</p>
12637
+ :type InputTokens: int
12638
+ :param _TotalTokens: <p>总 Token 数。</p>
12639
+ :type TotalTokens: int
12640
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12641
+ :type RequestId: str
12642
+ """
12643
+ self._Data = None
12644
+ self._InputTokens = None
12645
+ self._TotalTokens = None
12646
+ self._RequestId = None
12647
+
12648
+ @property
12649
+ def Data(self):
12650
+ r"""<p>向量化结果列表。顺序与输入 Inputs 列表一一对应。</p>
12651
+ :rtype: list of EmbeddingObject
12652
+ """
12653
+ return self._Data
12654
+
12655
+ @Data.setter
12656
+ def Data(self, Data):
12657
+ self._Data = Data
12658
+
12659
+ @property
12660
+ def InputTokens(self):
12661
+ r"""<p>输入 Token 数。</p>
12662
+ :rtype: int
12663
+ """
12664
+ return self._InputTokens
12665
+
12666
+ @InputTokens.setter
12667
+ def InputTokens(self, InputTokens):
12668
+ self._InputTokens = InputTokens
12669
+
12670
+ @property
12671
+ def TotalTokens(self):
12672
+ r"""<p>总 Token 数。</p>
12673
+ :rtype: int
12674
+ """
12675
+ return self._TotalTokens
12676
+
12677
+ @TotalTokens.setter
12678
+ def TotalTokens(self, TotalTokens):
12679
+ self._TotalTokens = TotalTokens
12680
+
12681
+ @property
12682
+ def RequestId(self):
12683
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12684
+ :rtype: str
12685
+ """
12686
+ return self._RequestId
12687
+
12688
+ @RequestId.setter
12689
+ def RequestId(self, RequestId):
12690
+ self._RequestId = RequestId
12691
+
12692
+
12693
+ def _deserialize(self, params):
12694
+ if params.get("Data") is not None:
12695
+ self._Data = []
12696
+ for item in params.get("Data"):
12697
+ obj = EmbeddingObject()
12698
+ obj._deserialize(item)
12699
+ self._Data.append(obj)
12700
+ self._InputTokens = params.get("InputTokens")
12701
+ self._TotalTokens = params.get("TotalTokens")
12702
+ self._RequestId = params.get("RequestId")
12703
+
12704
+
12705
+ class GenerateVLEmbeddingRequest(AbstractModel):
12706
+ r"""GenerateVLEmbedding请求参数结构体
12707
+
12708
+ """
12709
+
12710
+ def __init__(self):
12711
+ r"""
12712
+ :param _Model: <p>选择生成向量的模型。取值:</p><ul><li>0:vl-embedding-4b</li><li>1:vl-embedding-8b</li><li>2:vl-embedding-2b</li></ul>
12713
+ :type Model: str
12714
+ :param _Type: <p>内容类型标识。取值:</p><ul><li>1:文本</li><li>2:图像 URL</li><li>3:视频 URL</li><li>4:图文混合</li></ul>
12715
+ :type Type: str
12716
+ :param _Text: <p>文本内容。仅当 Type 为 1 或 4 时必填,单条文本不超过 2000 字符。</p>
12717
+ :type Text: str
12718
+ :param _ImageUrl: <p>图像地址,支持公网 http/https 链接或 base64 内容。仅当 Type 为 2 或 4 时必填。</p>
12719
+ :type ImageUrl: str
12720
+ :param _VideoUrl: <p>视频地址,支持公网 http/https 链接或 base64 内容。仅当 Type 为 3 时必填。</p>
12721
+ :type VideoUrl: str
12722
+ :param _SearchMode: <p>检索场景,未传入该参数时将自动匹配。取值:</p><ul><li>0:自动匹配</li><li>1:图搜图(找同款、相似图),仅 Type 为 2 或 4 时可用</li><li>2:图文搜图(图 + 问题),仅 Type 为 4 时可用</li><li>3:文搜图(纯文本搜图),仅 Type 为 1 或 4 时可用</li><li>4:文搜视频(纯文本搜视频),仅 Type 为 1 或 4 时可用</li><li>5:图搜视频、图文搜视频,仅 Type 为 2 或 4 时可用</li></ul>
12723
+ :type SearchMode: str
12724
+ """
12725
+ self._Model = None
12726
+ self._Type = None
12727
+ self._Text = None
12728
+ self._ImageUrl = None
12729
+ self._VideoUrl = None
12730
+ self._SearchMode = None
12731
+
12732
+ @property
12733
+ def Model(self):
12734
+ r"""<p>选择生成向量的模型。取值:</p><ul><li>0:vl-embedding-4b</li><li>1:vl-embedding-8b</li><li>2:vl-embedding-2b</li></ul>
12735
+ :rtype: str
12736
+ """
12737
+ return self._Model
12738
+
12739
+ @Model.setter
12740
+ def Model(self, Model):
12741
+ self._Model = Model
12742
+
12743
+ @property
12744
+ def Type(self):
12745
+ r"""<p>内容类型标识。取值:</p><ul><li>1:文本</li><li>2:图像 URL</li><li>3:视频 URL</li><li>4:图文混合</li></ul>
12746
+ :rtype: str
12747
+ """
12748
+ return self._Type
12749
+
12750
+ @Type.setter
12751
+ def Type(self, Type):
12752
+ self._Type = Type
12753
+
12754
+ @property
12755
+ def Text(self):
12756
+ r"""<p>文本内容。仅当 Type 为 1 或 4 时必填,单条文本不超过 2000 字符。</p>
12757
+ :rtype: str
12758
+ """
12759
+ return self._Text
12760
+
12761
+ @Text.setter
12762
+ def Text(self, Text):
12763
+ self._Text = Text
12764
+
12765
+ @property
12766
+ def ImageUrl(self):
12767
+ r"""<p>图像地址,支持公网 http/https 链接或 base64 内容。仅当 Type 为 2 或 4 时必填。</p>
12768
+ :rtype: str
12769
+ """
12770
+ return self._ImageUrl
12771
+
12772
+ @ImageUrl.setter
12773
+ def ImageUrl(self, ImageUrl):
12774
+ self._ImageUrl = ImageUrl
12775
+
12776
+ @property
12777
+ def VideoUrl(self):
12778
+ r"""<p>视频地址,支持公网 http/https 链接或 base64 内容。仅当 Type 为 3 时必填。</p>
12779
+ :rtype: str
12780
+ """
12781
+ return self._VideoUrl
12782
+
12783
+ @VideoUrl.setter
12784
+ def VideoUrl(self, VideoUrl):
12785
+ self._VideoUrl = VideoUrl
12786
+
12787
+ @property
12788
+ def SearchMode(self):
12789
+ r"""<p>检索场景,未传入该参数时将自动匹配。取值:</p><ul><li>0:自动匹配</li><li>1:图搜图(找同款、相似图),仅 Type 为 2 或 4 时可用</li><li>2:图文搜图(图 + 问题),仅 Type 为 4 时可用</li><li>3:文搜图(纯文本搜图),仅 Type 为 1 或 4 时可用</li><li>4:文搜视频(纯文本搜视频),仅 Type 为 1 或 4 时可用</li><li>5:图搜视频、图文搜视频,仅 Type 为 2 或 4 时可用</li></ul>
12790
+ :rtype: str
12791
+ """
12792
+ return self._SearchMode
12793
+
12794
+ @SearchMode.setter
12795
+ def SearchMode(self, SearchMode):
12796
+ self._SearchMode = SearchMode
12797
+
12798
+
12799
+ def _deserialize(self, params):
12800
+ self._Model = params.get("Model")
12801
+ self._Type = params.get("Type")
12802
+ self._Text = params.get("Text")
12803
+ self._ImageUrl = params.get("ImageUrl")
12804
+ self._VideoUrl = params.get("VideoUrl")
12805
+ self._SearchMode = params.get("SearchMode")
12806
+ memeber_set = set(params.keys())
12807
+ for name, value in vars(self).items():
12808
+ property_name = name[1:]
12809
+ if property_name in memeber_set:
12810
+ memeber_set.remove(property_name)
12811
+ if len(memeber_set) > 0:
12812
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
12813
+
12814
+
12815
+
12816
+ class GenerateVLEmbeddingResponse(AbstractModel):
12817
+ r"""GenerateVLEmbedding返回参数结构体
12818
+
12819
+ """
12820
+
12821
+ def __init__(self):
12822
+ r"""
12823
+ :param _Data: <p>向量化结果列表。单条图文混合输入可能返回多个向量。</p>
12824
+ :type Data: list of EmbeddingObject
12825
+ :param _InputTokens: <p>输入 Token 数,多模态场景含图像、视频折算的 Token。</p>
12826
+ :type InputTokens: int
12827
+ :param _TotalTokens: <p>总 Token 数。</p>
12828
+ :type TotalTokens: int
12829
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12830
+ :type RequestId: str
12831
+ """
12832
+ self._Data = None
12833
+ self._InputTokens = None
12834
+ self._TotalTokens = None
12835
+ self._RequestId = None
12836
+
12837
+ @property
12838
+ def Data(self):
12839
+ r"""<p>向量化结果列表。单条图文混合输入可能返回多个向量。</p>
12840
+ :rtype: list of EmbeddingObject
12841
+ """
12842
+ return self._Data
12843
+
12844
+ @Data.setter
12845
+ def Data(self, Data):
12846
+ self._Data = Data
12847
+
12848
+ @property
12849
+ def InputTokens(self):
12850
+ r"""<p>输入 Token 数,多模态场景含图像、视频折算的 Token。</p>
12851
+ :rtype: int
12852
+ """
12853
+ return self._InputTokens
12854
+
12855
+ @InputTokens.setter
12856
+ def InputTokens(self, InputTokens):
12857
+ self._InputTokens = InputTokens
12858
+
12859
+ @property
12860
+ def TotalTokens(self):
12861
+ r"""<p>总 Token 数。</p>
12862
+ :rtype: int
12863
+ """
12864
+ return self._TotalTokens
12865
+
12866
+ @TotalTokens.setter
12867
+ def TotalTokens(self, TotalTokens):
12868
+ self._TotalTokens = TotalTokens
12869
+
12870
+ @property
12871
+ def RequestId(self):
12872
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
12873
+ :rtype: str
12874
+ """
12875
+ return self._RequestId
12876
+
12877
+ @RequestId.setter
12878
+ def RequestId(self, RequestId):
12879
+ self._RequestId = RequestId
12880
+
12881
+
12882
+ def _deserialize(self, params):
12883
+ if params.get("Data") is not None:
12884
+ self._Data = []
12885
+ for item in params.get("Data"):
12886
+ obj = EmbeddingObject()
12887
+ obj._deserialize(item)
12888
+ self._Data.append(obj)
12889
+ self._InputTokens = params.get("InputTokens")
12890
+ self._TotalTokens = params.get("TotalTokens")
12891
+ self._RequestId = params.get("RequestId")
12892
+
12893
+
12495
12894
  class GetOCRResultRequest(AbstractModel):
12496
12895
  r"""GetOCRResult请求参数结构体
12497
12896
 
@@ -643,7 +643,7 @@ class OcrClient(AbstractClient):
643
643
 
644
644
  def GeneralBasicOCR(self, request):
645
645
  r"""**建议您使用识别效果更好的[通用文字识别(高精度版](https://cloud.tencent.com/document/product/866/34937 ))**
646
- 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语,阿拉伯语20种语言,且各种语言均支持与英文混合的文字识别。
646
+ 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语、印地语、阿拉伯语21种语言,且各种语言均支持与英文混合的文字识别。
647
647
 
648
648
  适用于印刷文档识别、网络图片识别、广告图文字识别、街景店招牌识别、菜单识别、视频标题识别、头像文字识别等场景。
649
649
 
@@ -676,8 +676,8 @@ class OcrClient(AbstractClient):
676
676
  </tr>
677
677
  <tr>
678
678
  <td>支持的语言</td>
679
- <td>中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语</td>
680
- <td>中文、英文、中英文、泰语、印尼语、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、哈萨克语</td>
679
+ <td>中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语、印地语、阿拉伯语</td>
680
+ <td>中文、英文、中英文、泰语、印尼语、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、哈萨克语、藏语、阿拉伯语、维吾尔语、捷克语、希腊语、希伯来语、克罗地亚语、波兰语、罗马尼亚语、斯洛伐克语、斯洛文尼亚语、土耳其语、保加利亚语、爱沙尼亚语、拉脱维亚语、立陶宛语、乌尔都文、塞尔维亚文、欧西坦文、毛利文、阿尔巴尼亚文、斯瓦希里文、乌兹别克文、乌克兰文、阿巴扎文、南非荷兰文、威尔士文、冰岛文、库尔德文、达尔瓦文、因古什文、拉克文、莱兹甘文、塔巴萨兰文、沙特阿拉伯文、阿瓦尔文、阿迪赫文、印度-古吉拉特语、印度-印地语、印度-孟加拉语、印度-卡纳达语、印度-马拉亚拉姆语、印度-马拉地语、印度-旁遮普语、印度-泰米尔语、印度-泰卢固语、阿塞拜疆语、波斯尼亚语、加泰罗尼亚语、卢森堡语、马耳他语、爱尔兰语、白俄罗斯语、高棉语、他加禄语、普什图语、波斯语、塔吉克斯坦语、尼泊尔语、尼瓦尔语、梵语、马其顿语、柯尔克孜语、车臣语、鞑靼语、加利西亚语、马达加斯加语、老挝、巴什基尔文、马里文、奥塞梯文、布里亚特文、楚瓦什文、萨达里文、马加希文、约鲁巴文、巴利文、博杰普尔文、迈蒂利文、孔卡尼文、比哈尔文</td>
681
681
  </tr>
682
682
  <tr>
683
683
  <td>自动语言检测</td>
@@ -856,6 +856,52 @@ class OcrClient(AbstractClient):
856
856
  raise TencentCloudSDKException(type(e).__name__, str(e))
857
857
 
858
858
 
859
+ def GenerateTextEmbedding(self, request):
860
+ r"""本接口调用文本向量模型,将文本转换为数值表示的向量,可用于文本检索、RAG 召回、相似度计算等场景。
861
+
862
+ :param request: Request instance for GenerateTextEmbedding.
863
+ :type request: :class:`tencentcloud.ocr.v20181119.models.GenerateTextEmbeddingRequest`
864
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.GenerateTextEmbeddingResponse`
865
+
866
+ """
867
+ try:
868
+ params = request._serialize()
869
+ headers = request.headers
870
+ body = self.call("GenerateTextEmbedding", params, headers=headers)
871
+ response = json.loads(body)
872
+ model = models.GenerateTextEmbeddingResponse()
873
+ model._deserialize(response["Response"])
874
+ return model
875
+ except Exception as e:
876
+ if isinstance(e, TencentCloudSDKException):
877
+ raise
878
+ else:
879
+ raise TencentCloudSDKException(type(e).__name__, str(e))
880
+
881
+
882
+ def GenerateVLEmbedding(self, request):
883
+ r"""本接口基于多模态向量模型,支持文本、图片、视频及图文混合输入并转换为向量,可用于跨模态检索、RAG 召回、相似度计算与聚类分析等场景。
884
+
885
+ :param request: Request instance for GenerateVLEmbedding.
886
+ :type request: :class:`tencentcloud.ocr.v20181119.models.GenerateVLEmbeddingRequest`
887
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.GenerateVLEmbeddingResponse`
888
+
889
+ """
890
+ try:
891
+ params = request._serialize()
892
+ headers = request.headers
893
+ body = self.call("GenerateVLEmbedding", params, headers=headers)
894
+ response = json.loads(body)
895
+ model = models.GenerateVLEmbeddingResponse()
896
+ model._deserialize(response["Response"])
897
+ return model
898
+ except Exception as e:
899
+ if isinstance(e, TencentCloudSDKException):
900
+ raise
901
+ else:
902
+ raise TencentCloudSDKException(type(e).__name__, str(e))
903
+
904
+
859
905
  def GetOCRResult(self, request):
860
906
  r"""获取ocr结果
861
907
 
@@ -527,7 +527,7 @@ class OcrClient(AbstractClient):
527
527
  ) -> models.GeneralBasicOCRResponse:
528
528
  """
529
529
  **建议您使用识别效果更好的[通用文字识别(高精度版](https://cloud.tencent.com/document/product/866/34937 ))**
530
- 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语,阿拉伯语20种语言,且各种语言均支持与英文混合的文字识别。
530
+ 本接口支持图像整体文字的检测和识别。可以识别中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语、印地语、阿拉伯语21种语言,且各种语言均支持与英文混合的文字识别。
531
531
 
532
532
  适用于印刷文档识别、网络图片识别、广告图文字识别、街景店招牌识别、菜单识别、视频标题识别、头像文字识别等场景。
533
533
 
@@ -560,8 +560,8 @@ class OcrClient(AbstractClient):
560
560
  </tr>
561
561
  <tr>
562
562
  <td>支持的语言</td>
563
- <td>中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语</td>
564
- <td>中文、英文、中英文、泰语、印尼语、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、哈萨克语</td>
563
+ <td>中文、英文、中英文、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、泰语、印地语、阿拉伯语</td>
564
+ <td>中文、英文、中英文、泰语、印尼语、日语、韩语、西班牙语、法语、德语、葡萄牙语、越南语、马来语、俄语、意大利语、荷兰语、瑞典语、芬兰语、丹麦语、挪威语、匈牙利语、哈萨克语、藏语、阿拉伯语、维吾尔语、捷克语、希腊语、希伯来语、克罗地亚语、波兰语、罗马尼亚语、斯洛伐克语、斯洛文尼亚语、土耳其语、保加利亚语、爱沙尼亚语、拉脱维亚语、立陶宛语、乌尔都文、塞尔维亚文、欧西坦文、毛利文、阿尔巴尼亚文、斯瓦希里文、乌兹别克文、乌克兰文、阿巴扎文、南非荷兰文、威尔士文、冰岛文、库尔德文、达尔瓦文、因古什文、拉克文、莱兹甘文、塔巴萨兰文、沙特阿拉伯文、阿瓦尔文、阿迪赫文、印度-古吉拉特语、印度-印地语、印度-孟加拉语、印度-卡纳达语、印度-马拉亚拉姆语、印度-马拉地语、印度-旁遮普语、印度-泰米尔语、印度-泰卢固语、阿塞拜疆语、波斯尼亚语、加泰罗尼亚语、卢森堡语、马耳他语、爱尔兰语、白俄罗斯语、高棉语、他加禄语、普什图语、波斯语、塔吉克斯坦语、尼泊尔语、尼瓦尔语、梵语、马其顿语、柯尔克孜语、车臣语、鞑靼语、加利西亚语、马达加斯加语、老挝、巴什基尔文、马里文、奥塞梯文、布里亚特文、楚瓦什文、萨达里文、马加希文、约鲁巴文、巴利文、博杰普尔文、迈蒂利文、孔卡尼文、比哈尔文</td>
565
565
  </tr>
566
566
  <tr>
567
567
  <td>自动语言检测</td>
@@ -715,6 +715,42 @@ class OcrClient(AbstractClient):
715
715
 
716
716
  return await self.call_and_deserialize(**kwargs)
717
717
 
718
+ async def GenerateTextEmbedding(
719
+ self,
720
+ request: models.GenerateTextEmbeddingRequest,
721
+ opts: Dict = None,
722
+ ) -> models.GenerateTextEmbeddingResponse:
723
+ """
724
+ 本接口调用文本向量模型,将文本转换为数值表示的向量,可用于文本检索、RAG 召回、相似度计算等场景。
725
+ """
726
+
727
+ kwargs = {}
728
+ kwargs["action"] = "GenerateTextEmbedding"
729
+ kwargs["params"] = request._serialize()
730
+ kwargs["resp_cls"] = models.GenerateTextEmbeddingResponse
731
+ kwargs["headers"] = request.headers
732
+ kwargs["opts"] = opts or {}
733
+
734
+ return await self.call_and_deserialize(**kwargs)
735
+
736
+ async def GenerateVLEmbedding(
737
+ self,
738
+ request: models.GenerateVLEmbeddingRequest,
739
+ opts: Dict = None,
740
+ ) -> models.GenerateVLEmbeddingResponse:
741
+ """
742
+ 本接口基于多模态向量模型,支持文本、图片、视频及图文混合输入并转换为向量,可用于跨模态检索、RAG 召回、相似度计算与聚类分析等场景。
743
+ """
744
+
745
+ kwargs = {}
746
+ kwargs["action"] = "GenerateVLEmbedding"
747
+ kwargs["params"] = request._serialize()
748
+ kwargs["resp_cls"] = models.GenerateVLEmbeddingResponse
749
+ kwargs["headers"] = request.headers
750
+ kwargs["opts"] = opts or {}
751
+
752
+ return await self.call_and_deserialize(**kwargs)
753
+
718
754
  async def GetOCRResult(
719
755
  self,
720
756
  request: models.GetOCRResultRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.200
3
+ Version: 3.1.202
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.200
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.202
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.202
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.200