pyconverters-openai_vision 0.5.32__py3-none-any.whl → 0.5.34__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.
- pyconverters_openai_vision/__init__.py +1 -1
- pyconverters_openai_vision/openai_vision.py +6 -5
- {pyconverters_openai_vision-0.5.32.dist-info → pyconverters_openai_vision-0.5.34.dist-info}/METADATA +1 -1
- pyconverters_openai_vision-0.5.34.dist-info/RECORD +7 -0
- pyconverters_openai_vision-0.5.32.dist-info/RECORD +0 -7
- {pyconverters_openai_vision-0.5.32.dist-info → pyconverters_openai_vision-0.5.34.dist-info}/WHEEL +0 -0
- {pyconverters_openai_vision-0.5.32.dist-info → pyconverters_openai_vision-0.5.34.dist-info}/entry_points.txt +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""OpenAIVision converter"""
|
|
2
|
-
__version__ = "0.5.
|
|
2
|
+
__version__ = "0.5.34"
|
|
@@ -155,7 +155,7 @@ class OpenAIVisionConverterBase(ConverterBase):
|
|
|
155
155
|
binary_block = {
|
|
156
156
|
"type": "image_url",
|
|
157
157
|
"image_url": {
|
|
158
|
-
"url": f"data:
|
|
158
|
+
"url": f"data:{kind.mime};base64,{rv.decode('utf-8')}"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
messages = [{"role": "system", "content": params.system_prompt}] if params.system_prompt is not None else []
|
|
@@ -299,12 +299,12 @@ class OpenAIVisionProcessorBaseParameters(ProcessorParameters):
|
|
|
299
299
|
extra="advanced"
|
|
300
300
|
)
|
|
301
301
|
system_prompt: str = Field(
|
|
302
|
-
|
|
302
|
+
None,
|
|
303
303
|
description="""Contains the system prompt""",
|
|
304
304
|
extra="multiline,advanced",
|
|
305
305
|
)
|
|
306
306
|
prompt: str = Field(
|
|
307
|
-
|
|
307
|
+
"Generate a textual description of the image",
|
|
308
308
|
description="""Contains the prompt""",
|
|
309
309
|
extra="multiline",
|
|
310
310
|
)
|
|
@@ -446,8 +446,9 @@ class OpenAIVisionProcessorBase(ProcessorBase):
|
|
|
446
446
|
m = matchobj.group(0)
|
|
447
447
|
m_id = matchobj.group(1)
|
|
448
448
|
if m_id in alts:
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
# markdown blockquote
|
|
450
|
+
m_desc = "\n".join(["> " + li for li in alts[m_id].splitlines()])
|
|
451
|
+
return f"{m}\n{m_desc}\n"
|
|
451
452
|
return m
|
|
452
453
|
|
|
453
454
|
ptext = re.sub(link_regex, convert_links, text, 0,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pyconverters_openai_vision/__init__.py,sha256=P6tzrDdFYeRIdqRSjEScaB_11FMag8S6GgFb3bfoV3E,52
|
|
2
|
+
pyconverters_openai_vision/openai_utils.py,sha256=XI4WYZ-EAVG0Vxd5yUDuZNDgEzqHJeriScxTUusi1oo,7740
|
|
3
|
+
pyconverters_openai_vision/openai_vision.py,sha256=1wrjAhTpHdldkcW8BtdZhUgKowJPAoFoP4lQjKPI9nA,23330
|
|
4
|
+
pyconverters_openai_vision-0.5.34.dist-info/entry_points.txt,sha256=NR0re-yebKKyhApky1I6nDQzjJQfEyfOkJlJju0Ngzo,404
|
|
5
|
+
pyconverters_openai_vision-0.5.34.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
6
|
+
pyconverters_openai_vision-0.5.34.dist-info/METADATA,sha256=xChsPy5Twbdqi4lcwrQfvQxRf8BAe_8qWyawpUNIdn0,2662
|
|
7
|
+
pyconverters_openai_vision-0.5.34.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pyconverters_openai_vision/__init__.py,sha256=u1qzNNU3oXNQEdCLbHC2tSiBYPkFG6jkkixct0t9Zwo,52
|
|
2
|
-
pyconverters_openai_vision/openai_utils.py,sha256=XI4WYZ-EAVG0Vxd5yUDuZNDgEzqHJeriScxTUusi1oo,7740
|
|
3
|
-
pyconverters_openai_vision/openai_vision.py,sha256=OGr1veVTxgWxxClMNXeNCiuVrBhGA5ZpjbsoThRMXn8,23231
|
|
4
|
-
pyconverters_openai_vision-0.5.32.dist-info/entry_points.txt,sha256=NR0re-yebKKyhApky1I6nDQzjJQfEyfOkJlJju0Ngzo,404
|
|
5
|
-
pyconverters_openai_vision-0.5.32.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
6
|
-
pyconverters_openai_vision-0.5.32.dist-info/METADATA,sha256=spGRRfpd6RtKo3OJWmsXRv90ENoJpraJ9UtYS8NbYqg,2662
|
|
7
|
-
pyconverters_openai_vision-0.5.32.dist-info/RECORD,,
|
{pyconverters_openai_vision-0.5.32.dist-info → pyconverters_openai_vision-0.5.34.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|