livekit-plugins-google 1.0.0rc3__py3-none-any.whl → 1.0.0rc4__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.
- livekit/plugins/google/utils.py +10 -1
- livekit/plugins/google/version.py +1 -1
- {livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/METADATA +2 -2
- {livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/RECORD +5 -5
- {livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/WHEEL +0 -0
livekit/plugins/google/utils.py
CHANGED
@@ -9,6 +9,8 @@ from google.genai import types
|
|
9
9
|
from livekit.agents import llm
|
10
10
|
from livekit.agents.llm import FunctionTool
|
11
11
|
|
12
|
+
from .log import logger
|
13
|
+
|
12
14
|
__all__ = ["to_chat_ctx", "to_fnc_ctx"]
|
13
15
|
|
14
16
|
|
@@ -81,9 +83,16 @@ def to_chat_ctx(
|
|
81
83
|
|
82
84
|
def _to_image_part(image: llm.ImageContent, cache_key: Any) -> types.Part:
|
83
85
|
img = llm.utils.serialize_image(image)
|
86
|
+
if img.external_url:
|
87
|
+
if img.mime_type:
|
88
|
+
mime_type = img.mime_type
|
89
|
+
else:
|
90
|
+
logger.debug("No media type provided for image, defaulting to image/jpeg.")
|
91
|
+
mime_type = "image/jpeg"
|
92
|
+
return types.Part.from_uri(file_uri=img.external_url, mime_type=mime_type)
|
84
93
|
if cache_key not in image._cache:
|
85
94
|
image._cache[cache_key] = img.data_bytes
|
86
|
-
return types.Part.from_bytes(data=image._cache[cache_key], mime_type=img.
|
95
|
+
return types.Part.from_bytes(data=image._cache[cache_key], mime_type=img.mime_type)
|
87
96
|
|
88
97
|
|
89
98
|
def _build_gemini_fnc(function_tool: FunctionTool) -> types.FunctionDeclaration:
|
{livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: livekit-plugins-google
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.0rc4
|
4
4
|
Summary: Agent Framework plugin for services from Google Cloud
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
6
6
|
Project-URL: Website, https://livekit.io/
|
@@ -22,7 +22,7 @@ Requires-Dist: google-auth<3,>=2
|
|
22
22
|
Requires-Dist: google-cloud-speech<3,>=2
|
23
23
|
Requires-Dist: google-cloud-texttospeech<3,>=2
|
24
24
|
Requires-Dist: google-genai==1.5.0
|
25
|
-
Requires-Dist: livekit-agents>=1.0.0.
|
25
|
+
Requires-Dist: livekit-agents>=1.0.0.rc4
|
26
26
|
Description-Content-Type: text/markdown
|
27
27
|
|
28
28
|
# LiveKit Plugins Google
|
{livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/RECORD
RENAMED
@@ -5,13 +5,13 @@ livekit/plugins/google/models.py,sha256=SGjAumdDK97NNLwMFcqZdKR68f1NoGB2Rk1UP2-i
|
|
5
5
|
livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
livekit/plugins/google/stt.py,sha256=fT5JtDM8ck2iMAzRvFKVeyT1oPt_R-bDkqiLa-ysikc,22539
|
7
7
|
livekit/plugins/google/tts.py,sha256=mYm9n4zDzmNEAF3bSOb4-603CJrrdv9YJhrfbp5_k5A,7455
|
8
|
-
livekit/plugins/google/utils.py,sha256=
|
9
|
-
livekit/plugins/google/version.py,sha256=
|
8
|
+
livekit/plugins/google/utils.py,sha256=G38YJO5siXxlMU15j9PmvRfuLAJmXzlXyhd457jKey0,8375
|
9
|
+
livekit/plugins/google/version.py,sha256=j59nZMZZ8g3asKADdj9zt64g9i53Uq4ib4H0zY4FnPM,604
|
10
10
|
livekit/plugins/google/beta/__init__.py,sha256=AxRYc7NGG62Tv1MmcZVCDHNvlhbC86hM-_yP01Qb28k,47
|
11
11
|
livekit/plugins/google/beta/realtime/__init__.py,sha256=_fW2NMN22F-hnQ4xAJ_g5lPbR7CvM_xXzSWlUQY-E-U,188
|
12
12
|
livekit/plugins/google/beta/realtime/api_proto.py,sha256=zrAR9aZ3wFpEiIoSi_8xiP6i8k5diPSl-r298imUyf4,684
|
13
13
|
livekit/plugins/google/beta/realtime/realtime_api.py,sha256=b7shOYZ86b38zxZCJkgzLQQeWESYo3VUZU1-7rNDAmw,22588
|
14
14
|
livekit/plugins/google/beta/realtime/transcriber.py,sha256=DD7q894xc25GeeuKDar6-GwH-MxStEwhwBiX-KZ-Jo4,9559
|
15
|
-
livekit_plugins_google-1.0.
|
16
|
-
livekit_plugins_google-1.0.
|
17
|
-
livekit_plugins_google-1.0.
|
15
|
+
livekit_plugins_google-1.0.0rc4.dist-info/METADATA,sha256=WFkUe9U3EZq-ecGc05X6SJVzaT7fCO2UOEWInuFbShc,3496
|
16
|
+
livekit_plugins_google-1.0.0rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
livekit_plugins_google-1.0.0rc4.dist-info/RECORD,,
|
{livekit_plugins_google-1.0.0rc3.dist-info → livekit_plugins_google-1.0.0rc4.dist-info}/WHEEL
RENAMED
File without changes
|