livekit-plugins-google 1.0.0rc3__tar.gz → 1.0.0rc4__tar.gz

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.
Files changed (18) hide show
  1. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/PKG-INFO +2 -2
  2. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/utils.py +10 -1
  3. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/version.py +1 -1
  4. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/pyproject.toml +1 -1
  5. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/.gitignore +0 -0
  6. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/README.md +0 -0
  7. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/__init__.py +0 -0
  8. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/beta/__init__.py +0 -0
  9. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/beta/realtime/__init__.py +0 -0
  10. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/beta/realtime/api_proto.py +0 -0
  11. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/beta/realtime/realtime_api.py +0 -0
  12. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/beta/realtime/transcriber.py +0 -0
  13. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/llm.py +0 -0
  14. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/log.py +0 -0
  15. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/models.py +0 -0
  16. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/py.typed +0 -0
  17. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/stt.py +0 -0
  18. {livekit_plugins_google-1.0.0rc3 → livekit_plugins_google-1.0.0rc4}/livekit/plugins/google/tts.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-google
3
- Version: 1.0.0rc3
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.rc3
25
+ Requires-Dist: livekit-agents>=1.0.0.rc4
26
26
  Description-Content-Type: text/markdown
27
27
 
28
28
  # LiveKit Plugins Google
@@ -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.media_type)
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:
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = '1.0.0.rc3'
15
+ __version__ = '1.0.0.rc4'
@@ -27,7 +27,7 @@ dependencies = [
27
27
  "google-cloud-speech >= 2, < 3",
28
28
  "google-cloud-texttospeech >= 2, < 3",
29
29
  "google-genai == 1.5.0",
30
- "livekit-agents>=1.0.0.rc3",
30
+ "livekit-agents>=1.0.0.rc4",
31
31
  ]
32
32
 
33
33
  [project.urls]