mirascope 2.0.0a1__py3-none-any.whl → 2.0.0a2__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.
@@ -20,14 +20,14 @@ class ToolDecorator:
20
20
  @overload
21
21
  def __call__( # pyright:ignore[reportOverlappingOverload]
22
22
  self, fn: ContextToolFn[DepsT, P, JsonableCovariantT]
23
- ) -> ContextTool[DepsT, P, JsonableCovariantT]:
23
+ ) -> ContextTool[DepsT, JsonableCovariantT, P]:
24
24
  """Call the decorator with a context function."""
25
25
  ...
26
26
 
27
27
  @overload
28
28
  def __call__( # pyright:ignore[reportOverlappingOverload]
29
29
  self, fn: AsyncContextToolFn[DepsT, P, JsonableCovariantT]
30
- ) -> AsyncContextTool[DepsT, P, JsonableCovariantT]:
30
+ ) -> AsyncContextTool[DepsT, JsonableCovariantT, P]:
31
31
  """Call the decorator with an async context function."""
32
32
  ...
33
33
 
@@ -52,8 +52,8 @@ class ToolDecorator:
52
52
  | ToolFn[P, JsonableCovariantT]
53
53
  | AsyncToolFn[P, JsonableCovariantT],
54
54
  ) -> (
55
- ContextTool[DepsT, P, JsonableCovariantT]
56
- | AsyncContextTool[DepsT, P, JsonableCovariantT]
55
+ ContextTool[DepsT, JsonableCovariantT, P]
56
+ | AsyncContextTool[DepsT, JsonableCovariantT, P]
57
57
  | Tool[P, JsonableCovariantT]
58
58
  | AsyncTool[P, JsonableCovariantT]
59
59
  ):
@@ -62,11 +62,11 @@ class ToolDecorator:
62
62
  is_async = _tool_utils.is_async_tool_fn(fn)
63
63
 
64
64
  if is_context and is_async:
65
- return AsyncContextTool[DepsT, P, JsonableCovariantT](
65
+ return AsyncContextTool[DepsT, JsonableCovariantT, P](
66
66
  fn, strict=self.strict
67
67
  )
68
68
  elif is_context:
69
- return ContextTool[DepsT, P, JsonableCovariantT](fn, strict=self.strict)
69
+ return ContextTool[DepsT, JsonableCovariantT, P](fn, strict=self.strict)
70
70
  elif is_async:
71
71
  return AsyncTool[P, JsonableCovariantT](fn, strict=self.strict)
72
72
  else:
@@ -76,7 +76,7 @@ class ToolDecorator:
76
76
  @overload
77
77
  def tool( # pyright:ignore[reportOverlappingOverload]
78
78
  __fn: AsyncContextToolFn[DepsT, P, JsonableCovariantT],
79
- ) -> AsyncContextTool[DepsT, P, JsonableCovariantT]:
79
+ ) -> AsyncContextTool[DepsT, JsonableCovariantT, P]:
80
80
  """Overload for async context tool functions."""
81
81
  ...
82
82
 
@@ -84,7 +84,7 @@ def tool( # pyright:ignore[reportOverlappingOverload]
84
84
  @overload
85
85
  def tool( # pyright:ignore[reportOverlappingOverload]
86
86
  __fn: ContextToolFn[DepsT, P, JsonableCovariantT],
87
- ) -> ContextTool[DepsT, P, JsonableCovariantT]:
87
+ ) -> ContextTool[DepsT, JsonableCovariantT, P]:
88
88
  """Overload for context tool functions."""
89
89
  ...
90
90
 
