Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genai[patch]: release 2.0.10 #743

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions libs/genai/langchain_google_genai/_function_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,16 @@ def _format_base_tool_to_function_declaration(
),
)

if issubclass(tool.args_schema, BaseModel):
if isinstance(tool.args_schema, dict):
schema = tool.args_schema
elif issubclass(tool.args_schema, BaseModel):
schema = tool.args_schema.model_json_schema()
elif issubclass(tool.args_schema, BaseModelV1):
schema = tool.args_schema.schema()
else:
raise NotImplementedError(
f"args_schema must be a Pydantic BaseModel, got {tool.args_schema}."
"args_schema must be a Pydantic BaseModel or JSON schema, "
f"got {tool.args_schema}."
)
parameters = _dict_to_gapic_schema(schema)

Expand Down
10 changes: 5 additions & 5 deletions libs/genai/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libs/genai/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-google-genai"
version = "2.0.9"
version = "2.0.10"
description = "An integration package connecting Google's genai package and LangChain"
authors = []
readme = "README.md"
Expand All @@ -12,7 +12,7 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
langchain-core = "^0.3.35"
langchain-core = "^0.3.37"
google-generativeai = "^0.8.0"
pydantic = ">=2,<3"
filetype = "^1.2.0"
Expand Down
Loading