mirascope 1.18.2__py3-none-any.whl → 1.18.3__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/__init__.py +1 -0
- mirascope/core/__init__.py +5 -0
- mirascope/core/anthropic/call_response.py +0 -2
- mirascope/core/azure/call_response.py +0 -2
- mirascope/core/base/call_response.py +0 -2
- mirascope/core/bedrock/call_response.py +0 -2
- mirascope/core/cohere/call_response.py +0 -2
- mirascope/core/gemini/call_response.py +0 -2
- mirascope/core/google/_utils/_convert_message_params.py +148 -115
- mirascope/core/google/call_response.py +12 -6
- mirascope/core/groq/call_response.py +0 -2
- mirascope/core/mistral/call_response.py +0 -2
- mirascope/core/openai/call_response.py +0 -2
- mirascope/core/vertex/call_response.py +0 -2
- mirascope/llm/__init__.py +3 -1
- mirascope/llm/call_response.py +0 -2
- mirascope/llm/llm_call.py +53 -25
- {mirascope-1.18.2.dist-info → mirascope-1.18.3.dist-info}/METADATA +2 -2
- {mirascope-1.18.2.dist-info → mirascope-1.18.3.dist-info}/RECORD +21 -21
- {mirascope-1.18.2.dist-info → mirascope-1.18.3.dist-info}/WHEEL +0 -0
- {mirascope-1.18.2.dist-info → mirascope-1.18.3.dist-info}/licenses/LICENSE +0 -0
mirascope/__init__.py
CHANGED
mirascope/core/__init__.py
CHANGED
|
@@ -4,9 +4,11 @@ from contextlib import suppress
|
|
|
4
4
|
|
|
5
5
|
from . import base
|
|
6
6
|
from .base import (
|
|
7
|
+
BaseCallResponse,
|
|
7
8
|
BaseDynamicConfig,
|
|
8
9
|
BaseMessageParam,
|
|
9
10
|
BasePrompt,
|
|
11
|
+
BaseStream,
|
|
10
12
|
BaseTool,
|
|
11
13
|
BaseToolKit,
|
|
12
14
|
FromCallArgs,
|
|
@@ -52,11 +54,14 @@ __all__ = [
|
|
|
52
54
|
"anthropic",
|
|
53
55
|
"azure",
|
|
54
56
|
"base",
|
|
57
|
+
"BaseCallResponse",
|
|
55
58
|
"BaseDynamicConfig",
|
|
56
59
|
"BaseMessageParam",
|
|
57
60
|
"BasePrompt",
|
|
58
61
|
"BaseTool",
|
|
59
62
|
"BaseToolKit",
|
|
63
|
+
"BaseCallResponse",
|
|
64
|
+
"BaseStream",
|
|
60
65
|
"cohere",
|
|
61
66
|
"FromCallArgs",
|
|
62
67
|
"gemini",
|
|
@@ -118,7 +118,6 @@ class AnthropicCallResponse(
|
|
|
118
118
|
"""Returns the assistants's response as a message parameter."""
|
|
119
119
|
return MessageParam(**self.response.model_dump(include={"content", "role"}))
|
|
120
120
|
|
|
121
|
-
@computed_field
|
|
122
121
|
@cached_property
|
|
123
122
|
def tools(self) -> list[AnthropicTool] | None:
|
|
124
123
|
"""Returns any available tool calls as their `AnthropicTool` definition.
|
|
@@ -140,7 +139,6 @@ class AnthropicCallResponse(
|
|
|
140
139
|
|
|
141
140
|
return extracted_tools
|
|
142
141
|
|
|
143
|
-
@computed_field
|
|
144
142
|
@cached_property
|
|
145
143
|
def tool(self) -> AnthropicTool | None:
|
|
146
144
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -125,7 +125,6 @@ class AzureCallResponse(
|
|
|
125
125
|
content=message_param.content, tool_calls=message_param.tool_calls
|
|
126
126
|
)
|
|
127
127
|
|
|
128
|
-
@computed_field
|
|
129
128
|
@cached_property
|
|
130
129
|
def tools(self) -> list[AzureTool] | None:
|
|
131
130
|
"""Returns any available tool calls as their `AzureTool` definition.
|
|
@@ -149,7 +148,6 @@ class AzureCallResponse(
|
|
|
149
148
|
|
|
150
149
|
return extracted_tools
|
|
151
150
|
|
|
152
|
-
@computed_field
|
|
153
151
|
@cached_property
|
|
154
152
|
def tool(self) -> AzureTool | None:
|
|
155
153
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -239,14 +239,12 @@ class BaseCallResponse(
|
|
|
239
239
|
"""Returns the assistant's response as a message parameter."""
|
|
240
240
|
...
|
|
241
241
|
|
|
242
|
-
@computed_field
|
|
243
242
|
@cached_property
|
|
244
243
|
@abstractmethod
|
|
245
244
|
def tools(self) -> list[_BaseToolT] | None:
|
|
246
245
|
"""Returns the tools for the 0th choice message."""
|
|
247
246
|
...
|
|
248
247
|
|
|
249
|
-
@computed_field
|
|
250
248
|
@cached_property
|
|
251
249
|
@abstractmethod
|
|
252
250
|
def tool(self) -> _BaseToolT | None:
|
|
@@ -150,7 +150,6 @@ class BedrockCallResponse(
|
|
|
150
150
|
return AssistantMessageTypeDef(role="assistant", content=[])
|
|
151
151
|
return AssistantMessageTypeDef(role="assistant", content=message["content"])
|
|
152
152
|
|
|
153
|
-
@computed_field
|
|
154
153
|
@cached_property
|
|
155
154
|
def tools(self) -> list[BedrockTool] | None:
|
|
156
155
|
"""Returns any available tool calls as their `BedrockTool` definition.
|
|
@@ -180,7 +179,6 @@ class BedrockCallResponse(
|
|
|
180
179
|
|
|
181
180
|
return extracted_tools
|
|
182
181
|
|
|
183
|
-
@computed_field
|
|
184
182
|
@cached_property
|
|
185
183
|
def tool(self) -> BedrockTool | None:
|
|
186
184
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -129,7 +129,6 @@ class CohereCallResponse(
|
|
|
129
129
|
role="assistant", # pyright: ignore [reportCallIssue]
|
|
130
130
|
)
|
|
131
131
|
|
|
132
|
-
@computed_field
|
|
133
132
|
@cached_property
|
|
134
133
|
def tools(self) -> list[CohereTool] | None:
|
|
135
134
|
"""Returns the tools for the 0th choice message.
|
|
@@ -147,7 +146,6 @@ class CohereCallResponse(
|
|
|
147
146
|
break
|
|
148
147
|
return extracted_tools
|
|
149
148
|
|
|
150
|
-
@computed_field
|
|
151
149
|
@cached_property
|
|
152
150
|
def tool(self) -> CohereTool | None:
|
|
153
151
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -140,7 +140,6 @@ class GeminiCallResponse(
|
|
|
140
140
|
"""Returns the models's response as a message parameter."""
|
|
141
141
|
return {"role": "model", "parts": self.response.parts} # pyright: ignore [reportReturnType]
|
|
142
142
|
|
|
143
|
-
@computed_field
|
|
144
143
|
@cached_property
|
|
145
144
|
def tools(self) -> list[GeminiTool] | None:
|
|
146
145
|
"""Returns the list of tools for the 0th candidate's 0th content part."""
|
|
@@ -157,7 +156,6 @@ class GeminiCallResponse(
|
|
|
157
156
|
|
|
158
157
|
return extracted_tools
|
|
159
158
|
|
|
160
|
-
@computed_field
|
|
161
159
|
@cached_property
|
|
162
160
|
def tool(self) -> GeminiTool | None:
|
|
163
161
|
"""Returns the 0th tool for the 0th candidate's 0th content part.
|
|
@@ -1,18 +1,62 @@
|
|
|
1
1
|
"""Utility for converting `BaseMessageParam` to `ContentsType`"""
|
|
2
2
|
|
|
3
|
+
import asyncio
|
|
3
4
|
import base64
|
|
4
5
|
import io
|
|
6
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
5
7
|
|
|
6
|
-
import PIL.Image
|
|
7
8
|
from google.genai import Client
|
|
8
|
-
from google.genai.types import
|
|
9
|
+
from google.genai.types import (
|
|
10
|
+
BlobDict,
|
|
11
|
+
ContentDict,
|
|
12
|
+
FileDataDict,
|
|
13
|
+
PartDict,
|
|
14
|
+
)
|
|
9
15
|
|
|
10
16
|
from ...base import BaseMessageParam
|
|
11
|
-
from ...base._utils import get_audio_type
|
|
17
|
+
from ...base._utils import get_audio_type, get_image_type
|
|
12
18
|
from ...base._utils._parse_content_template import _load_media
|
|
13
19
|
|
|
14
20
|
|
|
15
|
-
def
|
|
21
|
+
def _check_image_media_type(media_type: str) -> None:
|
|
22
|
+
"""Raises a `ValueError` if the image media type is not supported."""
|
|
23
|
+
if media_type not in [
|
|
24
|
+
"image/jpeg",
|
|
25
|
+
"image/png",
|
|
26
|
+
"image/webp",
|
|
27
|
+
"image/heic",
|
|
28
|
+
"image/heif",
|
|
29
|
+
]:
|
|
30
|
+
raise ValueError(
|
|
31
|
+
f"Unsupported image media type: {media_type}. "
|
|
32
|
+
"Google currently only supports JPEG, PNG, WebP, HEIC, "
|
|
33
|
+
"and HEIF images."
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _check_audio_media_type(media_type: str) -> None:
|
|
38
|
+
"""Raises a `ValueError` if the audio media type is not supported."""
|
|
39
|
+
if media_type not in [
|
|
40
|
+
"audio/wav",
|
|
41
|
+
"audio/mp3",
|
|
42
|
+
"audio/aiff",
|
|
43
|
+
"audio/aac",
|
|
44
|
+
"audio/ogg",
|
|
45
|
+
"audio/flac",
|
|
46
|
+
]:
|
|
47
|
+
raise ValueError(
|
|
48
|
+
f"Unsupported audio media type: {media_type}. "
|
|
49
|
+
"Google currently only supports WAV, MP3, AIFF, AAC, OGG, "
|
|
50
|
+
"and FLAC audio file types."
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _over_file_size_limit(size: int) -> bool:
|
|
55
|
+
"""Check if the total file size exceeds the limit (15mb)."""
|
|
56
|
+
return size > 15 * 1024 * 1024 # 15MB
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
async def _convert_message_params_async(
|
|
16
60
|
message_params: list[BaseMessageParam | ContentDict], client: Client
|
|
17
61
|
) -> list[ContentDict]:
|
|
18
62
|
converted_message_params = []
|
|
@@ -39,139 +83,109 @@ def convert_message_params(
|
|
|
39
83
|
)
|
|
40
84
|
else:
|
|
41
85
|
converted_content = []
|
|
42
|
-
|
|
86
|
+
total_file_size = 0
|
|
87
|
+
must_upload: dict[int, BlobDict] = {}
|
|
88
|
+
for index, part in enumerate(content):
|
|
43
89
|
if part.type == "text":
|
|
44
90
|
converted_content.append(PartDict(text=part.text))
|
|
45
91
|
elif part.type == "image":
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
f"Unsupported image media type: {part.media_type}. "
|
|
55
|
-
"Google currently only supports JPEG, PNG, WebP, HEIC, "
|
|
56
|
-
"and HEIF images."
|
|
57
|
-
)
|
|
58
|
-
converted_content.append(
|
|
59
|
-
PartDict(
|
|
60
|
-
inline_data=BlobDict(
|
|
61
|
-
data=part.image, mime_type=part.media_type
|
|
62
|
-
)
|
|
63
|
-
)
|
|
64
|
-
)
|
|
92
|
+
_check_image_media_type(part.media_type)
|
|
93
|
+
blob_dict = BlobDict(data=part.image, mime_type=part.media_type)
|
|
94
|
+
converted_content.append(PartDict(inline_data=blob_dict))
|
|
95
|
+
image_size = len(part.image)
|
|
96
|
+
total_file_size += image_size
|
|
97
|
+
if _over_file_size_limit(total_file_size):
|
|
98
|
+
must_upload[index] = blob_dict
|
|
99
|
+
total_file_size -= image_size
|
|
65
100
|
elif part.type == "image_url":
|
|
66
101
|
if (
|
|
67
|
-
|
|
68
|
-
|
|
102
|
+
client.vertexai
|
|
103
|
+
or not part.url.startswith(("https://", "http://"))
|
|
104
|
+
or "generativelanguage.googleapis.com" in part.url
|
|
69
105
|
):
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
else "image/unknown"
|
|
76
|
-
)
|
|
77
|
-
if media_type not in [
|
|
78
|
-
"image/jpeg",
|
|
79
|
-
"image/png",
|
|
80
|
-
"image/webp",
|
|
81
|
-
"image/heic",
|
|
82
|
-
"image/heif",
|
|
83
|
-
]:
|
|
84
|
-
raise ValueError(
|
|
85
|
-
f"Unsupported image media type: {media_type}. "
|
|
86
|
-
"Google currently only supports JPEG, PNG, WebP, HEIC, "
|
|
87
|
-
"and HEIF images."
|
|
88
|
-
)
|
|
89
|
-
if client.vertexai:
|
|
90
|
-
uri = part.url
|
|
91
|
-
else:
|
|
92
|
-
downloaded_image.seek(0)
|
|
93
|
-
file_ref = client.files.upload(
|
|
94
|
-
file=downloaded_image, config={"mime_type": media_type}
|
|
106
|
+
converted_content.append(
|
|
107
|
+
PartDict(
|
|
108
|
+
file_data=FileDataDict(
|
|
109
|
+
file_uri=part.url, mime_type=None
|
|
110
|
+
)
|
|
95
111
|
)
|
|
96
|
-
|
|
97
|
-
media_type = file_ref.mime_type
|
|
112
|
+
)
|
|
98
113
|
else:
|
|
99
|
-
|
|
100
|
-
media_type =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
file_data=FileDataDict(file_uri=uri, mime_type=media_type)
|
|
114
|
+
downloaded_image = _load_media(part.url)
|
|
115
|
+
media_type = get_image_type(downloaded_image)
|
|
116
|
+
_check_image_media_type(media_type)
|
|
117
|
+
blob_dict = BlobDict(
|
|
118
|
+
data=downloaded_image, mime_type=media_type
|
|
105
119
|
)
|
|
106
|
-
|
|
120
|
+
converted_content.append(PartDict(inline_data=blob_dict))
|
|
121
|
+
image_size = len(downloaded_image)
|
|
122
|
+
total_file_size += image_size
|
|
123
|
+
if _over_file_size_limit(total_file_size):
|
|
124
|
+
must_upload[index] = blob_dict
|
|
125
|
+
total_file_size -= image_size
|
|
107
126
|
elif part.type == "audio":
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"audio/ogg",
|
|
114
|
-
"audio/flac",
|
|
115
|
-
]:
|
|
116
|
-
raise ValueError(
|
|
117
|
-
f"Unsupported audio media type: {part.media_type}. "
|
|
118
|
-
"Google currently only supports WAV, MP3, AIFF, AAC, OGG, "
|
|
119
|
-
"and FLAC audio file types."
|
|
120
|
-
)
|
|
121
|
-
converted_content.append(
|
|
122
|
-
PartDict(
|
|
123
|
-
inline_data=BlobDict(
|
|
124
|
-
data=part.audio
|
|
125
|
-
if isinstance(part.audio, bytes)
|
|
126
|
-
else base64.b64decode(part.audio),
|
|
127
|
-
mime_type=part.media_type,
|
|
128
|
-
)
|
|
129
|
-
)
|
|
127
|
+
_check_audio_media_type(part.media_type)
|
|
128
|
+
audio_data = (
|
|
129
|
+
part.audio
|
|
130
|
+
if isinstance(part.audio, bytes)
|
|
131
|
+
else base64.b64decode(part.audio)
|
|
130
132
|
)
|
|
133
|
+
blob_dict = BlobDict(data=audio_data, mime_type=part.media_type)
|
|
134
|
+
converted_content.append(PartDict(inline_data=blob_dict))
|
|
135
|
+
audio_size = len(audio_data)
|
|
136
|
+
total_file_size += audio_size
|
|
137
|
+
if _over_file_size_limit(total_file_size):
|
|
138
|
+
must_upload[index] = blob_dict
|
|
139
|
+
total_file_size -= audio_size
|
|
131
140
|
elif part.type == "audio_url":
|
|
132
141
|
if (
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
client.vertexai
|
|
143
|
+
or not part.url.startswith(("https://", "http://"))
|
|
144
|
+
or "generativelanguage.googleapis.com" in part.url
|
|
135
145
|
):
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"audio/aiff",
|
|
142
|
-
"audio/aac",
|
|
143
|
-
"audio/ogg",
|
|
144
|
-
"audio/flac",
|
|
145
|
-
]:
|
|
146
|
-
raise ValueError(
|
|
147
|
-
f"Unsupported audio media type: {audio_type}. "
|
|
148
|
-
"Google currently only supports WAV, MP3, AIFF, AAC, OGG, "
|
|
149
|
-
"and FLAC audio file types."
|
|
150
|
-
)
|
|
151
|
-
if client.vertexai:
|
|
152
|
-
uri = part.url
|
|
153
|
-
else:
|
|
154
|
-
downloaded_audio = io.BytesIO(downloaded_audio)
|
|
155
|
-
downloaded_audio.seek(0)
|
|
156
|
-
file_ref = client.files.upload(
|
|
157
|
-
file=downloaded_audio, config={"mime_type": audio_type}
|
|
146
|
+
converted_content.append(
|
|
147
|
+
PartDict(
|
|
148
|
+
file_data=FileDataDict(
|
|
149
|
+
file_uri=part.url, mime_type=None
|
|
150
|
+
)
|
|
158
151
|
)
|
|
159
|
-
|
|
160
|
-
media_type = file_ref.mime_type
|
|
152
|
+
)
|
|
161
153
|
else:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
file_data=FileDataDict(file_uri=uri, mime_type=audio_type)
|
|
154
|
+
downloaded_audio = _load_media(part.url)
|
|
155
|
+
media_type = get_audio_type(downloaded_audio)
|
|
156
|
+
_check_audio_media_type(media_type)
|
|
157
|
+
blob_dict = BlobDict(
|
|
158
|
+
data=downloaded_audio, mime_type=media_type
|
|
168
159
|
)
|
|
169
|
-
|
|
160
|
+
converted_content.append(PartDict(inline_data=blob_dict))
|
|
161
|
+
audio_size = len(downloaded_audio)
|
|
162
|
+
total_file_size += audio_size
|
|
163
|
+
if _over_file_size_limit(total_file_size):
|
|
164
|
+
must_upload[index] = blob_dict
|
|
165
|
+
total_file_size -= audio_size
|
|
170
166
|
else:
|
|
171
167
|
raise ValueError(
|
|
172
168
|
"Google currently only supports text, image, and audio parts. "
|
|
173
169
|
f"Part provided: {part.type}"
|
|
174
170
|
)
|
|
171
|
+
|
|
172
|
+
if must_upload:
|
|
173
|
+
indices, blob_dicts = zip(*must_upload.items(), strict=True)
|
|
174
|
+
upload_tasks = [
|
|
175
|
+
client.aio.files.upload(
|
|
176
|
+
file=io.BytesIO(blob_dict["data"]),
|
|
177
|
+
config={"mime_type": blob_dict.get("mime_type", None)},
|
|
178
|
+
)
|
|
179
|
+
for blob_dict in blob_dicts
|
|
180
|
+
]
|
|
181
|
+
file_refs = await asyncio.gather(*upload_tasks)
|
|
182
|
+
for index, file_ref in zip(indices, file_refs, strict=True):
|
|
183
|
+
converted_content[index] = PartDict(
|
|
184
|
+
file_data=FileDataDict(
|
|
185
|
+
file_uri=file_ref.uri, mime_type=file_ref.mime_type
|
|
186
|
+
)
|
|
187
|
+
)
|
|
188
|
+
|
|
175
189
|
converted_message_params.append(
|
|
176
190
|
{
|
|
177
191
|
"role": role if role == "user" else "model",
|
|
@@ -179,3 +193,22 @@ def convert_message_params(
|
|
|
179
193
|
}
|
|
180
194
|
)
|
|
181
195
|
return converted_message_params
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def convert_message_params(
|
|
199
|
+
message_params: list[BaseMessageParam | ContentDict], client: Client
|
|
200
|
+
) -> list[ContentDict]:
|
|
201
|
+
"""Convert message params to Google's ContentDict format.
|
|
202
|
+
|
|
203
|
+
If called from sync context, uses asyncio.run().
|
|
204
|
+
If called from async context, uses the current event loop.
|
|
205
|
+
"""
|
|
206
|
+
try:
|
|
207
|
+
asyncio.get_running_loop()
|
|
208
|
+
with ThreadPoolExecutor(max_workers=1) as executor:
|
|
209
|
+
future = executor.submit(
|
|
210
|
+
asyncio.run, _convert_message_params_async(message_params, client)
|
|
211
|
+
)
|
|
212
|
+
return future.result()
|
|
213
|
+
except RuntimeError:
|
|
214
|
+
return asyncio.run(_convert_message_params_async(message_params, client))
|
|
@@ -109,14 +109,22 @@ class GoogleCallResponse(
|
|
|
109
109
|
return None
|
|
110
110
|
|
|
111
111
|
@property
|
|
112
|
-
def input_tokens(self) -> None:
|
|
112
|
+
def input_tokens(self) -> int | None:
|
|
113
113
|
"""Returns the number of input tokens."""
|
|
114
|
-
return
|
|
114
|
+
return (
|
|
115
|
+
self.response.usage_metadata.prompt_token_count
|
|
116
|
+
if self.response.usage_metadata
|
|
117
|
+
else None
|
|
118
|
+
)
|
|
115
119
|
|
|
116
120
|
@property
|
|
117
|
-
def output_tokens(self) -> None:
|
|
121
|
+
def output_tokens(self) -> int | None:
|
|
118
122
|
"""Returns the number of output tokens."""
|
|
119
|
-
return
|
|
123
|
+
return (
|
|
124
|
+
self.response.usage_metadata.candidates_token_count
|
|
125
|
+
if self.response.usage_metadata
|
|
126
|
+
else None
|
|
127
|
+
)
|
|
120
128
|
|
|
121
129
|
@property
|
|
122
130
|
def cost(self) -> float | None:
|
|
@@ -129,7 +137,6 @@ class GoogleCallResponse(
|
|
|
129
137
|
"""Returns the models's response as a message parameter."""
|
|
130
138
|
return {"role": "model", "parts": self.response.candidates[0].content.parts} # pyright: ignore [reportReturnType, reportOptionalSubscript, reportOptionalMemberAccess]
|
|
131
139
|
|
|
132
|
-
@computed_field
|
|
133
140
|
@cached_property
|
|
134
141
|
def tools(self) -> list[GoogleTool] | None:
|
|
135
142
|
"""Returns the list of tools for the 0th candidate's 0th content part."""
|
|
@@ -146,7 +153,6 @@ class GoogleCallResponse(
|
|
|
146
153
|
|
|
147
154
|
return extracted_tools
|
|
148
155
|
|
|
149
|
-
@computed_field
|
|
150
156
|
@cached_property
|
|
151
157
|
def tool(self) -> GoogleTool | None:
|
|
152
158
|
"""Returns the 0th tool for the 0th candidate's 0th content part.
|
|
@@ -119,7 +119,6 @@ class GroqCallResponse(
|
|
|
119
119
|
)
|
|
120
120
|
return ChatCompletionAssistantMessageParam(**message_param)
|
|
121
121
|
|
|
122
|
-
@computed_field
|
|
123
122
|
@cached_property
|
|
124
123
|
def tools(self) -> list[GroqTool] | None:
|
|
125
124
|
"""Returns any available tool calls as their `GroqTool` definition.
|
|
@@ -140,7 +139,6 @@ class GroqCallResponse(
|
|
|
140
139
|
|
|
141
140
|
return extracted_tools
|
|
142
141
|
|
|
143
|
-
@computed_field
|
|
144
142
|
@cached_property
|
|
145
143
|
def tool(self) -> GroqTool | None:
|
|
146
144
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -125,7 +125,6 @@ class MistralCallResponse(
|
|
|
125
125
|
"""Returns the assistants's response as a message parameter."""
|
|
126
126
|
return self._response_choices[0].message
|
|
127
127
|
|
|
128
|
-
@computed_field
|
|
129
128
|
@cached_property
|
|
130
129
|
def tools(self) -> list[MistralTool] | None:
|
|
131
130
|
"""Returns the tools for the 0th choice message.
|
|
@@ -146,7 +145,6 @@ class MistralCallResponse(
|
|
|
146
145
|
|
|
147
146
|
return extracted_tools
|
|
148
147
|
|
|
149
|
-
@computed_field
|
|
150
148
|
@cached_property
|
|
151
149
|
def tool(self) -> MistralTool | None:
|
|
152
150
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -141,7 +141,6 @@ class OpenAICallResponse(
|
|
|
141
141
|
message_param["audio"] = {"id": audio.id}
|
|
142
142
|
return ChatCompletionAssistantMessageParam(**message_param)
|
|
143
143
|
|
|
144
|
-
@computed_field
|
|
145
144
|
@cached_property
|
|
146
145
|
def tools(self) -> list[OpenAITool] | None:
|
|
147
146
|
"""Returns any available tool calls as their `OpenAITool` definition.
|
|
@@ -169,7 +168,6 @@ class OpenAICallResponse(
|
|
|
169
168
|
|
|
170
169
|
return extracted_tools
|
|
171
170
|
|
|
172
|
-
@computed_field
|
|
173
171
|
@cached_property
|
|
174
172
|
def tool(self) -> OpenAITool | None:
|
|
175
173
|
"""Returns the 0th tool for the 0th choice message.
|
|
@@ -130,7 +130,6 @@ class VertexCallResponse(
|
|
|
130
130
|
"""Returns the models's response as a message parameter."""
|
|
131
131
|
return Content(role="model", parts=self.response.candidates[0].content.parts)
|
|
132
132
|
|
|
133
|
-
@computed_field
|
|
134
133
|
@cached_property
|
|
135
134
|
def tools(self) -> list[VertexTool] | None:
|
|
136
135
|
"""Returns the list of tools for the 0th candidate's 0th content part."""
|
|
@@ -147,7 +146,6 @@ class VertexCallResponse(
|
|
|
147
146
|
|
|
148
147
|
return extracted_tools
|
|
149
148
|
|
|
150
|
-
@computed_field
|
|
151
149
|
@cached_property
|
|
152
150
|
def tool(self) -> VertexTool | None:
|
|
153
151
|
"""Returns the 0th tool for the 0th candidate's 0th content part.
|
mirascope/llm/__init__.py
CHANGED
mirascope/llm/call_response.py
CHANGED
|
@@ -102,12 +102,10 @@ class CallResponse(
|
|
|
102
102
|
def message_param(self) -> BaseMessageParam:
|
|
103
103
|
return self._response.common_message_param # pyright: ignore [reportReturnType]
|
|
104
104
|
|
|
105
|
-
@computed_field
|
|
106
105
|
@cached_property
|
|
107
106
|
def tools(self) -> list[Tool] | None: # pyright: ignore [reportIncompatibleVariableOverride]
|
|
108
107
|
return self._response.common_tools
|
|
109
108
|
|
|
110
|
-
@computed_field
|
|
111
109
|
@cached_property
|
|
112
110
|
def tool(self) -> Tool | None: # pyright: ignore [reportIncompatibleVariableOverride]
|
|
113
111
|
tools = self._response.common_tools
|
mirascope/llm/llm_call.py
CHANGED
|
@@ -191,31 +191,59 @@ def _call(
|
|
|
191
191
|
}
|
|
192
192
|
decorated = provider_call(**_original_args)(fn)
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
194
|
+
if fn_is_async(decorated):
|
|
195
|
+
|
|
196
|
+
@wraps(decorated)
|
|
197
|
+
async def inner_async(
|
|
198
|
+
*args: _P.args, **kwargs: _P.kwargs
|
|
199
|
+
) -> CallResponse | Stream:
|
|
200
|
+
result = await decorated(*args, **kwargs)
|
|
201
|
+
return _wrap_result(result)
|
|
202
|
+
|
|
203
|
+
inner_async._original_args = _original_args # pyright: ignore [reportAttributeAccessIssue]
|
|
204
|
+
inner_async._original_provider_call = provider_call # pyright: ignore [reportAttributeAccessIssue]
|
|
205
|
+
inner_async._original_fn = fn # pyright: ignore [reportAttributeAccessIssue]
|
|
206
|
+
inner_async._original_provider = provider # pyright: ignore [reportAttributeAccessIssue]
|
|
207
|
+
|
|
208
|
+
return inner_async
|
|
209
|
+
else:
|
|
210
|
+
|
|
211
|
+
@wraps(decorated)
|
|
212
|
+
def inner(*args: _P.args, **kwargs: _P.kwargs) -> CallResponse | Stream:
|
|
213
|
+
result = decorated(*args, **kwargs)
|
|
214
|
+
return _wrap_result(result)
|
|
215
|
+
|
|
216
|
+
inner._original_args = _original_args # pyright: ignore [reportAttributeAccessIssue]
|
|
217
|
+
inner._original_provider_call = provider_call # pyright: ignore [reportAttributeAccessIssue]
|
|
218
|
+
inner._original_fn = fn # pyright: ignore [reportAttributeAccessIssue]
|
|
219
|
+
inner._original_provider = provider # pyright: ignore [reportAttributeAccessIssue]
|
|
220
|
+
return inner
|
|
221
|
+
|
|
222
|
+
# @wraps(decorated)
|
|
223
|
+
# def inner(
|
|
224
|
+
# *args: _P.args, **kwargs: _P.kwargs
|
|
225
|
+
# ) -> CallResponse | Stream | Awaitable[CallResponse | Stream]:
|
|
226
|
+
# result = decorated(*args, **kwargs)
|
|
227
|
+
# if fn_is_async(decorated):
|
|
228
|
+
|
|
229
|
+
# async def async_wrapper() -> CallResponse | Stream:
|
|
230
|
+
# final = await result
|
|
231
|
+
# return _wrap_result(final)
|
|
232
|
+
|
|
233
|
+
# return async_wrapper()
|
|
234
|
+
# else:
|
|
235
|
+
|
|
236
|
+
# def sync_wrapper() -> CallResponse | Stream:
|
|
237
|
+
# final = result
|
|
238
|
+
# return _wrap_result(final)
|
|
239
|
+
|
|
240
|
+
# return sync_wrapper()
|
|
241
|
+
|
|
242
|
+
# inner._original_args = _original_args # pyright: ignore [reportAttributeAccessIssue]
|
|
243
|
+
# inner._original_provider_call = provider_call # pyright: ignore [reportAttributeAccessIssue]
|
|
244
|
+
# inner._original_fn = fn # pyright: ignore [reportAttributeAccessIssue]
|
|
245
|
+
# inner._original_provider = provider # pyright: ignore [reportAttributeAccessIssue]
|
|
246
|
+
# return inner
|
|
219
247
|
|
|
220
248
|
return wrapper # pyright: ignore [reportReturnType]
|
|
221
249
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mirascope
|
|
3
|
-
Version: 1.18.
|
|
3
|
+
Version: 1.18.3
|
|
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/WELCOME
|
|
@@ -116,7 +116,7 @@ Description-Content-Type: text/markdown
|
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
119
|
-
Mirascope is a powerful, flexible, and user-friendly library that simplifies the process of working with LLMs through a unified interface that works across various supported providers, including [OpenAI](https://openai.com/), [Anthropic](https://www.anthropic.com/), [Mistral](https://mistral.ai/), [Gemini](https://
|
|
119
|
+
Mirascope is a powerful, flexible, and user-friendly library that simplifies the process of working with LLMs through a unified interface that works across various supported providers, including [OpenAI](https://openai.com/), [Anthropic](https://www.anthropic.com/), [Mistral](https://mistral.ai/), [Google (Gemini/Vertex)](https://googleapis.github.io/python-genai/), [Groq](https://groq.com/), [Cohere](https://cohere.com/), [LiteLLM](https://www.litellm.ai/), [Azure AI](https://azure.microsoft.com/en-us/solutions/ai), and [Bedrock](https://aws.amazon.com/bedrock/).
|
|
120
120
|
|
|
121
121
|
Whether you're generating text, extracting structured information, or developing complex AI-driven agent systems, Mirascope provides the tools you need to streamline your development process and create powerful, robust applications.
|
|
122
122
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
mirascope/__init__.py,sha256=
|
|
1
|
+
mirascope/__init__.py,sha256=vGyslBC0K4-nSWGU1SqegDFni3LNul_fJ92y-ldufW0,679
|
|
2
2
|
mirascope/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
mirascope/beta/__init__.py,sha256=YsIIE5w3nKj0Ywcs_Y5tSE6WlHKR-nQwwbhNF1R8UW8,43
|
|
4
4
|
mirascope/beta/openai/__init__.py,sha256=_Ls_eRVz3gJ0Ufycr5rLur4r9h_m5pLH5D0-OWLLJ_0,257
|
|
@@ -41,13 +41,13 @@ mirascope/beta/rag/pinecone/vectorstores.py,sha256=ZcLwVmrxNMq5a2mLI-3F9XJ_UYDry
|
|
|
41
41
|
mirascope/beta/rag/weaviate/__init__.py,sha256=GOkfDjECJhHb_3L2esTB-aZamtJNsLI0RRVD_BmeOY0,231
|
|
42
42
|
mirascope/beta/rag/weaviate/types.py,sha256=-2r2Vy71kpLlRJgVqWoE3atub5a2eymHPSjTHuSqCfQ,2984
|
|
43
43
|
mirascope/beta/rag/weaviate/vectorstores.py,sha256=8Nwy-QRHwSUdvMkqEhqmUkN7y_CzQN7bop7do1K8v4w,3606
|
|
44
|
-
mirascope/core/__init__.py,sha256=
|
|
44
|
+
mirascope/core/__init__.py,sha256=NduhAurs5BLkR_GvkkJ56IjYE1bHJGAaRw9YMHe3H9Q,1512
|
|
45
45
|
mirascope/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
mirascope/core/anthropic/__init__.py,sha256=0ObxoxWzpsyf3tm5SldosVDxVWiIu1jxuGmcIWl0ZCY,918
|
|
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=HbzaeHym1KXg-UaHdfOpirXgnC47iienYHVNhyBwrAU,6034
|
|
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=NK_ggVJbactDip85DbfCaqSWRpO0CgwN1svY-KW4_Yg,1836
|
|
69
|
-
mirascope/core/azure/call_response.py,sha256=
|
|
69
|
+
mirascope/core/azure/call_response.py,sha256=r9QyhYd2_ECICynIWrrOGlVHcUX5Wu-cyoZJgOEayDU,6794
|
|
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
|
|
@@ -90,7 +90,7 @@ mirascope/core/base/_extract_with_tools.py,sha256=MW4v8D1xty7LqLb5RwMFkX-peQqA73
|
|
|
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=5hUmtzby-HrLavZBYAZpK5lpN2xxPiYskmtyUdgAFLs,9196
|
|
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
|
|
@@ -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=4X21wQVoH1JXpY_W1QodnBeY95euNpVP2mc0-MILCB8,8137
|
|
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=onJLSgc1G1d4QNij0I_gL5XnFRxjgfOVRruKtXUEjAQ,6086
|
|
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
|
|
@@ -185,7 +185,7 @@ mirascope/core/gemini/__init__.py,sha256=FQgSvAk-zcbqo19SdDHfzTZZTYFXadNIzWJlv8w
|
|
|
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=ArsNa7SBuQjcWNP-boaUnB7ZCBvIHmkjG0w1Dx5RYYI,6119
|
|
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
|
|
@@ -203,7 +203,7 @@ mirascope/core/google/__init__.py,sha256=pvcZnXk5dVpH1dYxkup3Xwp6qlZg17e1hjXArii
|
|
|
203
203
|
mirascope/core/google/_call.py,sha256=GJOPyvHzVlSXvJpgQhJFg4wFHFUYsvvrbjhNxU-nSl8,2344
|
|
204
204
|
mirascope/core/google/_call_kwargs.py,sha256=baCYcxWsmV06ATw6nuQhh6FPm3k6oWmKOn0MyjESDGc,372
|
|
205
205
|
mirascope/core/google/call_params.py,sha256=9Dt5m1pPVjpl5Qppz6Egl_9FyGjjz9aGCnXkVps7C_Q,538
|
|
206
|
-
mirascope/core/google/call_response.py,sha256=
|
|
206
|
+
mirascope/core/google/call_response.py,sha256=InFmO_BFC4pSD3Yp8m0W8iUkU5UtmudFEoInDQ3QxBs,6696
|
|
207
207
|
mirascope/core/google/call_response_chunk.py,sha256=7anUmoz3xElWDpzaTOsqWwVAOliohrPAqODj-j47gn0,2838
|
|
208
208
|
mirascope/core/google/dynamic_config.py,sha256=O6j8F0fLVFuuNwURneu5OpPuu_bMEtbDEFHhJXRT6V0,857
|
|
209
209
|
mirascope/core/google/stream.py,sha256=YFPw8QH_u8uJK3UhLNKE96Vbcsb5d48PbtG31FVIDwY,3852
|
|
@@ -212,7 +212,7 @@ mirascope/core/google/_utils/__init__.py,sha256=5MKOhK3NFseq2AlapU8TtWS82f8Z0ayJ
|
|
|
212
212
|
mirascope/core/google/_utils/_calculate_cost.py,sha256=fUyi6QAEa_NpPhtoAgVdQ7PpUa0QykNghsODrDtAYvw,3069
|
|
213
213
|
mirascope/core/google/_utils/_convert_common_call_params.py,sha256=KA-z6uvRtdD4WydC0eXd3dzQuSh4x4WKNR8PAqFNUVY,1065
|
|
214
214
|
mirascope/core/google/_utils/_convert_finish_reason_to_common_finish_reasons.py,sha256=ig4tb7Zanz-tyZpvc9Ncd47a2FNTOS7-wl1PYBq-4cY,879
|
|
215
|
-
mirascope/core/google/_utils/_convert_message_params.py,sha256=
|
|
215
|
+
mirascope/core/google/_utils/_convert_message_params.py,sha256=N365vmhi8Bx7u62IGqsEyI7JOXFb6Hk1vck4SpCaEOw,8841
|
|
216
216
|
mirascope/core/google/_utils/_get_json_output.py,sha256=sxDgT0Ra6YJynL5_hhakf0dNJEhZm0DfAgfcvC_DAFU,1596
|
|
217
217
|
mirascope/core/google/_utils/_handle_stream.py,sha256=BxFuheAu1LKPrPsDxxiLWd2KoajkwJyx2_QT1NXwtWE,1212
|
|
218
218
|
mirascope/core/google/_utils/_message_param_converter.py,sha256=j-5fLlW2-3vI0kGQs-nVep_1kDr4kYYUBYYS9MV08Ks,6495
|
|
@@ -221,7 +221,7 @@ mirascope/core/groq/__init__.py,sha256=wo-_txqiLC3iswnXmPX4C6IgsU-_wv1DbBlNDY4rE
|
|
|
221
221
|
mirascope/core/groq/_call.py,sha256=gR8VN5IaYWIFXc0csn995q59FM0nBs-xVFjkVycPjMM,2223
|
|
222
222
|
mirascope/core/groq/_call_kwargs.py,sha256=trT8AdQ-jdQPYKlGngIMRwwQuvKuvAbvI1yyozftOuI,425
|
|
223
223
|
mirascope/core/groq/call_params.py,sha256=FchtsaeohTzYKzY9f2fUIzjgG2y4OtsnRWiHsUBLdi0,1619
|
|
224
|
-
mirascope/core/groq/call_response.py,sha256=
|
|
224
|
+
mirascope/core/groq/call_response.py,sha256=2TfEUjlCxc7su-BGEaJ8njqRQiljpFayGhs2VkJKzl0,6208
|
|
225
225
|
mirascope/core/groq/call_response_chunk.py,sha256=5gKDAzncgQ8m-HKR38PJ1G3aFX1KoyabNxsy1UZ7koI,2792
|
|
226
226
|
mirascope/core/groq/dynamic_config.py,sha256=AjcXBVeBdMiI6ObHanX3TVMKYxm4iWhXju3m6d-ZWMY,937
|
|
227
227
|
mirascope/core/groq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -250,7 +250,7 @@ mirascope/core/mistral/__init__.py,sha256=6Jz9mYmijycfsCXYKgxhxMEwmQEqOwZXmJt0F7
|
|
|
250
250
|
mirascope/core/mistral/_call.py,sha256=p9aSLYVSNgaIGA5SqCgGuT7iWN5WLfwmXubk4IF-w_I,2274
|
|
251
251
|
mirascope/core/mistral/_call_kwargs.py,sha256=vZxlADPx4muIePARGdfKOVQpxpIoaXT9tCG6kY5oxSQ,513
|
|
252
252
|
mirascope/core/mistral/call_params.py,sha256=wWHWI9hRnfloGhQurMwCcka9c1u_TwgcN84Ih6qVBXs,1054
|
|
253
|
-
mirascope/core/mistral/call_response.py,sha256=
|
|
253
|
+
mirascope/core/mistral/call_response.py,sha256=zRFRs6sk-Ld-kHiis4vrtLxYBTFJ1P7Uvw9j4BwjF9g,6007
|
|
254
254
|
mirascope/core/mistral/call_response_chunk.py,sha256=4TC3F5h_Ii3WrbDDunCOudl9wIlXMVCOigIPnJ5FWGE,2835
|
|
255
255
|
mirascope/core/mistral/dynamic_config.py,sha256=-pzTvXf870NxEhjpgjqPahFWqqifzMhSbvM0kXs2G_s,937
|
|
256
256
|
mirascope/core/mistral/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -269,7 +269,7 @@ mirascope/core/openai/__init__.py,sha256=1-iKWt3nEk2GjB9UuH2WcAiPajsp9B3J6G-v5Ly
|
|
|
269
269
|
mirascope/core/openai/_call.py,sha256=ExXdY3rjBbil0ija2HlGMRvcOE2zOOj13rgliw8nmFc,2260
|
|
270
270
|
mirascope/core/openai/_call_kwargs.py,sha256=x53EZmxqroNewR194M_JkRP1Ejuh4BTtDL-b7XNSo2Q,435
|
|
271
271
|
mirascope/core/openai/call_params.py,sha256=hexjEPRuPpq7dkyMgdL48jjY-J5zvHHvaHMKWGnWYHI,2494
|
|
272
|
-
mirascope/core/openai/call_response.py,sha256=
|
|
272
|
+
mirascope/core/openai/call_response.py,sha256=oap8etLPahE8YeO5zr4hek8dqZzMP_iyAZ9Jed2z9Us,7764
|
|
273
273
|
mirascope/core/openai/call_response_chunk.py,sha256=yMjzGQa1sMDbFBn_tZPIuR6FkxyrHqxaxoHwrEQHV80,3722
|
|
274
274
|
mirascope/core/openai/dynamic_config.py,sha256=D36E3CMpXSaj5I8FEmtzMJz9gtTsNz1pVW_iM3dOCcw,1045
|
|
275
275
|
mirascope/core/openai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -287,7 +287,7 @@ mirascope/core/vertex/__init__.py,sha256=xnIwyE_ANzhuXMtNi1ESnE1lbf_X3lp4BP3I8k1
|
|
|
287
287
|
mirascope/core/vertex/_call.py,sha256=ebQmWoQLnxScyxhnGKU3MmHkXXzzs_Sw2Yf-d3nZFwU,2323
|
|
288
288
|
mirascope/core/vertex/_call_kwargs.py,sha256=6JxQt1bAscbhPWTGESG1TiskB-i5imDHqLMgbMHmyfI,353
|
|
289
289
|
mirascope/core/vertex/call_params.py,sha256=ISBnMITxAtvuGmpLF9UdkqcDS43RwtuuVakk01YIHDs,706
|
|
290
|
-
mirascope/core/vertex/call_response.py,sha256=
|
|
290
|
+
mirascope/core/vertex/call_response.py,sha256=ymYKsyZgeaIgCTWyjD46k7OBAVoCTdAE5iWbWvBA4Jk,6068
|
|
291
291
|
mirascope/core/vertex/call_response_chunk.py,sha256=yzVY9A18eZQyd5YnksKaJaXZ4s2yAK214wJEXPoQVHI,2627
|
|
292
292
|
mirascope/core/vertex/dynamic_config.py,sha256=KISQf7c2Rf1EpaS_2Ik6beA1w9uz_dAvMBk4nQcrdaM,809
|
|
293
293
|
mirascope/core/vertex/stream.py,sha256=81p04LZ47V6usjf1eQ91csLc4ZVOWSc0BAP2Vc9dCbQ,3620
|
|
@@ -314,12 +314,12 @@ mirascope/integrations/otel/__init__.py,sha256=OzboYfm3fUNwKTuu08KX83hQHYI4oZYN2
|
|
|
314
314
|
mirascope/integrations/otel/_utils.py,sha256=SCVb3MpcpqLpCpumJEbEdINceNdusnyT6iuKPz66sBc,8778
|
|
315
315
|
mirascope/integrations/otel/_with_hyperdx.py,sha256=f17uxXQk5zZPtyj6zwPwJz5i7atsnUPOoq1LqT8JO0E,1637
|
|
316
316
|
mirascope/integrations/otel/_with_otel.py,sha256=tbjd6BEbcSfnsm5CWHBoHwbRNrHt6-t4or-SYGQSD-w,1659
|
|
317
|
-
mirascope/llm/__init__.py,sha256=
|
|
317
|
+
mirascope/llm/__init__.py,sha256=ibSncLU4zWE9Hj35sfewQcf45ebjYc3kEs0I20ZTarE,195
|
|
318
318
|
mirascope/llm/_protocols.py,sha256=rzqJ8J_XFO1GNwZr3RhnEyFsaY_4B-A1SJXCVKBxo2E,16394
|
|
319
319
|
mirascope/llm/_response_metaclass.py,sha256=6DLQb5IrqMldyEXHT_pAsr2DlUVc9CmZuZiBXG37WK8,851
|
|
320
|
-
mirascope/llm/call_response.py,sha256=
|
|
320
|
+
mirascope/llm/call_response.py,sha256=WcJ4A2aDhKE6NlsZ6L6J1FHVPLzEgJQhh3vxY7sTulM,4675
|
|
321
321
|
mirascope/llm/call_response_chunk.py,sha256=9Vyi5_hpgill5CB8BwfSj33VR8sirY2ceTRbru0G3Sw,1820
|
|
322
|
-
mirascope/llm/llm_call.py,sha256=
|
|
322
|
+
mirascope/llm/llm_call.py,sha256=YtAwmAub5lvldyKwl7ZVELVQA7MQeeXF4cjXI16ypkA,9924
|
|
323
323
|
mirascope/llm/llm_override.py,sha256=xupkxlvzNSQvWpfmHpGze2CtmQqE1a3ZjCDdPznTeaQ,6523
|
|
324
324
|
mirascope/llm/stream.py,sha256=mVcpBZqpAInVsUc3bO-jiAA5S9OfgyVErIyuz4xLzSE,5731
|
|
325
325
|
mirascope/llm/tool.py,sha256=Rz9W2g0I9bnTHFdIzTIEje8VMe2Di4AZhrNhgQusSjA,1832
|
|
@@ -350,7 +350,7 @@ mirascope/v0/base/ops_utils.py,sha256=1Qq-VIwgHBaYutiZsS2MUQ4OgPC3APyywI5bTiTAmA
|
|
|
350
350
|
mirascope/v0/base/prompts.py,sha256=FM2Yz98cSnDceYogiwPrp4BALf3_F3d4fIOCGAkd-SE,1298
|
|
351
351
|
mirascope/v0/base/types.py,sha256=ZfatJoX0Yl0e3jhv0D_MhiSVHLYUeJsdN3um3iE10zY,352
|
|
352
352
|
mirascope/v0/base/utils.py,sha256=XREPENRQTu8gpMhHU8RC8qH_am3FfGUvY-dJ6x8i-mw,681
|
|
353
|
-
mirascope-1.18.
|
|
354
|
-
mirascope-1.18.
|
|
355
|
-
mirascope-1.18.
|
|
356
|
-
mirascope-1.18.
|
|
353
|
+
mirascope-1.18.3.dist-info/METADATA,sha256=0eNb5azYOiqZCPd1ltUWaVLUYIXgzf7-Auwp6YgK8Qo,8662
|
|
354
|
+
mirascope-1.18.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
355
|
+
mirascope-1.18.3.dist-info/licenses/LICENSE,sha256=LAs5Q8mdawTsVdONpDGukwsoc4KEUBmmonDEL39b23Y,1072
|
|
356
|
+
mirascope-1.18.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|