@@ -116,8 +116,8 @@ def tool(
116
116
  *,
117
117
  strict: bool = False,
118
118
  ) -> (
119
- ContextTool[DepsT, P, JsonableCovariantT]
120
- | AsyncContextTool[DepsT, P, JsonableCovariantT]
119
+ ContextTool[DepsT, JsonableCovariantT, P]
120
+ | AsyncContextTool[DepsT, JsonableCovariantT, P]
121
121
  | Tool[P, JsonableCovariantT]
122
122
  | AsyncTool[P, JsonableCovariantT]
123
123
  | ToolDecorator
@@ -89,7 +89,7 @@ class AsyncTool(
89
89
 
90
90
  class ContextTool(
91
91
  ToolSchema[ContextToolFn[DepsT, AnyP, JsonableCovariantT]],
92
- Generic[DepsT, AnyP, JsonableCovariantT],
92
+ Generic[DepsT, JsonableCovariantT, AnyP],
93
93
  ):
94
94
  """Protocol defining a tool that can be used by LLMs.
95
95
 
@@ -130,7 +130,7 @@ class ContextTool(
130
130
 
131
131
  class AsyncContextTool(
132
132
  ToolSchema[AsyncContextToolFn[DepsT, AnyP, JsonableCovariantT]],
133
- Generic[DepsT, AnyP, JsonableCovariantT],
133
+ Generic[DepsT, JsonableCovariantT, AnyP],
134
134
  ):
135
135
  """Protocol defining an async tool that can be used by LLMs with context.
136
136
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mirascope
3
- Version: 2.0.0a1
3
+ Version: 2.0.0a2
4
4
  Summary: LLM abstractions that aren't obstructions
5
5
  Project-URL: Homepage, https://mirascope.com
6
6
  Project-URL: Documentation, https://mirascope.com/docs/mirascope/v2
@@ -40,6 +40,7 @@ Classifier: Programming Language :: Python :: 3.10
40
40
  Classifier: Programming Language :: Python :: 3.11
41
41
  Classifier: Programming Language :: Python :: 3.12
42
42
  Classifier: Programming Language :: Python :: 3.13
43
+ Classifier: Programming Language :: Python :: 3.14
43
44
  Classifier: Topic :: File Formats :: JSON
44
45
  Classifier: Topic :: File Formats :: JSON :: JSON Schema
45
46
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -87,16 +87,16 @@ mirascope/llm/responses/stream_response.py,sha256=g8hGoKL94intm5w5mOpAh2QAH1eiCb
87
87
  mirascope/llm/responses/streams.py,sha256=TmEFvLVEWHfVYplik61yUWisxe8JGbaZdh7yC7e-axI,10789
88
88
  mirascope/llm/tools/__init__.py,sha256=3xIhEzpLlTkuDuvkfwVy3gLPRTTJCJH5GKkqCGjgo3A,772
89
89
  mirascope/llm/tools/_utils.py,sha256=bBVsZs8SywWspVGBGR7GGuhSmGa5-wCzeXGV6Woof9Q,872
90
- mirascope/llm/tools/decorator.py,sha256=kZ90qrE7jZHcW5fg3O-SOh6xiI6yjT4fz548e4AxvQc,5326
90
+ mirascope/llm/tools/decorator.py,sha256=1K-67dJkjCOS1rHAM91lOT8XfShTw54QA-TMEok5eH0,5326
91
91
  mirascope/llm/tools/protocols.py,sha256=VubSZm-N2QEnBzFTsnj4pRtIgJOx2GQWM4IyqZjDk1Q,3054
92
92
  mirascope/llm/tools/tool_schema.py,sha256=vFGVNOa8ZrE6gnwelBcPKYK7-0ULqVtlr1oXZsbVxKY,8358
93
93
  mirascope/llm/tools/toolkit.py,sha256=pGXchFSO2H7PxFM2sPQYEMDAYHNaX9bhGEyyou_4vsg,4900
94
- mirascope/llm/tools/tools.py,sha256=AEgTEZoRTxictYxPDxdX18_Ho2sD8SIa-LUTngNHPiM,5972
94
+ mirascope/llm/tools/tools.py,sha256=7RD69pdEjZVjQz8VpegOmixz09Wq2CXotcyI34hA7cQ,5972
95
95
  mirascope/llm/types/__init__.py,sha256=lqzi1FkZ-s-D9-KQzVkAHuQQ1zp6B6yM3r9UNo46teE,357
96
96
  mirascope/llm/types/dataclass.py,sha256=y4_9M3Yqw_4I-H0V4TwvgGIp6JvRdtpW11NxqufnsJk,247
97
97
  mirascope/llm/types/jsonable.py,sha256=KY6l21_RBhlHQRXQ_xy6pUqqbTVb_jVFSU4ykRy_OLU,1104
98
98
  mirascope/llm/types/type_vars.py,sha256=OsAcQAZh5T_X8ZTLlP4GC1x3qgVY9rfYSnME8aMTDxw,642
99
- mirascope-2.0.0a1.dist-info/METADATA,sha256=N1uJYt06NVrGixnQ1x4DsM3YXBsToFxXKzRI4OhxVsI,5417
100
- mirascope-2.0.0a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
- mirascope-2.0.0a1.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
102
- mirascope-2.0.0a1.dist-info/RECORD,,
99
+ mirascope-2.0.0a2.dist-info/METADATA,sha256=GKHQgnkZlGO2uYH2GvKT4e9ReNf0QuptJXe4GVJIz_o,5468
100
+ mirascope-2.0.0a2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
+ mirascope-2.0.0a2.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
102
+ mirascope-2.0.0a2.dist-info/RECORD,,