mirascope 1.16.8__py3-none-any.whl → 1.16.9__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/anthropic/call_response.py +10 -2
- mirascope/core/azure/_utils/_message_param_converter.py +46 -19
- mirascope/core/azure/call_response.py +8 -2
- mirascope/core/base/_create.py +1 -1
- mirascope/core/base/_utils/_convert_function_to_base_tool.py +2 -2
- mirascope/core/base/call_response.py +7 -1
- mirascope/core/bedrock/call_response.py +8 -2
- mirascope/core/cohere/_utils/_message_param_converter.py +3 -2
- mirascope/core/cohere/call_response.py +8 -2
- mirascope/core/gemini/_utils/_message_param_converter.py +5 -1
- mirascope/core/gemini/call_response.py +8 -2
- mirascope/core/groq/_utils/_message_param_converter.py +36 -14
- mirascope/core/groq/call_response.py +8 -2
- mirascope/core/mistral/call_response.py +8 -2
- mirascope/core/openai/_utils/_convert_message_params.py +1 -0
- mirascope/core/openai/_utils/_message_param_converter.py +9 -7
- mirascope/core/openai/call_response.py +8 -2
- mirascope/core/vertex/_utils/_message_param_converter.py +4 -2
- mirascope/core/vertex/call_response.py +8 -2
- mirascope/llm/call_response.py +6 -2
- mirascope/llm/stream.py +3 -3
- {mirascope-1.16.8.dist-info → mirascope-1.16.9.dist-info}/METADATA +1 -1
- {mirascope-1.16.8.dist-info → mirascope-1.16.9.dist-info}/RECORD +25 -25
- {mirascope-1.16.8.dist-info → mirascope-1.16.9.dist-info}/WHEEL +0 -0
- {mirascope-1.16.8.dist-info → mirascope-1.16.9.dist-info}/licenses/LICENSE +0 -0
|
@@ -186,5 +186,13 @@ class AnthropicCallResponse(
|
|
|
186
186
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
187
187
|
|
|
188
188
|
@property
|
|
189
|
-
def common_message_param(self) ->
|
|
190
|
-
return AnthropicMessageParamConverter.from_provider([(self.message_param)])
|
|
189
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
190
|
+
return AnthropicMessageParamConverter.from_provider([(self.message_param)])[0]
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
194
|
+
if not self.user_message_param:
|
|
195
|
+
return None
|
|
196
|
+
return AnthropicMessageParamConverter.from_provider(
|
|
197
|
+
[(self.user_message_param)]
|
|
198
|
+
)[0]
|
|
@@ -4,14 +4,16 @@ from typing import cast
|
|
|
4
4
|
from azure.ai.inference.models import (
|
|
5
5
|
AssistantMessage,
|
|
6
6
|
ChatRequestMessage,
|
|
7
|
+
TextContentItem,
|
|
8
|
+
ToolMessage,
|
|
9
|
+
UserMessage,
|
|
7
10
|
)
|
|
8
11
|
|
|
9
|
-
from mirascope.core import BaseMessageParam
|
|
10
12
|
from mirascope.core.azure._utils import convert_message_params
|
|
13
|
+
from mirascope.core.base import BaseMessageParam, TextPart, ToolCallPart, ToolResultPart
|
|
11
14
|
from mirascope.core.base._utils._base_message_param_converter import (
|
|
12
15
|
BaseMessageParamConverter,
|
|
13
16
|
)
|
|
14
|
-
from mirascope.core.base.message_param import ToolCallPart
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
class AzureMessageParamConverter(BaseMessageParamConverter):
|
|
@@ -19,38 +21,63 @@ class AzureMessageParamConverter(BaseMessageParamConverter):
|
|
|
19
21
|
|
|
20
22
|
@staticmethod
|
|
21
23
|
def to_provider(message_params: list[BaseMessageParam]) -> list[ChatRequestMessage]:
|
|
22
|
-
"""
|
|
23
|
-
Convert from Mirascope `BaseMessageParam` to Azure's `ChatRequestMessage`.
|
|
24
|
-
"""
|
|
24
|
+
"""Convert from Mirascope `BaseMessageParam` to Azure's `ChatRequestMessage`."""
|
|
25
25
|
return convert_message_params(
|
|
26
26
|
cast(list[BaseMessageParam | ChatRequestMessage], message_params)
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
@staticmethod
|
|
30
|
-
def from_provider(
|
|
30
|
+
def from_provider(
|
|
31
|
+
message_params: list[ChatRequestMessage],
|
|
32
|
+
) -> list[BaseMessageParam]:
|
|
31
33
|
"""
|
|
32
34
|
Convert from Azure's `AssistantMessage` back to Mirascope `BaseMessageParam`.
|
|
33
35
|
"""
|
|
34
36
|
converted: list[BaseMessageParam] = []
|
|
35
37
|
for message_param in message_params:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
if isinstance(message_param, UserMessage):
|
|
39
|
+
if isinstance(message_param.content, str):
|
|
40
|
+
converted.append(
|
|
41
|
+
BaseMessageParam(role="user", content=message_param.content)
|
|
42
|
+
)
|
|
43
|
+
elif isinstance(message_param.content, list):
|
|
44
|
+
converted_parts = []
|
|
45
|
+
for part in message_param.content:
|
|
46
|
+
if isinstance(part, TextContentItem):
|
|
47
|
+
converted_parts.append(
|
|
48
|
+
TextPart(type="text", text=part.text)
|
|
49
|
+
)
|
|
50
|
+
# TODO: add support for image and audio parts here
|
|
51
|
+
converted.append(
|
|
52
|
+
BaseMessageParam(role="user", content=converted_parts)
|
|
53
|
+
)
|
|
54
|
+
elif isinstance(message_param, AssistantMessage):
|
|
55
|
+
if tool_calls := message_param.tool_calls:
|
|
56
|
+
content = [
|
|
47
57
|
ToolCallPart(
|
|
48
58
|
type="tool_call",
|
|
49
59
|
name=tool_call.function.name,
|
|
50
60
|
id=tool_call.id,
|
|
51
61
|
args=json.loads(tool_call.function.arguments),
|
|
52
62
|
)
|
|
63
|
+
for tool_call in tool_calls
|
|
64
|
+
]
|
|
65
|
+
else:
|
|
66
|
+
content = message_param.content or ""
|
|
67
|
+
converted.append(BaseMessageParam(role="assistant", content=content))
|
|
68
|
+
elif isinstance(message_param, ToolMessage):
|
|
69
|
+
converted.append(
|
|
70
|
+
BaseMessageParam(
|
|
71
|
+
role="tool",
|
|
72
|
+
content=[
|
|
73
|
+
ToolResultPart(
|
|
74
|
+
type="tool_result",
|
|
75
|
+
name="",
|
|
76
|
+
content=message_param.content,
|
|
77
|
+
id=message_param.tool_call_id,
|
|
78
|
+
is_error=False,
|
|
79
|
+
)
|
|
80
|
+
],
|
|
53
81
|
)
|
|
54
|
-
|
|
55
|
-
converted.append(BaseMessageParam(role="tool", content=contents))
|
|
82
|
+
)
|
|
56
83
|
return converted
|
|
@@ -199,5 +199,11 @@ class AzureCallResponse(
|
|
|
199
199
|
)
|
|
200
200
|
|
|
201
201
|
@property
|
|
202
|
-
def common_message_param(self) ->
|
|
203
|
-
return AzureMessageParamConverter.from_provider([self.message_param])
|
|
202
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
203
|
+
return AzureMessageParamConverter.from_provider([self.message_param])[0]
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
207
|
+
if not self.user_message_param:
|
|
208
|
+
return None
|
|
209
|
+
return AzureMessageParamConverter.from_provider([self.user_message_param])[0]
|
mirascope/core/base/_create.py
CHANGED
|
@@ -166,7 +166,7 @@ def create_factory( # noqa: ANN202
|
|
|
166
166
|
@wraps(fn)
|
|
167
167
|
async def inner_async(
|
|
168
168
|
*args: _P.args, **kwargs: _P.kwargs
|
|
169
|
-
) -> TCallResponse | _ParsedOutputT:
|
|
169
|
+
) -> TCallResponse | _ParsedOutputT: # pyright: ignore [reportInvalidTypeForm]
|
|
170
170
|
fn_args = get_fn_args(fn, args, kwargs)
|
|
171
171
|
dynamic_config = await get_dynamic_configuration(fn, args, kwargs)
|
|
172
172
|
nonlocal client
|
|
@@ -114,7 +114,7 @@ def convert_function_to_base_tool(
|
|
|
114
114
|
if examples:
|
|
115
115
|
model.model_config["json_schema_extra"] = {"examples": examples}
|
|
116
116
|
|
|
117
|
-
def call(self: base) -> Any: # noqa: ANN401
|
|
117
|
+
def call(self: base) -> Any: # pyright: ignore [reportInvalidTypeForm] # noqa: ANN401
|
|
118
118
|
return fn(
|
|
119
119
|
**(
|
|
120
120
|
({"self": self} if has_self else {})
|
|
@@ -129,7 +129,7 @@ def convert_function_to_base_tool(
|
|
|
129
129
|
)
|
|
130
130
|
)
|
|
131
131
|
|
|
132
|
-
async def call_async(self: base) -> Callable:
|
|
132
|
+
async def call_async(self: base) -> Callable: # pyright: ignore [reportInvalidTypeForm]
|
|
133
133
|
return await call(self)
|
|
134
134
|
|
|
135
135
|
if inspect.iscoroutinefunction(fn):
|
|
@@ -275,10 +275,16 @@ class BaseCallResponse(
|
|
|
275
275
|
|
|
276
276
|
@property
|
|
277
277
|
@abstractmethod
|
|
278
|
-
def common_message_param(self) ->
|
|
278
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
279
279
|
"""Provider-agnostic assistant message param."""
|
|
280
280
|
...
|
|
281
281
|
|
|
282
|
+
@property
|
|
283
|
+
@abstractmethod
|
|
284
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
285
|
+
"""Provider-agnostic user message param."""
|
|
286
|
+
...
|
|
287
|
+
|
|
282
288
|
@property
|
|
283
289
|
def common_tools(self) -> list[Tool] | None:
|
|
284
290
|
"""Provider-agnostic tools."""
|
|
@@ -232,5 +232,11 @@ class BedrockCallResponse(
|
|
|
232
232
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
233
233
|
|
|
234
234
|
@property
|
|
235
|
-
def common_message_param(self) ->
|
|
236
|
-
return BedrockMessageParamConverter.from_provider([self.message_param])
|
|
235
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
236
|
+
return BedrockMessageParamConverter.from_provider([self.message_param])[0]
|
|
237
|
+
|
|
238
|
+
@property
|
|
239
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
240
|
+
if not self.user_message_param:
|
|
241
|
+
return None
|
|
242
|
+
return BedrockMessageParamConverter.from_provider([self.user_message_param])[0] # pyright: ignore [reportArgumentType]
|
|
@@ -29,9 +29,10 @@ class CohereMessageParamConverter(BaseMessageParamConverter):
|
|
|
29
29
|
"""
|
|
30
30
|
converted = []
|
|
31
31
|
for message_param in message_params:
|
|
32
|
+
role = getattr(message_param, "role", "assistant")
|
|
32
33
|
if not message_param.tool_calls:
|
|
33
34
|
converted.append(
|
|
34
|
-
BaseMessageParam(role=
|
|
35
|
+
BaseMessageParam(role=role, content=message_param.message)
|
|
35
36
|
)
|
|
36
37
|
continue
|
|
37
38
|
|
|
@@ -49,5 +50,5 @@ class CohereMessageParamConverter(BaseMessageParamConverter):
|
|
|
49
50
|
)
|
|
50
51
|
)
|
|
51
52
|
|
|
52
|
-
converted.append(BaseMessageParam(role=
|
|
53
|
+
converted.append(BaseMessageParam(role=role, content=converted_content))
|
|
53
54
|
return converted
|
|
@@ -188,5 +188,11 @@ class CohereCallResponse(
|
|
|
188
188
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
189
189
|
|
|
190
190
|
@property
|
|
191
|
-
def common_message_param(self) ->
|
|
192
|
-
return CohereMessageParamConverter.from_provider([self.message_param])
|
|
191
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
192
|
+
return CohereMessageParamConverter.from_provider([self.message_param])[0]
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
196
|
+
if not self.user_message_param:
|
|
197
|
+
return None
|
|
198
|
+
return CohereMessageParamConverter.from_provider([self.user_message_param])[0]
|
|
@@ -57,7 +57,11 @@ class GeminiMessageParamConverter(BaseMessageParamConverter):
|
|
|
57
57
|
"""
|
|
58
58
|
converted: list[BaseMessageParam] = []
|
|
59
59
|
for message_param in message_params:
|
|
60
|
-
role: str =
|
|
60
|
+
role: str = (
|
|
61
|
+
"assistant"
|
|
62
|
+
if message_param["role"] == "model"
|
|
63
|
+
else message_param["role"]
|
|
64
|
+
)
|
|
61
65
|
content_list = []
|
|
62
66
|
for part in cast(
|
|
63
67
|
list[protos.Part | protos.FunctionCall | protos.FunctionResponse],
|
|
@@ -199,5 +199,11 @@ class GeminiCallResponse(
|
|
|
199
199
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
200
200
|
|
|
201
201
|
@property
|
|
202
|
-
def common_message_param(self) ->
|
|
203
|
-
return GeminiMessageParamConverter.from_provider([self.message_param])
|
|
202
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
203
|
+
return GeminiMessageParamConverter.from_provider([self.message_param])[0]
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
207
|
+
if not self.user_message_param:
|
|
208
|
+
return None
|
|
209
|
+
return GeminiMessageParamConverter.from_provider([self.user_message_param])[0]
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from typing import cast
|
|
3
3
|
|
|
4
|
-
from groq.types.chat import
|
|
5
|
-
ChatCompletionAssistantMessageParam,
|
|
6
|
-
ChatCompletionMessageParam,
|
|
7
|
-
)
|
|
4
|
+
from groq.types.chat import ChatCompletionMessageParam
|
|
8
5
|
|
|
9
6
|
from mirascope.core import BaseMessageParam
|
|
10
|
-
from mirascope.core.base import TextPart
|
|
7
|
+
from mirascope.core.base import TextPart, ToolResultPart
|
|
11
8
|
from mirascope.core.base._utils._base_message_param_converter import (
|
|
12
9
|
BaseMessageParamConverter,
|
|
13
10
|
)
|
|
@@ -31,16 +28,29 @@ class GroqMessageParamConverter(BaseMessageParamConverter):
|
|
|
31
28
|
|
|
32
29
|
@staticmethod
|
|
33
30
|
def from_provider(
|
|
34
|
-
message_params: list[
|
|
31
|
+
message_params: list[ChatCompletionMessageParam],
|
|
35
32
|
) -> list[BaseMessageParam]:
|
|
36
|
-
"""
|
|
37
|
-
Convert from Groq's `ChatCompletionAssistantMessageParam` to Mirascope `BaseMessageParam`.
|
|
38
|
-
"""
|
|
33
|
+
"""Convert from Groq's `ChatCompletionAssistantMessageParam` to Mirascope `BaseMessageParam`."""
|
|
39
34
|
converted = []
|
|
40
35
|
for message_param in message_params:
|
|
41
36
|
contents = []
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
content = message_param.get("content")
|
|
38
|
+
if message_param["role"] == "tool":
|
|
39
|
+
converted.append(
|
|
40
|
+
BaseMessageParam(
|
|
41
|
+
role="tool",
|
|
42
|
+
content=[
|
|
43
|
+
ToolResultPart(
|
|
44
|
+
type="tool_result",
|
|
45
|
+
name=getattr(message_param, "name", ""),
|
|
46
|
+
content=message_param["content"],
|
|
47
|
+
id=message_param["tool_call_id"],
|
|
48
|
+
is_error=False,
|
|
49
|
+
)
|
|
50
|
+
],
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
continue
|
|
44
54
|
if tool_calls := message_param.get("tool_calls"):
|
|
45
55
|
for tool_call in tool_calls:
|
|
46
56
|
contents.append(
|
|
@@ -51,10 +61,22 @@ class GroqMessageParamConverter(BaseMessageParamConverter):
|
|
|
51
61
|
args=json.loads(tool_call["function"]["arguments"]),
|
|
52
62
|
)
|
|
53
63
|
)
|
|
54
|
-
|
|
64
|
+
elif isinstance(content, str):
|
|
65
|
+
converted.append(
|
|
66
|
+
BaseMessageParam(role=message_param["role"], content=content)
|
|
67
|
+
)
|
|
68
|
+
continue
|
|
69
|
+
elif isinstance(content, list):
|
|
70
|
+
for part in content:
|
|
71
|
+
if "text" in part:
|
|
72
|
+
contents.append(TextPart(type="text", text=part["text"]))
|
|
73
|
+
# TODO: add support for image parts here
|
|
74
|
+
if contents:
|
|
55
75
|
converted.append(
|
|
56
|
-
BaseMessageParam(role="
|
|
76
|
+
BaseMessageParam(role=message_param["role"], content=contents)
|
|
57
77
|
)
|
|
58
78
|
else:
|
|
59
|
-
converted.append(
|
|
79
|
+
converted.append(
|
|
80
|
+
BaseMessageParam(role=message_param["role"], content="")
|
|
81
|
+
)
|
|
60
82
|
return converted
|
|
@@ -181,5 +181,11 @@ class GroqCallResponse(
|
|
|
181
181
|
return cast(list[FinishReason], self.finish_reasons)
|
|
182
182
|
|
|
183
183
|
@property
|
|
184
|
-
def common_message_param(self) ->
|
|
185
|
-
return GroqMessageParamConverter.from_provider([self.message_param])
|
|
184
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
185
|
+
return GroqMessageParamConverter.from_provider([self.message_param])[0]
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
189
|
+
if not self.user_message_param:
|
|
190
|
+
return None
|
|
191
|
+
return GroqMessageParamConverter.from_provider([self.user_message_param])[0]
|
|
@@ -186,5 +186,11 @@ class MistralCallResponse(
|
|
|
186
186
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
187
187
|
|
|
188
188
|
@property
|
|
189
|
-
def common_message_param(self) ->
|
|
190
|
-
return MistralMessageParamConverter.from_provider([self.message_param])
|
|
189
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
190
|
+
return MistralMessageParamConverter.from_provider([self.message_param])[0]
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
194
|
+
if not self.user_message_param:
|
|
195
|
+
return None
|
|
196
|
+
return MistralMessageParamConverter.from_provider([self.user_message_param])[0]
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
import json
|
|
4
4
|
from typing import cast
|
|
5
5
|
|
|
6
|
-
from openai.types.chat import
|
|
7
|
-
ChatCompletionAssistantMessageParam,
|
|
8
|
-
ChatCompletionMessageParam,
|
|
9
|
-
)
|
|
6
|
+
from openai.types.chat import ChatCompletionMessageParam
|
|
10
7
|
|
|
11
8
|
from mirascope.core import BaseMessageParam
|
|
12
9
|
from mirascope.core.base import TextPart, ToolCallPart, ToolResultPart
|
|
@@ -28,14 +25,18 @@ class OpenAIMessageParamConverter(BaseMessageParamConverter):
|
|
|
28
25
|
|
|
29
26
|
@staticmethod
|
|
30
27
|
def from_provider(
|
|
31
|
-
message_params: list[
|
|
28
|
+
message_params: list[ChatCompletionMessageParam],
|
|
32
29
|
) -> list[BaseMessageParam]:
|
|
33
30
|
"""Converts OpenAI message params to base message params."""
|
|
34
31
|
converted = []
|
|
35
32
|
for message_param in message_params:
|
|
36
33
|
contents = []
|
|
37
34
|
content = message_param.get("content")
|
|
38
|
-
if
|
|
35
|
+
if (
|
|
36
|
+
message_param["role"] == "tool"
|
|
37
|
+
and "name" in message_param
|
|
38
|
+
and "content" in message_param
|
|
39
|
+
):
|
|
39
40
|
converted.append(
|
|
40
41
|
BaseMessageParam(
|
|
41
42
|
role="tool",
|
|
@@ -61,7 +62,8 @@ class OpenAIMessageParamConverter(BaseMessageParamConverter):
|
|
|
61
62
|
if "text" in part:
|
|
62
63
|
contents.append(TextPart(type="text", text=part["text"]))
|
|
63
64
|
else:
|
|
64
|
-
|
|
65
|
+
# TODO: add support for image and audio parts here
|
|
66
|
+
raise ValueError(part["refusal"]) # pyright: ignore [reportGeneralTypeIssues]
|
|
65
67
|
if tool_calls := message_param.get("tool_calls"):
|
|
66
68
|
for tool_call in tool_calls:
|
|
67
69
|
contents.append(
|
|
@@ -229,5 +229,11 @@ class OpenAICallResponse(
|
|
|
229
229
|
return cast(list[FinishReason], self.finish_reasons)
|
|
230
230
|
|
|
231
231
|
@property
|
|
232
|
-
def common_message_param(self) ->
|
|
233
|
-
return OpenAIMessageParamConverter.from_provider([self.message_param])
|
|
232
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
233
|
+
return OpenAIMessageParamConverter.from_provider([self.message_param])[0]
|
|
234
|
+
|
|
235
|
+
@property
|
|
236
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
237
|
+
if not self.user_message_param:
|
|
238
|
+
return None
|
|
239
|
+
return OpenAIMessageParamConverter.from_provider([self.user_message_param])[0]
|
|
@@ -52,14 +52,16 @@ class VertexMessageParamConverter(BaseMessageParamConverter):
|
|
|
52
52
|
"""
|
|
53
53
|
converted = []
|
|
54
54
|
for message_param in message_params:
|
|
55
|
-
role: str =
|
|
55
|
+
role: str = (
|
|
56
|
+
"assistant" if message_param.role == "model" else message_param.role
|
|
57
|
+
)
|
|
56
58
|
contents = []
|
|
57
59
|
has_tool_call = False
|
|
58
60
|
for part in message_param.parts:
|
|
59
61
|
if part.function_response:
|
|
60
62
|
converted.append(
|
|
61
63
|
BaseMessageParam(
|
|
62
|
-
role=role,
|
|
64
|
+
role=message_param.role,
|
|
63
65
|
content=[
|
|
64
66
|
ToolResultPart(
|
|
65
67
|
type="tool_result",
|
|
@@ -191,5 +191,11 @@ class VertexCallResponse(
|
|
|
191
191
|
return _convert_finish_reasons_to_common_finish_reasons(self.finish_reasons)
|
|
192
192
|
|
|
193
193
|
@property
|
|
194
|
-
def common_message_param(self) ->
|
|
195
|
-
return VertexMessageParamConverter.from_provider([self.message_param])
|
|
194
|
+
def common_message_param(self) -> BaseMessageParam:
|
|
195
|
+
return VertexMessageParamConverter.from_provider([self.message_param])[0]
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def common_user_message_param(self) -> BaseMessageParam | None:
|
|
199
|
+
if not self.user_message_param:
|
|
200
|
+
return None
|
|
201
|
+
return VertexMessageParamConverter.from_provider([self.user_message_param])[0]
|
mirascope/llm/call_response.py
CHANGED
|
@@ -54,10 +54,14 @@ class CallResponse(
|
|
|
54
54
|
**{field: getattr(response, field) for field in response.model_fields}
|
|
55
55
|
)
|
|
56
56
|
object.__setattr__(self, "_response", response)
|
|
57
|
+
object.__setattr__(
|
|
58
|
+
self, "user_message_param", response.common_user_message_param
|
|
59
|
+
)
|
|
57
60
|
|
|
58
61
|
def __getattribute__(self, name: str) -> Any: # noqa: ANN401
|
|
59
62
|
special_names = {
|
|
60
63
|
"_response",
|
|
64
|
+
"user_message_param",
|
|
61
65
|
"__dict__",
|
|
62
66
|
"__class__",
|
|
63
67
|
"model_fields",
|
|
@@ -96,12 +100,12 @@ class CallResponse(
|
|
|
96
100
|
|
|
97
101
|
@computed_field
|
|
98
102
|
@cached_property
|
|
99
|
-
def tools(self) -> list[Tool] | None: # pyright: ignore [
|
|
103
|
+
def tools(self) -> list[Tool] | None: # pyright: ignore [reportIncompatibleVariableOverride]
|
|
100
104
|
return self._response.common_tools
|
|
101
105
|
|
|
102
106
|
@computed_field
|
|
103
107
|
@cached_property
|
|
104
|
-
def tool(self) -> Tool | None:
|
|
108
|
+
def tool(self) -> Tool | None: # pyright: ignore [reportIncompatibleVariableOverride]
|
|
105
109
|
tools = self._response.common_tools
|
|
106
110
|
if tools:
|
|
107
111
|
return tools[0]
|
mirascope/llm/stream.py
CHANGED
|
@@ -100,7 +100,7 @@ class Stream(
|
|
|
100
100
|
call_kwargs=stream.call_kwargs,
|
|
101
101
|
)
|
|
102
102
|
|
|
103
|
-
def __iter__(
|
|
103
|
+
def __iter__( # pyright: ignore [reportIncompatibleMethodOverride]
|
|
104
104
|
self,
|
|
105
105
|
) -> Generator[
|
|
106
106
|
tuple[
|
|
@@ -116,7 +116,7 @@ class Stream(
|
|
|
116
116
|
Tool(tool=tool) if tool is not None else None, # pyright: ignore [reportAbstractUsage]
|
|
117
117
|
)
|
|
118
118
|
|
|
119
|
-
async def __aiter__(
|
|
119
|
+
async def __aiter__( # pyright: ignore [reportIncompatibleMethodOverride]
|
|
120
120
|
self,
|
|
121
121
|
) -> AsyncGenerator[
|
|
122
122
|
tuple[
|
|
@@ -150,7 +150,7 @@ class Stream(
|
|
|
150
150
|
tool_calls=tool_calls, content=content
|
|
151
151
|
)
|
|
152
152
|
|
|
153
|
-
def construct_call_response(
|
|
153
|
+
def construct_call_response( # pyright: ignore [reportIncompatibleMethodOverride]
|
|
154
154
|
self,
|
|
155
155
|
) -> CallResponse[_BaseCallResponseT, Tool[_ToolMessageParamT]]:
|
|
156
156
|
return self.common_construct_call_response()
|
|
@@ -47,7 +47,7 @@ mirascope/core/anthropic/__init__.py,sha256=0ObxoxWzpsyf3tm5SldosVDxVWiIu1jxuGmc
|
|
|
47
47
|
mirascope/core/anthropic/_call.py,sha256=LXUR__AyexD-hsPMPKpA7IFuh8Cfc0uAg1GrJSxiWnU,2358
|
|
48
48
|
mirascope/core/anthropic/_call_kwargs.py,sha256=EoXSl2B5FoLD_Nv03-ttXjiKlpBihZGXu6U-Ol3qwZ8,389
|
|
49
49
|
mirascope/core/anthropic/call_params.py,sha256=K51kCyIf6us3Tl2SPgkqrZoacZTNwaMuVj23hFJcVBk,1238
|
|
50
|
-
mirascope/core/anthropic/call_response.py,sha256=
|
|
50
|
+
mirascope/core/anthropic/call_response.py,sha256=NL30_QuGYBN6XX2wIqI5JwiTopXV6jz--5z9krJO458,6074
|
|
51
51
|
mirascope/core/anthropic/call_response_chunk.py,sha256=GZgvJRkVUUED69Mq5TyEe4OIH8AXq3hCqqU6eHTuqWc,3543
|
|
52
52
|
mirascope/core/anthropic/dynamic_config.py,sha256=kZV4ApAnm3P1X5gKPJ3hbr45K6tgaNX8L6Ca8NjTkxU,1192
|
|
53
53
|
mirascope/core/anthropic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -66,7 +66,7 @@ mirascope/core/azure/__init__.py,sha256=ozfFhyCC0bFLDUA7m2v1POywSFpLJi6E7xZ2bhBI
|
|
|
66
66
|
mirascope/core/azure/_call.py,sha256=SHqSJe6_4zgn4Y9PkpDl4vXvLuT4QmVnWUcws9e_RR8,2237
|
|
67
67
|
mirascope/core/azure/_call_kwargs.py,sha256=q38xKSgCBWi8DLScepG-KnUfgi67AU6xr2uOHwCZ2mI,435
|
|
68
68
|
mirascope/core/azure/call_params.py,sha256=o5xhlWlyUB8bTewp9fj3l0jvbCpoOsZFnaGwhkEWTD0,1366
|
|
69
|
-
mirascope/core/azure/call_response.py,sha256=
|
|
69
|
+
mirascope/core/azure/call_response.py,sha256=eYH55I5awZ0Yhu3sK2N-4XLImjvRgDKOGF1pTs_QjIY,6834
|
|
70
70
|
mirascope/core/azure/call_response_chunk.py,sha256=tcLgURISaGONGDvWjWDfDPs2c0hQJT_tVELiDqL33SQ,2884
|
|
71
71
|
mirascope/core/azure/dynamic_config.py,sha256=6SBMGFce7tuXdwHrlKNISpZxVxUnnumbIQB9lGR6nbs,1066
|
|
72
72
|
mirascope/core/azure/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -80,17 +80,17 @@ mirascope/core/azure/_utils/_convert_message_params.py,sha256=EmzO8BYyU41V3CJy5q
|
|
|
80
80
|
mirascope/core/azure/_utils/_get_credential.py,sha256=hEWoKtB27PLZtC35qvPx36CPvQ9eHzr4tDFcq-13rqI,970
|
|
81
81
|
mirascope/core/azure/_utils/_get_json_output.py,sha256=Qec7WJY5is1Q63Vp9uUNNfkRwgxhdoLMCI7AF_e2t90,1017
|
|
82
82
|
mirascope/core/azure/_utils/_handle_stream.py,sha256=M_BGnjBGWTPefNyIMuJSHiDxIvqmENmqfVlDx_qzL1c,4638
|
|
83
|
-
mirascope/core/azure/_utils/_message_param_converter.py,sha256=
|
|
83
|
+
mirascope/core/azure/_utils/_message_param_converter.py,sha256=iERtNnOpCPA9pkLY9upyoD0QaG7Oz_4U-AI_jg3-ntM,3419
|
|
84
84
|
mirascope/core/azure/_utils/_setup_call.py,sha256=07fVPaM56CC-nNgf9hjIAxiNTGC9XD3bvADEEOCKJ9E,5936
|
|
85
85
|
mirascope/core/base/__init__.py,sha256=LgtzMll6DhuIbzeJ1JpH8LPYCgGOwiHm-3lfkYacu74,1828
|
|
86
86
|
mirascope/core/base/_call_factory.py,sha256=YdFHAa9WtGfYeqVcM2xaDNh5gMg584rOe26_E51-1to,9663
|
|
87
|
-
mirascope/core/base/_create.py,sha256=
|
|
87
|
+
mirascope/core/base/_create.py,sha256=1UNRA6pwMguaiLyLiQkPzTk12ASaXT_hh7jlNw4UFX4,10016
|
|
88
88
|
mirascope/core/base/_extract.py,sha256=QTqkArgmgR17OB5jTP86Wo-TW-BcouOcK9gdMy-EcNw,6799
|
|
89
89
|
mirascope/core/base/_extract_with_tools.py,sha256=MW4v8D1xty7LqLb5RwMFkX-peQqA73CtAVwGm7mC5w8,7338
|
|
90
90
|
mirascope/core/base/_partial.py,sha256=w_ACCgsDKNLtMyAP-lNmfRdrFEPmzh2BT4aninajxyY,3240
|
|
91
91
|
mirascope/core/base/call_kwargs.py,sha256=0mznCsrj1dYxvdwYNF0RKbc9CiU5G6WvvcjPqOMsOE4,351
|
|
92
92
|
mirascope/core/base/call_params.py,sha256=wtuuOY-SwIZYCDBKfn_xRC0Kf1cUuI4eSQaXu6VrtaE,1331
|
|
93
|
-
mirascope/core/base/call_response.py,sha256=
|
|
93
|
+
mirascope/core/base/call_response.py,sha256=76ZARlAImx9O2LPxmbMbZUnJEEx_7KokgZd9lDUWEvo,9236
|
|
94
94
|
mirascope/core/base/call_response_chunk.py,sha256=pvy6K2bM_wDiurfZ7M98SxEY--X6YrLjwCAWHwkFieA,2897
|
|
95
95
|
mirascope/core/base/dynamic_config.py,sha256=V5IG2X5gPFpfQ47uO8JU1zoC2eNdRftsRZEmwhRPaYI,2859
|
|
96
96
|
mirascope/core/base/from_call_args.py,sha256=8ijMX7PN6a4o6uLdmXJlSRnE-rEVJU5NLxUmNrS8dvU,909
|
|
@@ -111,7 +111,7 @@ mirascope/core/base/_utils/_base_message_param_converter.py,sha256=WcfVQXf-Sqtwg
|
|
|
111
111
|
mirascope/core/base/_utils/_base_type.py,sha256=x8ZabSxZZNAy6ER-VQEkB6mNyjWcGSCBivFydFNIRUE,700
|
|
112
112
|
mirascope/core/base/_utils/_convert_base_model_to_base_tool.py,sha256=JoHf1CbRwK91dABm5xLhdIPmeMSFS_nj-qW9OQu_YJ0,1750
|
|
113
113
|
mirascope/core/base/_utils/_convert_base_type_to_base_tool.py,sha256=fAOfqqoT0_vk1i-h-lCdWQYYeTjZ3fTiCgwGmgtHk9o,734
|
|
114
|
-
mirascope/core/base/_utils/_convert_function_to_base_tool.py,sha256=
|
|
114
|
+
mirascope/core/base/_utils/_convert_function_to_base_tool.py,sha256=squjro0oxwXOiavcf4bSHjHS94uSeCBGpykacoFpKx8,5729
|
|
115
115
|
mirascope/core/base/_utils/_convert_messages_to_message_params.py,sha256=Fony5qJRaLUJ3FAqI-8YRTz9vRzELKV6uEaSue8c-gg,3950
|
|
116
116
|
mirascope/core/base/_utils/_convert_provider_finish_reason_to_finish_reason.py,sha256=Mki5mYbYX8vUW-oosC4PaRNUHW_T5xAQWti3_1ndtTk,611
|
|
117
117
|
mirascope/core/base/_utils/_default_tool_docstring.py,sha256=JLyryjGDaHMU-P7gUpnjkPyELCQsQgi8AP4Dp_yXPOM,277
|
|
@@ -146,7 +146,7 @@ mirascope/core/bedrock/_call.py,sha256=8Z8sdzpTdJsMHBev35B1KH3O16_eMLbtTkOmPB7bz
|
|
|
146
146
|
mirascope/core/bedrock/_call_kwargs.py,sha256=N1d_iglnwZW3JrcaT8WTOeuLT5MYcVLU5vS8u8uyEL4,408
|
|
147
147
|
mirascope/core/bedrock/_types.py,sha256=ntmzYsgT6wuigv1GavkdqCvJnAYRsFvVuIwxafE4DFY,3229
|
|
148
148
|
mirascope/core/bedrock/call_params.py,sha256=3eKNYTteCTaPLqvAcy1vHU5aY9nMVNhmApL45ugPbrQ,1716
|
|
149
|
-
mirascope/core/bedrock/call_response.py,sha256=
|
|
149
|
+
mirascope/core/bedrock/call_response.py,sha256=_0enMnSGA0OAfPfT8fZ02miYqjw6MaUazY9Mhv1wC-E,8177
|
|
150
150
|
mirascope/core/bedrock/call_response_chunk.py,sha256=m_It9rKXv4jtrXJh_BuEcb2807SJi80hA2iejPLmYSs,3219
|
|
151
151
|
mirascope/core/bedrock/dynamic_config.py,sha256=X6v93X9g14mfvkGLL08yX-xTFGgX8y8bVngNmExdUhQ,1166
|
|
152
152
|
mirascope/core/bedrock/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -166,7 +166,7 @@ mirascope/core/cohere/_call.py,sha256=y0nB_7h7FWCNxHRPywtAVCYXyeYX3uzTyYBPWnuLwU
|
|
|
166
166
|
mirascope/core/cohere/_call_kwargs.py,sha256=YmHwiofs0QADGp0wXUtOr_Z5Pt849zaCtIZmVyjw2OM,292
|
|
167
167
|
mirascope/core/cohere/_types.py,sha256=dMcep2mhuUUUmKvFUmdoxkq4Zg5AtB2xquROiBbwRvo,1017
|
|
168
168
|
mirascope/core/cohere/call_params.py,sha256=xtmELsLkjfyfUoNbZpn3JET-gJxo1EIvlcwxgMw3gcw,1860
|
|
169
|
-
mirascope/core/cohere/call_response.py,sha256=
|
|
169
|
+
mirascope/core/cohere/call_response.py,sha256=aMHlngvNjCpwks3mPby-tm9Q6Q7UaF-EoPsiMHsYBUg,6126
|
|
170
170
|
mirascope/core/cohere/call_response_chunk.py,sha256=SVJrSulaQQiXIUptLqDzslRHTOQ8xc8UWtnp69n73Wg,3499
|
|
171
171
|
mirascope/core/cohere/dynamic_config.py,sha256=noH36l6qGGnClVz0EtMqeW_0e4-oTCviU5SLIl8YS64,941
|
|
172
172
|
mirascope/core/cohere/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -179,13 +179,13 @@ mirascope/core/cohere/_utils/_convert_finish_reason_to_common_finish_reasons.py,
|
|
|
179
179
|
mirascope/core/cohere/_utils/_convert_message_params.py,sha256=RE_SPJs7FQE1f3g0aJnUQ6VPsPq0FzN0zLVeeB-ky7Y,1227
|
|
180
180
|
mirascope/core/cohere/_utils/_get_json_output.py,sha256=65gJEpp2ThxGDXJQZyGACpyC-93SbDCthj3aXNrhg-M,1151
|
|
181
181
|
mirascope/core/cohere/_utils/_handle_stream.py,sha256=X7sPmnhKlRr8j6-Ds8ZGkajriCEKMYxzDRYltmHYfWI,1181
|
|
182
|
-
mirascope/core/cohere/_utils/_message_param_converter.py,sha256=
|
|
182
|
+
mirascope/core/cohere/_utils/_message_param_converter.py,sha256=IXuPK1mwA69LmcRFGzipwpn73YuKAnETtbUS0KAC_w0,1911
|
|
183
183
|
mirascope/core/cohere/_utils/_setup_call.py,sha256=xdyXamNXYzjRldzQ-xyu-WvH7A7LjNuE2W-w9zP-f9U,4603
|
|
184
184
|
mirascope/core/gemini/__init__.py,sha256=mJvRB06dJ2qTqmyPp3-RgZl4WInVxdkFglzapvBUoBI,835
|
|
185
185
|
mirascope/core/gemini/_call.py,sha256=g47rUaE4V_onORvRUP9GlgnQKda28dV1Ge2YACvrD-c,2344
|
|
186
186
|
mirascope/core/gemini/_call_kwargs.py,sha256=4f34gl1BPM14wkd0fGJw_58jYzxgGgNvZkjVI5d1hgU,360
|
|
187
187
|
mirascope/core/gemini/call_params.py,sha256=aEXhgZVB0npcT6wL_p7GVGIE3vi_JOiMKdgWtpXTezQ,1723
|
|
188
|
-
mirascope/core/gemini/call_response.py,sha256=
|
|
188
|
+
mirascope/core/gemini/call_response.py,sha256=m7s0T8TpOkPiEv5BXviSdpA9UWW5xjF4wrG8dBYGBZg,6159
|
|
189
189
|
mirascope/core/gemini/call_response_chunk.py,sha256=AqKWWaRGEOgenxHzWLsNdbZDH-H0M5DI9CTJiwnS9Tw,2640
|
|
190
190
|
mirascope/core/gemini/dynamic_config.py,sha256=_bmJUVHFyrr3zKea96lES20q4GPOelK3W7K1DcX0mZ8,836
|
|
191
191
|
mirascope/core/gemini/stream.py,sha256=TPK4zKE_A0pTUKvoPktoq6BdFwxbE0S1yAeY2f9iSSg,3697
|
|
@@ -197,13 +197,13 @@ mirascope/core/gemini/_utils/_convert_finish_reason_to_common_finish_reasons.py,
|
|
|
197
197
|
mirascope/core/gemini/_utils/_convert_message_params.py,sha256=a5WaerYG2INBtxGg3qkLsAwVtJVAvK79O_83zJmHH3A,4621
|
|
198
198
|
mirascope/core/gemini/_utils/_get_json_output.py,sha256=C2aeeEmcC-mBnbRL8aq3yohdCZJWMJc78E2GYqefK9k,1240
|
|
199
199
|
mirascope/core/gemini/_utils/_handle_stream.py,sha256=1JoRIjwuVehVIjkvT_U2r9TMvMZB96ldp1n1AGon-tw,1153
|
|
200
|
-
mirascope/core/gemini/_utils/_message_param_converter.py,sha256=
|
|
200
|
+
mirascope/core/gemini/_utils/_message_param_converter.py,sha256=LgI4NJxoa_f2_eCjbe5OegkB43ififDO61jBE2l4T78,6862
|
|
201
201
|
mirascope/core/gemini/_utils/_setup_call.py,sha256=jGem6lhpdEU6tLfqYDAs9z1-Uc9_2lxDj4hieZC-CS0,4546
|
|
202
202
|
mirascope/core/groq/__init__.py,sha256=wo-_txqiLC3iswnXmPX4C6IgsU-_wv1DbBlNDY4rEvo,798
|
|
203
203
|
mirascope/core/groq/_call.py,sha256=gR8VN5IaYWIFXc0csn995q59FM0nBs-xVFjkVycPjMM,2223
|
|
204
204
|
mirascope/core/groq/_call_kwargs.py,sha256=trT8AdQ-jdQPYKlGngIMRwwQuvKuvAbvI1yyozftOuI,425
|
|
205
205
|
mirascope/core/groq/call_params.py,sha256=FchtsaeohTzYKzY9f2fUIzjgG2y4OtsnRWiHsUBLdi0,1619
|
|
206
|
-
mirascope/core/groq/call_response.py,sha256=
|
|
206
|
+
mirascope/core/groq/call_response.py,sha256=crOMezt8SWGWuEBBEOB_cGM3ia_TXTWWQyUgkYxXpFc,6248
|
|
207
207
|
mirascope/core/groq/call_response_chunk.py,sha256=5gKDAzncgQ8m-HKR38PJ1G3aFX1KoyabNxsy1UZ7koI,2792
|
|
208
208
|
mirascope/core/groq/dynamic_config.py,sha256=AjcXBVeBdMiI6ObHanX3TVMKYxm4iWhXju3m6d-ZWMY,937
|
|
209
209
|
mirascope/core/groq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -215,7 +215,7 @@ mirascope/core/groq/_utils/_convert_common_call_params.py,sha256=vRvabHCsB5h-Bv-
|
|
|
215
215
|
mirascope/core/groq/_utils/_convert_message_params.py,sha256=K5c1V_kVV3aXo6yln_8CXhv5mcw2zGxgn6OEOh_VDCo,4337
|
|
216
216
|
mirascope/core/groq/_utils/_get_json_output.py,sha256=vMbXmHC6OIwkg0TjyCTTUtIww3lfbApNy6yWgoAijGA,1012
|
|
217
217
|
mirascope/core/groq/_utils/_handle_stream.py,sha256=CsjFZYip-Xxo-ZP6dSdNrIW9xSl-feTnYiYv-r39U0s,4605
|
|
218
|
-
mirascope/core/groq/_utils/_message_param_converter.py,sha256=
|
|
218
|
+
mirascope/core/groq/_utils/_message_param_converter.py,sha256=wcUzgrtOOG8DAPpsbYh7eg_wvJ8wmBAFnvyi6rm4q1w,3265
|
|
219
219
|
mirascope/core/groq/_utils/_setup_call.py,sha256=fsXbP1NpzpJ3rq3oMvNEvgN4TJzudYb2zrW7JwKhbBM,4424
|
|
220
220
|
mirascope/core/litellm/__init__.py,sha256=eBLmGsbY2SNEf3DPLYS-WgpskwaWbBeonpcBc3Zxh94,779
|
|
221
221
|
mirascope/core/litellm/_call.py,sha256=mSCU9nT0ZQTru6BppGJgtudAWqWFs0a6m5q-VYbM-ow,2391
|
|
@@ -232,7 +232,7 @@ mirascope/core/mistral/__init__.py,sha256=6Jz9mYmijycfsCXYKgxhxMEwmQEqOwZXmJt0F7
|
|
|
232
232
|
mirascope/core/mistral/_call.py,sha256=p9aSLYVSNgaIGA5SqCgGuT7iWN5WLfwmXubk4IF-w_I,2274
|
|
233
233
|
mirascope/core/mistral/_call_kwargs.py,sha256=vZxlADPx4muIePARGdfKOVQpxpIoaXT9tCG6kY5oxSQ,513
|
|
234
234
|
mirascope/core/mistral/call_params.py,sha256=wWHWI9hRnfloGhQurMwCcka9c1u_TwgcN84Ih6qVBXs,1054
|
|
235
|
-
mirascope/core/mistral/call_response.py,sha256=
|
|
235
|
+
mirascope/core/mistral/call_response.py,sha256=VulQ7JjXrGWAM3pRMZ9bP8iH4F1J6cp6LL-8YVooZ_w,6047
|
|
236
236
|
mirascope/core/mistral/call_response_chunk.py,sha256=4TC3F5h_Ii3WrbDDunCOudl9wIlXMVCOigIPnJ5FWGE,2835
|
|
237
237
|
mirascope/core/mistral/dynamic_config.py,sha256=-pzTvXf870NxEhjpgjqPahFWqqifzMhSbvM0kXs2G_s,937
|
|
238
238
|
mirascope/core/mistral/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -251,7 +251,7 @@ mirascope/core/openai/__init__.py,sha256=1-iKWt3nEk2GjB9UuH2WcAiPajsp9B3J6G-v5Ly
|
|
|
251
251
|
mirascope/core/openai/_call.py,sha256=ExXdY3rjBbil0ija2HlGMRvcOE2zOOj13rgliw8nmFc,2260
|
|
252
252
|
mirascope/core/openai/_call_kwargs.py,sha256=x53EZmxqroNewR194M_JkRP1Ejuh4BTtDL-b7XNSo2Q,435
|
|
253
253
|
mirascope/core/openai/call_params.py,sha256=hexjEPRuPpq7dkyMgdL48jjY-J5zvHHvaHMKWGnWYHI,2494
|
|
254
|
-
mirascope/core/openai/call_response.py,sha256=
|
|
254
|
+
mirascope/core/openai/call_response.py,sha256=BI3P3gqZuhfZc0B6ApfUKJF8FfRvuU9g52u2UOcAyvg,7804
|
|
255
255
|
mirascope/core/openai/call_response_chunk.py,sha256=yMjzGQa1sMDbFBn_tZPIuR6FkxyrHqxaxoHwrEQHV80,3722
|
|
256
256
|
mirascope/core/openai/dynamic_config.py,sha256=D36E3CMpXSaj5I8FEmtzMJz9gtTsNz1pVW_iM3dOCcw,1045
|
|
257
257
|
mirascope/core/openai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -260,16 +260,16 @@ mirascope/core/openai/tool.py,sha256=iJWJQrY3-1Rq5OywzKFO9JUAcglneGD0UtkS3pcA0pg
|
|
|
260
260
|
mirascope/core/openai/_utils/__init__.py,sha256=J4ZMAuU4X0PN-nbYj2ikX2EgYRq-T00GbontdmkTcH0,454
|
|
261
261
|
mirascope/core/openai/_utils/_calculate_cost.py,sha256=jm7TlGdnDlcWIHPlPo1TzJW70WIFo8PjuHurnroUsB4,7587
|
|
262
262
|
mirascope/core/openai/_utils/_convert_common_call_params.py,sha256=gvxsRdULxiC2137M9l53hUmF0ZkBxFQFurhWBcl_5Cg,739
|
|
263
|
-
mirascope/core/openai/_utils/_convert_message_params.py,sha256=
|
|
263
|
+
mirascope/core/openai/_utils/_convert_message_params.py,sha256=MmEqOPncCGSGpqcmkTB2LFNXJ-2GQnq_em3puis1Enc,4632
|
|
264
264
|
mirascope/core/openai/_utils/_get_json_output.py,sha256=Q_5R6NFFDvmLoz9BQiymC5AEyYvxKPH2_XnOQZ8hIkU,1215
|
|
265
265
|
mirascope/core/openai/_utils/_handle_stream.py,sha256=adsHAcTtGyMMFU9xnUsE4Yd2wrhSNSjcVddkS74mli0,5226
|
|
266
|
-
mirascope/core/openai/_utils/_message_param_converter.py,sha256=
|
|
266
|
+
mirascope/core/openai/_utils/_message_param_converter.py,sha256=2CBbNTe-QzJFS5Z1j1391_M1XCGXQaE87WSyvSCu6CU,3224
|
|
267
267
|
mirascope/core/openai/_utils/_setup_call.py,sha256=8zxNZrWcZgBxi4kwzeXHsxFoJW0n0MZYSmSAYj3ossk,5500
|
|
268
268
|
mirascope/core/vertex/__init__.py,sha256=rhvMVCoN29wuryxGSD9JUKKSlLsWeOnw6Dkk2CqYDwk,839
|
|
269
269
|
mirascope/core/vertex/_call.py,sha256=ebQmWoQLnxScyxhnGKU3MmHkXXzzs_Sw2Yf-d3nZFwU,2323
|
|
270
270
|
mirascope/core/vertex/_call_kwargs.py,sha256=6JxQt1bAscbhPWTGESG1TiskB-i5imDHqLMgbMHmyfI,353
|
|
271
271
|
mirascope/core/vertex/call_params.py,sha256=ISBnMITxAtvuGmpLF9UdkqcDS43RwtuuVakk01YIHDs,706
|
|
272
|
-
mirascope/core/vertex/call_response.py,sha256=
|
|
272
|
+
mirascope/core/vertex/call_response.py,sha256=mbxBsgttlu4nr53ot2geEncj20nicSaOZMpSwbCEOv4,6108
|
|
273
273
|
mirascope/core/vertex/call_response_chunk.py,sha256=yzVY9A18eZQyd5YnksKaJaXZ4s2yAK214wJEXPoQVHI,2627
|
|
274
274
|
mirascope/core/vertex/dynamic_config.py,sha256=KISQf7c2Rf1EpaS_2Ik6beA1w9uz_dAvMBk4nQcrdaM,809
|
|
275
275
|
mirascope/core/vertex/stream.py,sha256=81p04LZ47V6usjf1eQ91csLc4ZVOWSc0BAP2Vc9dCbQ,3620
|
|
@@ -281,7 +281,7 @@ mirascope/core/vertex/_utils/_convert_finish_reason_to_common_finish_reasons.py,
|
|
|
281
281
|
mirascope/core/vertex/_utils/_convert_message_params.py,sha256=R7FNeRUgFRPnEK6W_RkgEpp97zv3x0jUYawMrhbYd-o,5267
|
|
282
282
|
mirascope/core/vertex/_utils/_get_json_output.py,sha256=NxbdPPde9lyWSaWQYNPFgmFfOLwNBuyLKwXcS6q6GHw,1298
|
|
283
283
|
mirascope/core/vertex/_utils/_handle_stream.py,sha256=zUhwnkGUdQvfU8AJ3u975HoNR1BfaWH7_VBcmBaNmuU,1139
|
|
284
|
-
mirascope/core/vertex/_utils/_message_param_converter.py,sha256=
|
|
284
|
+
mirascope/core/vertex/_utils/_message_param_converter.py,sha256=8lPfripx-qgN7-NCD5ps_furZJ2sfxdeTl7O7UT4Zko,5151
|
|
285
285
|
mirascope/core/vertex/_utils/_setup_call.py,sha256=Xt2b0Rff2-B8jiIWK_rRVl57Wff_Kbom2ItQJ6fH0gI,4751
|
|
286
286
|
mirascope/integrations/__init__.py,sha256=ieLWknpbkO_gABIVl9790YTTCCRO9ISQ35-1SeOSU0Q,392
|
|
287
287
|
mirascope/integrations/_middleware_factory.py,sha256=MUd06zhJxwMnoyrPncrMQXL-qwhQsPqt27rf4NOCDnE,17309
|
|
@@ -299,11 +299,11 @@ mirascope/integrations/otel/_with_otel.py,sha256=tbjd6BEbcSfnsm5CWHBoHwbRNrHt6-t
|
|
|
299
299
|
mirascope/llm/__init__.py,sha256=6JWQFeluDzPC4naQY2WneSwsS-LOTeP0NpmoJ2g8zps,94
|
|
300
300
|
mirascope/llm/_protocols.py,sha256=adcuSqKmi7M-N8Yy6GWFBlE9wIgtdLbnTq8S6IdAt7g,16380
|
|
301
301
|
mirascope/llm/_response_metaclass.py,sha256=6DLQb5IrqMldyEXHT_pAsr2DlUVc9CmZuZiBXG37WK8,851
|
|
302
|
-
mirascope/llm/call_response.py,sha256
|
|
302
|
+
mirascope/llm/call_response.py,sha256=_FNqaNPp3HVSUI6oNhJVs8b5ZTNXXyNAL14Ke1ld-M8,4620
|
|
303
303
|
mirascope/llm/call_response_chunk.py,sha256=9Vyi5_hpgill5CB8BwfSj33VR8sirY2ceTRbru0G3Sw,1820
|
|
304
304
|
mirascope/llm/llm_call.py,sha256=6ErSt8mtT0GQUF92snNewy8TAYgo-gVu7Dd1KC-ob5o,8398
|
|
305
305
|
mirascope/llm/llm_override.py,sha256=7L222CGbJjQPB-lCoGB29XYHyzCvqEyDtcPV-L4Ao7I,6163
|
|
306
|
-
mirascope/llm/stream.py,sha256=
|
|
306
|
+
mirascope/llm/stream.py,sha256=mVcpBZqpAInVsUc3bO-jiAA5S9OfgyVErIyuz4xLzSE,5731
|
|
307
307
|
mirascope/llm/tool.py,sha256=Rz9W2g0I9bnTHFdIzTIEje8VMe2Di4AZhrNhgQusSjA,1832
|
|
308
308
|
mirascope/mcp/__init__.py,sha256=mGboroTrBbzuZ_8uBssOhkqiJOJ4mNCvaJvS7mhumhg,155
|
|
309
309
|
mirascope/mcp/client.py,sha256=ZsjaT6E5i4Cdm3iVp2-JTuDniUlzynWeeJvnBAtuffQ,11123
|
|
@@ -331,7 +331,7 @@ mirascope/v0/base/ops_utils.py,sha256=1Qq-VIwgHBaYutiZsS2MUQ4OgPC3APyywI5bTiTAmA
|
|
|
331
331
|
mirascope/v0/base/prompts.py,sha256=FM2Yz98cSnDceYogiwPrp4BALf3_F3d4fIOCGAkd-SE,1298
|
|
332
332
|
mirascope/v0/base/types.py,sha256=ZfatJoX0Yl0e3jhv0D_MhiSVHLYUeJsdN3um3iE10zY,352
|
|
333
333
|
mirascope/v0/base/utils.py,sha256=XREPENRQTu8gpMhHU8RC8qH_am3FfGUvY-dJ6x8i-mw,681
|
|
334
|
-
mirascope-1.16.
|
|
335
|
-
mirascope-1.16.
|
|
336
|
-
mirascope-1.16.
|
|
337
|
-
mirascope-1.16.
|
|
334
|
+
mirascope-1.16.9.dist-info/METADATA,sha256=9jFiebPALIpG-G6PEXMz60nopXRdMoeZLmXhFpIgO1g,8545
|
|
335
|
+
mirascope-1.16.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
336
|
+
mirascope-1.16.9.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
|
|
337
|
+
mirascope-1.16.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|