langchain-google-genai 2.0.7__tar.gz → 2.0.8__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.
Potentially problematic release.
This version of langchain-google-genai might be problematic. Click here for more details.
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/PKG-INFO +2 -2
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_function_utils.py +20 -4
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/chat_models.py +3 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/pyproject.toml +12 -2
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/LICENSE +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/README.md +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/__init__.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_common.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_enums.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_genai_extension.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_image_utils.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/embeddings.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/genai_aqa.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/google_vector_store.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/llms.py +0 -0
- {langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langchain-google-genai
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
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
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Requires-Dist: filetype (>=1.2.0,<2.0.0)
|
|
15
15
|
Requires-Dist: google-generativeai (>=0.8.0,<0.9.0)
|
|
16
|
-
Requires-Dist: langchain-core (>=0.3.
|
|
16
|
+
Requires-Dist: langchain-core (>=0.3.27,<0.4.0)
|
|
17
17
|
Requires-Dist: pydantic (>=2,<3)
|
|
18
18
|
Project-URL: Repository, https://github.com/langchain-ai/langchain-google
|
|
19
19
|
Project-URL: Source Code, https://github.com/langchain-ai/langchain-google/tree/main/libs/genai
|
|
@@ -315,10 +315,26 @@ def _get_properties_from_schema(schema: Dict) -> Dict[str, Any]:
|
|
|
315
315
|
if properties_item.get("type_") == glm.Type.ARRAY and v.get("items"):
|
|
316
316
|
properties_item["items"] = _get_items_from_schema_any(v.get("items"))
|
|
317
317
|
|
|
318
|
-
if properties_item.get("type_") == glm.Type.OBJECT
|
|
319
|
-
|
|
320
|
-
v.get("
|
|
321
|
-
|
|
318
|
+
if properties_item.get("type_") == glm.Type.OBJECT:
|
|
319
|
+
if (
|
|
320
|
+
v.get("anyOf")
|
|
321
|
+
and isinstance(v["anyOf"], list)
|
|
322
|
+
and isinstance(v["anyOf"][0], dict)
|
|
323
|
+
):
|
|
324
|
+
v = v["anyOf"][0]
|
|
325
|
+
v_properties = v.get("properties")
|
|
326
|
+
if v_properties:
|
|
327
|
+
properties_item["properties"] = _get_properties_from_schema_any(
|
|
328
|
+
v_properties
|
|
329
|
+
)
|
|
330
|
+
if isinstance(v_properties, dict):
|
|
331
|
+
properties_item["required"] = [
|
|
332
|
+
k for k, v in v_properties.items() if "default" not in v
|
|
333
|
+
]
|
|
334
|
+
else:
|
|
335
|
+
# Providing dummy type for object without properties
|
|
336
|
+
properties_item["type_"] = glm.Type.STRING
|
|
337
|
+
|
|
322
338
|
if k == "title" and "description" not in properties_item:
|
|
323
339
|
properties_item["description"] = k + " is " + str(v)
|
|
324
340
|
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/chat_models.py
RENAMED
|
@@ -419,6 +419,9 @@ def _parse_response_candidate(
|
|
|
419
419
|
for part in response_candidate.content.parts:
|
|
420
420
|
try:
|
|
421
421
|
text: Optional[str] = part.text
|
|
422
|
+
# Remove erroneous newline character if present
|
|
423
|
+
if text is not None:
|
|
424
|
+
text = text.rstrip("\n")
|
|
422
425
|
except AttributeError:
|
|
423
426
|
text = None
|
|
424
427
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "langchain-google-genai"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.8"
|
|
4
4
|
description = "An integration package connecting Google's genai package and LangChain"
|
|
5
5
|
authors = []
|
|
6
6
|
readme = "README.md"
|
|
@@ -12,7 +12,7 @@ license = "MIT"
|
|
|
12
12
|
|
|
13
13
|
[tool.poetry.dependencies]
|
|
14
14
|
python = ">=3.9,<4.0"
|
|
15
|
-
langchain-core = "
|
|
15
|
+
langchain-core = "^0.3.27"
|
|
16
16
|
google-generativeai = "^0.8.0"
|
|
17
17
|
pydantic = ">=2,<3"
|
|
18
18
|
filetype = "^1.2.0"
|
|
@@ -34,6 +34,8 @@ langchain-tests = "0.3.1"
|
|
|
34
34
|
ignore-words-list = "rouge"
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
|
|
38
|
+
|
|
37
39
|
[tool.poetry.group.codespell]
|
|
38
40
|
optional = true
|
|
39
41
|
|
|
@@ -41,6 +43,8 @@ optional = true
|
|
|
41
43
|
codespell = "^2.2.0"
|
|
42
44
|
|
|
43
45
|
|
|
46
|
+
|
|
47
|
+
|
|
44
48
|
[tool.poetry.group.test_integration]
|
|
45
49
|
optional = true
|
|
46
50
|
|
|
@@ -48,6 +52,8 @@ optional = true
|
|
|
48
52
|
pytest = "^7.3.0"
|
|
49
53
|
|
|
50
54
|
|
|
55
|
+
|
|
56
|
+
|
|
51
57
|
[tool.poetry.group.lint]
|
|
52
58
|
optional = true
|
|
53
59
|
|
|
@@ -55,6 +61,8 @@ optional = true
|
|
|
55
61
|
ruff = "^0.1.5"
|
|
56
62
|
|
|
57
63
|
|
|
64
|
+
|
|
65
|
+
|
|
58
66
|
[tool.poetry.group.typing.dependencies]
|
|
59
67
|
mypy = "^1.10"
|
|
60
68
|
types-requests = "^2.28.11.5"
|
|
@@ -63,6 +71,8 @@ types-protobuf = "^4.24.0.20240302"
|
|
|
63
71
|
numpy = "^1.26.2"
|
|
64
72
|
|
|
65
73
|
|
|
74
|
+
|
|
75
|
+
|
|
66
76
|
[tool.poetry.group.dev]
|
|
67
77
|
optional = true
|
|
68
78
|
|
|
File without changes
|
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/__init__.py
RENAMED
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_common.py
RENAMED
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_enums.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/_image_utils.py
RENAMED
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/embeddings.py
RENAMED
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/genai_aqa.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/llms.py
RENAMED
|
File without changes
|
{langchain_google_genai-2.0.7 → langchain_google_genai-2.0.8}/langchain_google_genai/py.typed
RENAMED
|
File without changes
|