mirascope 1.25.2__py3-none-any.whl → 1.25.4__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/base/_utils/_extract_tool_return.py +2 -2
- mirascope/mcp/_utils.py +6 -1
- {mirascope-1.25.2.dist-info → mirascope-1.25.4.dist-info}/METADATA +1 -1
- {mirascope-1.25.2.dist-info → mirascope-1.25.4.dist-info}/RECORD +6 -6
- {mirascope-1.25.2.dist-info → mirascope-1.25.4.dist-info}/WHEEL +0 -0
- {mirascope-1.25.2.dist-info → mirascope-1.25.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -26,8 +26,8 @@ def extract_tool_return(
|
|
|
26
26
|
json_output.encode(),
|
|
27
27
|
partial_mode="trailing-strings" if allow_partial else "off",
|
|
28
28
|
)
|
|
29
|
-
if isinstance(json_output, str)
|
|
30
|
-
else json_output
|
|
29
|
+
if json_output and isinstance(json_output, str)
|
|
30
|
+
else json_output or {}
|
|
31
31
|
)
|
|
32
32
|
if is_base_type(response_model):
|
|
33
33
|
temp_model = convert_base_type_to_base_tool(response_model, BaseModel)
|
mirascope/mcp/_utils.py
CHANGED
|
@@ -241,7 +241,12 @@ def create_tool_from_mcp_tool(tool: MCPTool) -> type[BaseTool]:
|
|
|
241
241
|
|
|
242
242
|
fields[field_name] = (field_type, Field(**field_info))
|
|
243
243
|
|
|
244
|
-
return create_model(
|
|
244
|
+
return create_model(
|
|
245
|
+
snake_to_pascal(tool.name),
|
|
246
|
+
__base__=BaseTool,
|
|
247
|
+
__doc__=tool.description,
|
|
248
|
+
**fields,
|
|
249
|
+
)
|
|
245
250
|
|
|
246
251
|
|
|
247
252
|
@asynccontextmanager
|
|
@@ -114,7 +114,7 @@ mirascope/core/base/_utils/_convert_function_to_base_tool.py,sha256=squjro0oxwXO
|
|
|
114
114
|
mirascope/core/base/_utils/_convert_messages_to_message_params.py,sha256=9gys7ZPBAiuQH5hdi4_bL0KH32Q96fESyKDW5S0-9Js,4532
|
|
115
115
|
mirascope/core/base/_utils/_convert_provider_finish_reason_to_finish_reason.py,sha256=Mki5mYbYX8vUW-oosC4PaRNUHW_T5xAQWti3_1ndtTk,611
|
|
116
116
|
mirascope/core/base/_utils/_default_tool_docstring.py,sha256=JLyryjGDaHMU-P7gUpnjkPyELCQsQgi8AP4Dp_yXPOM,277
|
|
117
|
-
mirascope/core/base/_utils/_extract_tool_return.py,sha256=
|
|
117
|
+
mirascope/core/base/_utils/_extract_tool_return.py,sha256=HYx7F7JIDonr4n4_1DWpNeZl4kaD0OdwlmdzV3qmHDk,1575
|
|
118
118
|
mirascope/core/base/_utils/_fn_is_async.py,sha256=dMrvkwqyyNhuaQUHtNMxpMoBoHqZuHPbh4nqfK-KKi0,728
|
|
119
119
|
mirascope/core/base/_utils/_format_template.py,sha256=3l0Iq1LxQhocR588bzUDtfLalfiq_Rw_tHrVdgoZHiA,1061
|
|
120
120
|
mirascope/core/base/_utils/_get_audio_type.py,sha256=PN8MlgKgl5OIDANgSUlI4UarLkfBHfWmWWls9shPM8M,683
|
|
@@ -345,7 +345,7 @@ mirascope/llm/call_response_chunk.py,sha256=bZwO43ipc6PO1VLgGSaAPRqCIUyZD_Ty5oxd
|
|
|
345
345
|
mirascope/llm/stream.py,sha256=GtUKyLBlKqqZTOKjdL9FLInCXJ0ZOEAe6nymbjKwyTQ,5293
|
|
346
346
|
mirascope/llm/tool.py,sha256=MQRJBPhP1d-OyOz3PE_VsKmSXca0chySyYO1U9OW8ck,1824
|
|
347
347
|
mirascope/mcp/__init__.py,sha256=1tvG-fRD-_mr2vF3M49OgTLR7Vw8zdT6LucxnY4prF8,282
|
|
348
|
-
mirascope/mcp/_utils.py,sha256=
|
|
348
|
+
mirascope/mcp/_utils.py,sha256=yLTSGApgzTq-0jrU3bkORlaCG4XvhaFhsfr4YZpT2gA,9455
|
|
349
349
|
mirascope/mcp/client.py,sha256=ZK88o4UelR9htFWAWDbw084ZTrRL8tONdxlIX62adnM,5608
|
|
350
350
|
mirascope/mcp/server.py,sha256=weXBk9ZmUcfZ5SZcR-dGRxvVXRMpn5UsE6ancnK1HZk,12402
|
|
351
351
|
mirascope/mcp/tools.py,sha256=IT7CEqbBBiFc7mkaRpWIepUpuy_oSdcEa4cwGopEYWc,3079
|
|
@@ -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.4.dist-info/METADATA,sha256=ys6o8sOhylsxIQZAwF6Sqx6FngeSG1qt9kBttr1mIrk,8542
|
|
376
|
+
mirascope-1.25.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
377
|
+
mirascope-1.25.4.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
|
|
378
|
+
mirascope-1.25.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|