langchain-google-genai 1.0.9__tar.gz → 1.0.10__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 (16) hide show
  1. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/PKG-INFO +2 -2
  2. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/_function_utils.py +7 -0
  3. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/llms.py +11 -1
  4. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/pyproject.toml +2 -2
  5. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/LICENSE +0 -0
  6. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/README.md +0 -0
  7. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/__init__.py +0 -0
  8. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/_common.py +0 -0
  9. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/_enums.py +0 -0
  10. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/_genai_extension.py +0 -0
  11. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/_image_utils.py +0 -0
  12. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/chat_models.py +0 -0
  13. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/embeddings.py +0 -0
  14. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/genai_aqa.py +0 -0
  15. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/langchain_google_genai/google_vector_store.py +0 -0
  16. {langchain_google_genai-1.0.9 → langchain_google_genai-1.0.10}/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: 1.0.9
3
+ Version: 1.0.10
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
  Provides-Extra: images
15
15
  Requires-Dist: google-generativeai (>=0.7.0,<0.8.0)
16
- Requires-Dist: langchain-core (>=0.2.32,<0.3)
16
+ Requires-Dist: langchain-core (>=0.2.33,<0.3)
17
17
  Requires-Dist: pillow (>=10.1.0,<11.0.0) ; extra == "images"
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
@@ -107,6 +107,13 @@ def _format_json_schema_to_gapic(schema: Dict[str, Any]) -> Dict[str, Any]:
107
107
  pvalue
108
108
  )
109
109
  continue
110
+ elif key == "allOf":
111
+ if len(value) > 1:
112
+ logger.warning(
113
+ "Only first value for 'allOf' key is supported. "
114
+ f"Got {len(value)}, ignoring other than first value!"
115
+ )
116
+ return _format_json_schema_to_gapic(value[0])
110
117
  elif key in ["type", "_type"]:
111
118
  converted_schema["type"] = str(value).upper()
112
119
  elif key not in _ALLOWED_SCHEMA_FIELDS_SET:
@@ -9,7 +9,7 @@ from langchain_core.callbacks import (
9
9
  AsyncCallbackManagerForLLMRun,
10
10
  CallbackManagerForLLMRun,
11
11
  )
12
- from langchain_core.language_models import LanguageModelInput
12
+ from langchain_core.language_models import LangSmithParams, LanguageModelInput
13
13
  from langchain_core.language_models.llms import BaseLLM, create_base_retry_decorator
14
14
  from langchain_core.outputs import Generation, GenerationChunk, LLMResult
15
15
  from langchain_core.pydantic_v1 import BaseModel, Field, SecretStr, root_validator
@@ -268,6 +268,16 @@ class GoogleGenerativeAI(_BaseGoogleGenerativeAI, BaseLLM):
268
268
 
269
269
  return values
270
270
 
271
+ def _get_ls_params(
272
+ self, stop: Optional[List[str]] = None, **kwargs: Any
273
+ ) -> LangSmithParams:
274
+ """Get standard params for tracing."""
275
+ ls_params = super()._get_ls_params(stop=stop, **kwargs)
276
+ ls_params["ls_provider"] = "google_genai"
277
+ if ls_max_tokens := kwargs.get("max_output_tokens", self.max_output_tokens):
278
+ ls_params["ls_max_tokens"] = ls_max_tokens
279
+ return ls_params
280
+
271
281
  def _generate(
272
282
  self,
273
283
  prompts: List[str],
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langchain-google-genai"
3
- version = "1.0.9"
3
+ version = "1.0.10"
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 = ">=0.2.32,<0.3"
15
+ langchain-core = ">=0.2.33,<0.3"
16
16
  google-generativeai = "^0.7.0"
17
17
  pillow = { version = "^10.1.0", optional = true }
18
18