universal-mcp-applications 0.1.7__py3-none-any.whl → 0.1.8__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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/google_gemini/app.py +24 -19
- {universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/RECORD +5 -5
- {universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import io
|
|
3
|
+
import os
|
|
1
4
|
import uuid
|
|
2
5
|
import wave
|
|
3
6
|
from typing import Annotated # Added Literal for type hinting
|
|
@@ -96,15 +99,13 @@ class GoogleGeminiApp(APIApplication):
|
|
|
96
99
|
elif part.inline_data is not None:
|
|
97
100
|
# Return the raw image bytes
|
|
98
101
|
image_bytes = part.inline_data.data
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
logger.info(f"Text: {text}")
|
|
107
|
-
return {"text": text}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
img_base64 = base64.b64encode(image_bytes).decode("utf-8")
|
|
105
|
+
|
|
106
|
+
file_name = f"{uuid.uuid4()}.png"
|
|
107
|
+
|
|
108
|
+
return {"type": "image", "data": img_base64, "mime_type": "image/png", "file_name": file_name, "text": text}
|
|
108
109
|
|
|
109
110
|
async def generate_audio(
|
|
110
111
|
self,
|
|
@@ -149,17 +150,21 @@ class GoogleGeminiApp(APIApplication):
|
|
|
149
150
|
|
|
150
151
|
data = response.candidates[0].content.parts[0].inline_data.data
|
|
151
152
|
|
|
152
|
-
file_name = "
|
|
153
|
-
wave_file(file_name, data)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
file_name = f"{uuid.uuid4()}.wav"
|
|
154
|
+
wave_file(file_name, data)
|
|
155
|
+
|
|
156
|
+
# read the file
|
|
157
|
+
with open(file_name, "rb") as f:
|
|
158
|
+
data = f.read()
|
|
159
|
+
|
|
160
|
+
# delete the file
|
|
161
|
+
os.remove(file_name)
|
|
162
|
+
|
|
163
|
+
# Convert to base64
|
|
164
|
+
import base64
|
|
165
|
+
audio_base64 = base64.b64encode(data).decode('utf-8')
|
|
161
166
|
|
|
162
|
-
return
|
|
167
|
+
return {"type": "audio", "data": audio_base64, "mime_type": "audio/wav", "file_name": file_name}
|
|
163
168
|
|
|
164
169
|
def list_tools(self):
|
|
165
170
|
return [
|
{universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: universal-mcp-applications
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: A Universal MCP Application: universal_mcp_applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/universal-mcp/applications
|
|
6
6
|
Project-URL: Repository, https://github.com/universal-mcp/applications
|
|
@@ -34,7 +34,7 @@ Requires-Dist: replicate>=1.0.6
|
|
|
34
34
|
Requires-Dist: requests>=2.31.0
|
|
35
35
|
Requires-Dist: resend>=2.10.0
|
|
36
36
|
Requires-Dist: twilio>=9.8.0
|
|
37
|
-
Requires-Dist: universal-mcp>=0.1.
|
|
37
|
+
Requires-Dist: universal-mcp>=0.1.24rc19
|
|
38
38
|
Provides-Extra: dev
|
|
39
39
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
40
40
|
Requires-Dist: ruff; extra == 'dev'
|
{universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/RECORD
RENAMED
|
@@ -106,7 +106,7 @@ universal_mcp/applications/google_drive/__init__.py,sha256=DTyed4ADcCmALSyPT8whj
|
|
|
106
106
|
universal_mcp/applications/google_drive/app.py,sha256=IlYwUxGRo7ISKGeWzWpc_0r4ewDo-rXLPChyMOxAc_Q,248993
|
|
107
107
|
universal_mcp/applications/google_gemini/README.md,sha256=o5cWenioUnNhn7L2fxwPLasBXzQ7mNmYp-aLLj9bHzY,2042
|
|
108
108
|
universal_mcp/applications/google_gemini/__init__.py,sha256=KZWdPU74VKBBabLpAcPNEPRPLFk8v2i0ULnT4wVHM9U,33
|
|
109
|
-
universal_mcp/applications/google_gemini/app.py,sha256=
|
|
109
|
+
universal_mcp/applications/google_gemini/app.py,sha256=2IZ_TqW5wRhAeqFchlpejfwE1azWmS_WuUqkxDt77vw,6214
|
|
110
110
|
universal_mcp/applications/google_mail/README.md,sha256=TVLbil9-qjjp9kZziuWWhkiVNR1tf5XJ_q37xd6iUsg,2422
|
|
111
111
|
universal_mcp/applications/google_mail/__init__.py,sha256=_VpJPPBAJvPX3urxUD2_kiQmld91tkVFSvAcdt5XbmI,31
|
|
112
112
|
universal_mcp/applications/google_mail/app.py,sha256=vT3Lg2qZNX98PPjJ-nDkA4VtZvofu_nkXuqRo4w2Xpo,54892
|
|
@@ -267,7 +267,7 @@ universal_mcp/applications/youtube/app.py,sha256=hhKqnbXvMAyOW3LOqp-ODPdIuQorr1n
|
|
|
267
267
|
universal_mcp/applications/zenquotes/README.md,sha256=x1mZHjNKD4WOgsIhedcbbaR1nvbt794GSrKud1tSLD0,296
|
|
268
268
|
universal_mcp/applications/zenquotes/__init__.py,sha256=IkASLYaZiHJXlkGwEMk1HgIq5GwEZp5GhAIiJyjBd3g,30
|
|
269
269
|
universal_mcp/applications/zenquotes/app.py,sha256=6v8trNWjxbixdlEyaM-gJbfY8z9ZAmkIzSUks_fbsT4,1076
|
|
270
|
-
universal_mcp_applications-0.1.
|
|
271
|
-
universal_mcp_applications-0.1.
|
|
272
|
-
universal_mcp_applications-0.1.
|
|
273
|
-
universal_mcp_applications-0.1.
|
|
270
|
+
universal_mcp_applications-0.1.8.dist-info/METADATA,sha256=YGInMpijLj_8Wp9K_we7dd6Kpf1cP7FeyA3NTrdl3uU,3918
|
|
271
|
+
universal_mcp_applications-0.1.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
272
|
+
universal_mcp_applications-0.1.8.dist-info/licenses/LICENSE,sha256=NweDZVPslBAZFzlgByF158b85GR0f5_tLQgq1NS48To,1063
|
|
273
|
+
universal_mcp_applications-0.1.8.dist-info/RECORD,,
|
{universal_mcp_applications-0.1.7.dist-info → universal_mcp_applications-0.1.8.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|