pyconverters-openai_vision 0.5.24__py3-none-any.whl → 0.5.26__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.24"
2
+ __version__ = "0.5.26"
@@ -276,9 +276,78 @@ def guess_kind(base64_src):
276
276
  return kind
277
277
 
278
278
 
279
- class OpenAIVisionProcessorBaseParameters(OpenAIVisionBaseParameters):
279
+ class OpenAIVisionProcessorBaseParameters(ConverterParameters):
280
+ base_url: str = Field(
281
+ None,
282
+ description="""OpenAI endpoint base url""", extra="advanced"
283
+ )
284
+ model_str: str = Field(
285
+ None, extra="advanced"
286
+ )
287
+ model: str = Field(
288
+ None, extra="internal"
289
+ )
290
+ prompt: str = Field(
291
+ """If the attached file is an image: describe the image.""",
292
+ description="""Contains the prompt as a string""",
293
+ extra="multiline",
294
+ )
295
+ max_tokens: int = Field(
296
+ 16384,
297
+ description="""The maximum number of tokens to generate in the completion.
298
+ The token count of your prompt plus max_tokens cannot exceed the model's context length.
299
+ Most models have a context length of 2048 tokens (except for the newest models, which support 4096).""",
300
+ )
301
+ system_prompt: str = Field(
302
+ None,
303
+ description="""Contains the system prompt""",
304
+ extra="multiline,advanced",
305
+ )
306
+ temperature: float = Field(
307
+ 0.1,
308
+ description="""What sampling temperature to use, between 0 and 2.
309
+ Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
310
+ We generally recommend altering this or `top_p` but not both.""",
311
+ extra="advanced",
312
+ )
313
+ top_p: int = Field(
314
+ 1,
315
+ description="""An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
316
+ So 0.1 means only the tokens comprising the top 10% probability mass are considered.
317
+ We generally recommend altering this or `temperature` but not both.""",
318
+ extra="advanced",
319
+ )
320
+ n: int = Field(
321
+ 1,
322
+ description="""How many completions to generate for each prompt.
323
+ Note: Because this parameter generates many completions, it can quickly consume your token quota.
324
+ Use carefully and ensure that you have reasonable settings for `max_tokens`.""",
325
+ extra="advanced",
326
+ )
327
+ best_of: int = Field(
328
+ 1,
329
+ description="""Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token).
330
+ Results cannot be streamed.
331
+ When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.
332
+ Use carefully and ensure that you have reasonable settings for `max_tokens`.""",
333
+ extra="advanced",
334
+ )
335
+ presence_penalty: float = Field(
336
+ 0.0,
337
+ description="""Number between -2.0 and 2.0.
338
+ Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.""",
339
+ extra="advanced",
340
+ )
341
+ frequency_penalty: float = Field(
342
+ 0.0,
343
+ description="""Number between -2.0 and 2.0.
344
+ 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
+ extra="advanced",
346
+ )
280
347
  replace_refs_altTexts_by_descriptions: bool = Field(
281
- True, extra="advanced"
348
+ True,
349
+ description="""Replace references to images in text by their textual description.""",
350
+ extra="advanced"
282
351
  )
283
352
 
284
353
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyconverters-openai_vision
3
- Version: 0.5.24
3
+ Version: 0.5.26
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=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,,
@@ -1,7 +0,0 @@
1
- pyconverters_openai_vision/__init__.py,sha256=xQAq326JkkX94JOt1NmFidqufggdvwWjcdyDpsiC4ms,52
2
- pyconverters_openai_vision/openai_utils.py,sha256=XI4WYZ-EAVG0Vxd5yUDuZNDgEzqHJeriScxTUusi1oo,7740
3
- pyconverters_openai_vision/openai_vision.py,sha256=a4ONHPcqA_0Cra65Mghq7rVXTQJop4F4LwUFqJnd_-k,20058
4
- pyconverters_openai_vision-0.5.24.dist-info/entry_points.txt,sha256=KLlvDTMJjHy0fk6mvTXFNpn0pC8UKsTJLd9wre9SOHw,394
5
- pyconverters_openai_vision-0.5.24.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
6
- pyconverters_openai_vision-0.5.24.dist-info/METADATA,sha256=qABOPx8HHRlK8NXO1TpluXBt3I82x8iLl90pwMU8XLY,2662
7
- pyconverters_openai_vision-0.5.24.dist-info/RECORD,,