langchain-google-genai 1.0.9__py3-none-any.whl → 1.0.10__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.

@@ -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
  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
@@ -1,16 +1,16 @@
1
1
  langchain_google_genai/__init__.py,sha256=Oji-S2KYWrku1wyQEskY84IOfY8MfRhujjJ4d7hbsk4,2758
2
2
  langchain_google_genai/_common.py,sha256=ASlwE8hEbvOm55BVF_D4rf2nl7RYsnpsi5xbM6DW3Cc,1576
3
3
  langchain_google_genai/_enums.py,sha256=KLPmxS1K83K4HjBIXFaXoL_sFEOv8Hq-2B2PDMKyDgo,197
4
- langchain_google_genai/_function_utils.py,sha256=mlCbVghOCu7B0g9sP0lqo_UT7awqAKbxK_eWrfWVU9E,11319
4
+ langchain_google_genai/_function_utils.py,sha256=gcyKqUyMKMkoLjRGy5NgeeXKwAYhyMhR_HPGlctlAUk,11631
5
5
  langchain_google_genai/_genai_extension.py,sha256=ZwNwLV22RSf9LB7FOCLsoHzLlQDF-EQmRNYM1an2uSw,20769
6
6
  langchain_google_genai/_image_utils.py,sha256=-0XgCMdYkvrIktFvUpy-2GPbFgfSVKZICawB2hiJzus,4999
7
7
  langchain_google_genai/chat_models.py,sha256=NNAtdHOKCv4E1RnQMwc-gI9GYJQfp-Ccaz6oPtmkd5g,47149
8
8
  langchain_google_genai/embeddings.py,sha256=FWouioVYXV4Hpikl7C-EkzL9DwUzqa_bQkfJxRY7JZg,10089
9
9
  langchain_google_genai/genai_aqa.py,sha256=zcC5cdFYtqLK7DGPhYGvWNeHHeU-CQKA9KhewmsA5lw,4303
10
10
  langchain_google_genai/google_vector_store.py,sha256=PPIk-4FmD5UUdmYA2u7VcEhGsiztvRVN59QoGLXdfoA,16139
11
- langchain_google_genai/llms.py,sha256=W8tvdKVSfVTz6Vr3RSj_LJ9j-GGE3zdF3fLLrL7xxmc,13694
11
+ langchain_google_genai/llms.py,sha256=FzlpRrCebuTR4ye0nnKuNy0MX_2lZXItL_oqNMQemaA,14150
12
12
  langchain_google_genai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- langchain_google_genai-1.0.9.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
14
- langchain_google_genai-1.0.9.dist-info/METADATA,sha256=92xOfix0vXV6_43UPM0RE1FVcz-mujJXv25dwXCkwcA,3818
15
- langchain_google_genai-1.0.9.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
16
- langchain_google_genai-1.0.9.dist-info/RECORD,,
13
+ langchain_google_genai-1.0.10.dist-info/LICENSE,sha256=DppmdYJVSc1jd0aio6ptnMUn5tIHrdAhQ12SclEBfBg,1072
14
+ langchain_google_genai-1.0.10.dist-info/METADATA,sha256=WfG7dVpeATITKrwtj-VAzVKnQacbqrxxltzqTxNH3Ck,3819
15
+ langchain_google_genai-1.0.10.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
16
+ langchain_google_genai-1.0.10.dist-info/RECORD,,