mirascope 1.25.0__py3-none-any.whl → 1.25.2__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.
- mirascope/core/google/_utils/_convert_message_params.py +25 -7
- mirascope/integrations/langfuse/_utils.py +1 -1
- {mirascope-1.25.0.dist-info → mirascope-1.25.2.dist-info}/METADATA +1 -1
- {mirascope-1.25.0.dist-info → mirascope-1.25.2.dist-info}/RECORD +6 -6
- {mirascope-1.25.0.dist-info → mirascope-1.25.2.dist-info}/WHEEL +0 -0
- {mirascope-1.25.0.dist-info → mirascope-1.25.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -89,7 +89,10 @@ async def _convert_message_params_async(
|
|
|
89
89
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
90
90
|
image_size = len(part.image)
|
|
91
91
|
total_payload_size += image_size
|
|
92
|
-
if
|
|
92
|
+
if (
|
|
93
|
+
_over_file_size_limit(total_payload_size)
|
|
94
|
+
and not client.vertexai
|
|
95
|
+
):
|
|
93
96
|
must_upload[index] = blob_dict
|
|
94
97
|
total_payload_size -= image_size
|
|
95
98
|
elif part.type == "image_url":
|
|
@@ -115,7 +118,10 @@ async def _convert_message_params_async(
|
|
|
115
118
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
116
119
|
image_size = len(downloaded_image)
|
|
117
120
|
total_payload_size += image_size
|
|
118
|
-
if
|
|
121
|
+
if (
|
|
122
|
+
_over_file_size_limit(total_payload_size)
|
|
123
|
+
and not client.vertexai
|
|
124
|
+
):
|
|
119
125
|
must_upload[index] = blob_dict
|
|
120
126
|
total_payload_size -= image_size
|
|
121
127
|
elif part.type == "audio":
|
|
@@ -129,7 +135,10 @@ async def _convert_message_params_async(
|
|
|
129
135
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
130
136
|
audio_size = len(audio_data)
|
|
131
137
|
total_payload_size += audio_size
|
|
132
|
-
if
|
|
138
|
+
if (
|
|
139
|
+
_over_file_size_limit(total_payload_size)
|
|
140
|
+
and not client.vertexai
|
|
141
|
+
):
|
|
133
142
|
must_upload[index] = blob_dict
|
|
134
143
|
total_payload_size -= audio_size
|
|
135
144
|
elif part.type == "audio_url":
|
|
@@ -155,7 +164,10 @@ async def _convert_message_params_async(
|
|
|
155
164
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
156
165
|
audio_size = len(downloaded_audio)
|
|
157
166
|
total_payload_size += audio_size
|
|
158
|
-
if
|
|
167
|
+
if (
|
|
168
|
+
_over_file_size_limit(total_payload_size)
|
|
169
|
+
and not client.vertexai
|
|
170
|
+
):
|
|
159
171
|
must_upload[index] = blob_dict
|
|
160
172
|
total_payload_size -= audio_size
|
|
161
173
|
elif part.type == "document":
|
|
@@ -164,7 +176,10 @@ async def _convert_message_params_async(
|
|
|
164
176
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
165
177
|
document_size = len(part.document)
|
|
166
178
|
total_payload_size += document_size
|
|
167
|
-
if
|
|
179
|
+
if (
|
|
180
|
+
_over_file_size_limit(total_payload_size)
|
|
181
|
+
and not client.vertexai
|
|
182
|
+
):
|
|
168
183
|
must_upload[index] = blob_dict
|
|
169
184
|
total_payload_size -= document_size
|
|
170
185
|
elif part.type == "document_url":
|
|
@@ -218,7 +233,10 @@ async def _convert_message_params_async(
|
|
|
218
233
|
converted_content.append(PartDict(inline_data=blob_dict))
|
|
219
234
|
document_size = len(downloaded_document)
|
|
220
235
|
total_payload_size += document_size
|
|
221
|
-
if
|
|
236
|
+
if (
|
|
237
|
+
_over_file_size_limit(total_payload_size)
|
|
238
|
+
and not client.vertexai
|
|
239
|
+
):
|
|
222
240
|
must_upload[index] = blob_dict
|
|
223
241
|
total_payload_size -= document_size
|
|
224
242
|
except ValueError as e:
|
|
@@ -233,7 +251,7 @@ async def _convert_message_params_async(
|
|
|
233
251
|
f"Part provided: {part.type}"
|
|
234
252
|
)
|
|
235
253
|
|
|
236
|
-
if must_upload:
|
|
254
|
+
if must_upload and not client.vertexai:
|
|
237
255
|
indices, blob_dicts = zip(*must_upload.items(), strict=True)
|
|
238
256
|
upload_tasks = [
|
|
239
257
|
client.aio.files.upload(
|
|
@@ -222,7 +222,7 @@ mirascope/core/google/tool.py,sha256=61a9Ejdxz41pwaab9VE2yvP_J1Aebua3BeRPJ_GJSnE
|
|
|
222
222
|
mirascope/core/google/_utils/__init__.py,sha256=vL0hx6WKW5lqpUcFTFCFGvmwtR-pts0JzWgCXhaUVrI,388
|
|
223
223
|
mirascope/core/google/_utils/_convert_common_call_params.py,sha256=TF7GWBHcpfzb7XmrxKp3gnaONITYF93lqr4XkSVz_uU,1195
|
|
224
224
|
mirascope/core/google/_utils/_convert_finish_reason_to_common_finish_reasons.py,sha256=ig4tb7Zanz-tyZpvc9Ncd47a2FNTOS7-wl1PYBq-4cY,879
|
|
225
|
-
mirascope/core/google/_utils/_convert_message_params.py,sha256=
|
|
225
|
+
mirascope/core/google/_utils/_convert_message_params.py,sha256=n0EbY3QPd4cpYRxWMDwV5s79Lqoj5d2CrcqUOdmn5Jg,13435
|
|
226
226
|
mirascope/core/google/_utils/_get_json_output.py,sha256=sxDgT0Ra6YJynL5_hhakf0dNJEhZm0DfAgfcvC_DAFU,1596
|
|
227
227
|
mirascope/core/google/_utils/_handle_stream.py,sha256=xTaQvAWnJ195YI_h68USvit4-G8T_fogmtBZFhu1qoE,2238
|
|
228
228
|
mirascope/core/google/_utils/_message_param_converter.py,sha256=8N3etkSjoyU0wxcGVw13A5EtI7iphBD4pHG87iUCkZg,8094
|
|
@@ -325,7 +325,7 @@ mirascope/integrations/__init__.py,sha256=ieLWknpbkO_gABIVl9790YTTCCRO9ISQ35-1Se
|
|
|
325
325
|
mirascope/integrations/_middleware_factory.py,sha256=v-S-hVU5S7P9Lu8PiKyUhmtp_rbQaIJ1droC8BcKBAE,17362
|
|
326
326
|
mirascope/integrations/tenacity.py,sha256=jk64MBncCMbgoQMaXQgjxg9Y9UstRqTt2RCeA86pdCU,326
|
|
327
327
|
mirascope/integrations/langfuse/__init__.py,sha256=wG3eBXwGPbFedB28L1K_q1iCf_dERjVmTDCWK4nHZyM,71
|
|
328
|
-
mirascope/integrations/langfuse/_utils.py,sha256=
|
|
328
|
+
mirascope/integrations/langfuse/_utils.py,sha256=FPqmiBhzWKitFXn6RkWJ1unH8z_ebNLtaBuRD73fQLs,3430
|
|
329
329
|
mirascope/integrations/langfuse/_with_langfuse.py,sha256=UTA--jCB9K8SqUmaVz_X_rBJA9W0adpbrPWJtPOFU-4,1880
|
|
330
330
|
mirascope/integrations/logfire/__init__.py,sha256=OWceKOygazwUG1XLGvSu3T2-AqnuBxf3--fbwGZ1G9o,68
|
|
331
331
|
mirascope/integrations/logfire/_utils.py,sha256=2BU37ucJPPYviQvMbrD0Qcqhh5hLifYN7PeaBK4bAk0,7108
|
|
@@ -372,7 +372,7 @@ mirascope/v0/base/ops_utils.py,sha256=1Qq-VIwgHBaYutiZsS2MUQ4OgPC3APyywI5bTiTAmA
|
|
|
372
372
|
mirascope/v0/base/prompts.py,sha256=FM2Yz98cSnDceYogiwPrp4BALf3_F3d4fIOCGAkd-SE,1298
|
|
373
373
|
mirascope/v0/base/types.py,sha256=ZfatJoX0Yl0e3jhv0D_MhiSVHLYUeJsdN3um3iE10zY,352
|
|
374
374
|
mirascope/v0/base/utils.py,sha256=XREPENRQTu8gpMhHU8RC8qH_am3FfGUvY-dJ6x8i-mw,681
|
|
375
|
-
mirascope-1.25.
|
|
376
|
-
mirascope-1.25.
|
|
377
|
-
mirascope-1.25.
|
|
378
|
-
mirascope-1.25.
|
|
375
|
+
mirascope-1.25.2.dist-info/METADATA,sha256=W50ljUZ7Z282KVFZgscctAPh8Tm5OBqlrjLpWvnvG-g,8542
|
|
376
|
+
mirascope-1.25.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
377
|
+
mirascope-1.25.2.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
|
|
378
|
+
mirascope-1.25.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|