langchain-google-genai 2.0.5__py3-none-any.whl → 2.0.6__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 langchain-google-genai might be problematic. Click here for more details.

@@ -8,6 +8,7 @@ from enum import Enum
8
8
  from typing import Any, Dict
9
9
  from urllib.parse import urlparse
10
10
 
11
+ import filetype # type: ignore[import]
11
12
  import requests
12
13
  from google.ai.generativelanguage_v1beta.types import Part
13
14
 
@@ -87,7 +88,13 @@ class ImageBytesLoader:
87
88
  raise ValueError(msg)
88
89
 
89
90
  inline_data: Dict[str, Any] = {"data": bytes_}
91
+
90
92
  mime_type, _ = mimetypes.guess_type(image_string)
93
+ if not mime_type:
94
+ kind = filetype.guess(bytes_)
95
+ if kind:
96
+ mime_type = kind.mime
97
+
91
98
  if mime_type:
92
99
  inline_data["mime_type"] = mime_type
93
100
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-google-genai
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: An integration package connecting Google's genai package and LangChain
5
5
  Home-page: https://github.com/langchain-ai/langchain-google
6
6
  License: MIT
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3.9
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Dist: filetype (>=1.2.0,<2.0.0)
14
15
  Requires-Dist: google-generativeai (>=0.8.0,<0.9.0)
15
16
  Requires-Dist: langchain-core (>=0.3.15,<0.4)
16
17
  Requires-Dist: pydantic (>=2,<3)
@@ -3,14 +3,14 @@ langchain_google_genai/_common.py,sha256=ASlwE8hEbvOm55BVF_D4rf2nl7RYsnpsi5xbM6D
3
3
  langchain_google_genai/_enums.py,sha256=KLPmxS1K83K4HjBIXFaXoL_sFEOv8Hq-2B2PDMKyDgo,197
4
4
  langchain_google_genai/_function_utils.py,sha256=ksKgLoKPhKzd3QLLgYojuq4tOegoEL-oHPncARPds3w,16891
5
5
  langchain_google_genai/_genai_extension.py,sha256=81a4ly5ZHlqMf37uJfdB8K41qE6J5ujLnbUypIfFf2o,20775
6
- langchain_google_genai/_image_utils.py,sha256=_3knaOcAlI8AxHO8NyqNIqGbtldWRBU5wm5trdyhTzY,5033
6
+ langchain_google_genai/_image_utils.py,sha256=tPrQyMvVmO8xkuow1SvA91omxUEv9ZUy1EMHNGjMAKY,5202
7
7
  langchain_google_genai/chat_models.py,sha256=X5CHWmRQjoV1l6AN0VbVX5cSYyW5FAoyS9jWFBqhig8,54232
8
8
  langchain_google_genai/embeddings.py,sha256=PBJlcRExfegD2V9hnKQHW99fJJGsbPbmMW1TfQtPmqU,10132
9
9
  langchain_google_genai/genai_aqa.py,sha256=qB6h3-BSXqe0YLR3eeVllYzmNKK6ofI6xJLdBahUVZo,4300
10
10
  langchain_google_genai/google_vector_store.py,sha256=4wvhIiOmc3Fo046FyafPmT9NBCLek-9bgluvuTfrbpQ,16148
11
11
  langchain_google_genai/llms.py,sha256=EPUgkz5aqKOyKbztT7br8w60Uo5D_X_bF5qP-zd6iLs,14593
12
12
  langchain_google_genai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- langchain_google_genai-2.0.5.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
14
- langchain_google_genai-2.0.5.dist-info/METADATA,sha256=mE8t2CijamvFdZk3CKWgZW5SNvaB2LU8rl9jO-7K_nU,3551
15
- langchain_google_genai-2.0.5.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
16
- langchain_google_genai-2.0.5.dist-info/RECORD,,
13
+ langchain_google_genai-2.0.6.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
14
+ langchain_google_genai-2.0.6.dist-info/METADATA,sha256=b9BGkoBYfjgMydZCl4nRlADfqcXKjAda0F_WxPcvHi8,3592
15
+ langchain_google_genai-2.0.6.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
16
+ langchain_google_genai-2.0.6.dist-info/RECORD,,