pyconverters-openai_vision 0.5.26__py3-none-any.whl → 0.5.30__py3-none-any.whl

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.
@@ -1,2 +1,2 @@
1
1
  """OpenAIVision converter"""
2
- __version__ = "0.5.26"
2
+ __version__ = "0.5.30"
@@ -276,7 +276,7 @@ def guess_kind(base64_src):
276
276
  return kind
277
277
 
278
278
 
279
- class OpenAIVisionProcessorBaseParameters(ConverterParameters):
279
+ class OpenAIVisionProcessorBaseParameters(ProcessorParameters):
280
280
  base_url: str = Field(
281
281
  None,
282
282
  description="""OpenAI endpoint base url""", extra="advanced"
@@ -298,6 +298,11 @@ class OpenAIVisionProcessorBaseParameters(ConverterParameters):
298
298
  The token count of your prompt plus max_tokens cannot exceed the model's context length.
299
299
  Most models have a context length of 2048 tokens (except for the newest models, which support 4096).""",
300
300
  )
301
+ replace_refs_altTexts_by_descriptions: bool = Field(
302
+ True,
303
+ description="""Replace references to images in text by their textual description.""",
304
+ extra="advanced"
305
+ )
301
306
  system_prompt: str = Field(
302
307
  None,
303
308
  description="""Contains the system prompt""",
@@ -344,11 +349,6 @@ class OpenAIVisionProcessorBaseParameters(ConverterParameters):
344
349
  Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.""",
345
350
  extra="advanced",
346
351
  )
347
- replace_refs_altTexts_by_descriptions: bool = Field(
348
- True,
349
- description="""Replace references to images in text by their textual description.""",
350
- extra="advanced"
351
- )
352
352
 
353
353
 
354
354
  class OpenAIVisionProcessorBase(ProcessorBase):
@@ -421,7 +421,7 @@ class OpenAIVisionProcessorBase(ProcessorBase):
421
421
  with add_logging_context(docid=document.identifier):
422
422
  if document.altTexts:
423
423
  altTexts = document.altTexts
424
- alts = {altText.name: altText.text for altText in document.altTexts}
424
+ alts = {altText.name: altText.text for altText in altTexts}
425
425
  anames = list(alts.keys())
426
426
  for aname in anames:
427
427
  atext = alts[aname]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyconverters-openai_vision
3
- Version: 0.5.26
3
+ Version: 0.5.30
4
4
  Summary: OpenAIVision converter
5
5
  Home-page: https://kairntech.com/
6
6
  Author: Olivier Terrier
@@ -0,0 +1,7 @@
1
+ pyconverters_openai_vision/__init__.py,sha256=YpBtaTvYkHfd21ln1wvLKLx4cODmfZCfNczh0p6hISg,52
2
+ pyconverters_openai_vision/openai_utils.py,sha256=XI4WYZ-EAVG0Vxd5yUDuZNDgEzqHJeriScxTUusi1oo,7740
3
+ pyconverters_openai_vision/openai_vision.py,sha256=j4-Y-h5eXxLt59UpRARxYB1__pF4mSNN8n_N-HxKwD0,23257
4
+ pyconverters_openai_vision-0.5.30.dist-info/entry_points.txt,sha256=KLlvDTMJjHy0fk6mvTXFNpn0pC8UKsTJLd9wre9SOHw,394
5
+ pyconverters_openai_vision-0.5.30.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
6
+ pyconverters_openai_vision-0.5.30.dist-info/METADATA,sha256=3bIoR_kFbNusWyEaFe-IE5WxzSu9hHjxDidDqzH7vds,2662
7
+ pyconverters_openai_vision-0.5.30.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pyconverters_openai_vision/__init__.py,sha256=PnExq8jYKRFvTtXW450BmUzu8pb8Qz5pbp741yExhHE,52
2
- pyconverters_openai_vision/openai_utils.py,sha256=XI4WYZ-EAVG0Vxd5yUDuZNDgEzqHJeriScxTUusi1oo,7740
3
- pyconverters_openai_vision/openai_vision.py,sha256=jrz6fZnoQvCPVxmKdU_YSFBYBXSi9Nx1c5SzUFJd8G0,23266
4
- pyconverters_openai_vision-0.5.26.dist-info/entry_points.txt,sha256=KLlvDTMJjHy0fk6mvTXFNpn0pC8UKsTJLd9wre9SOHw,394
5
- pyconverters_openai_vision-0.5.26.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
6
- pyconverters_openai_vision-0.5.26.dist-info/METADATA,sha256=jVR83Tc8dQsrNuBtSe6go9Wh_1uDPVhiS89YBiIyM2g,2662
7
- pyconverters_openai_vision-0.5.26.dist-info/RECORD,,