You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit: Upgrading the pip packages to the latest versions also results in the same error.
Error trace below,
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_generate_schema.py](https://localhost:8080/#) in _common_field_schema(self, name, field_info, decorators)
1226 try:
-> 1227 evaluated_type = _typing_extra.eval_type(field_info.annotation, *self._types_namespace)
1228 except NameError as e:
29 frames
NameError: name 'SafetySetting' is not defined
The above exception was the direct cause of the following exception:
PydanticUndefinedAnnotation Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_generate_schema.py](https://localhost:8080/#) in _common_field_schema(self, name, field_info, decorators)
1227 evaluated_type = _typing_extra.eval_type(field_info.annotation, *self._types_namespace)
1228 except NameError as e:
-> 1229 raise PydanticUndefinedAnnotation.from_name_error(e) from e
1230 evaluated_type = replace_types(evaluated_type, self._typevars_map)
1231 field_info.evaluated = True
PydanticUndefinedAnnotation: name 'SafetySetting' is not defined
For further information visit https://errors.pydantic.dev/2.10/u/undefined-annotation
Bug Description
Changes in LangChain have broken the
langchain-google-vertexai
package, resulting in error:This is related to langchain-ai/langchain-google#610 (comment) and langchain-ai/langchain-google#613 , so presumably Langflow simply has a bad dependency.
Reproduction
[project]
name = "test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ipykernel>=6.29.5",
"ipywidgets>=8.1.5",
"python-dotenv>=1.0.1",
"pypdf>=5.1.0",
"langchain-core>=0.3.20",
"langchain-google-vertexai>=2.0.7",
]
from langchain_google_vertexai import VertexAI
model = VertexAI(model_name="gemini-1.5-flash-001")
Expected behavior
There should be no error.
Who can help?
No response
Operating System
Windows
Langflow Version
1.1.0
Python Version
None
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: