diff --git a/pyproject.toml b/pyproject.toml index 2b161795..737ff6f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,9 +41,9 @@ langgraph = [ "langgraph-checkpoint>=3.0.0, <3.1.0" ] test = [ - "black[jupyter]==25.9.0", + "black[jupyter]==25.12.0", "isort==7.0.0", - "mypy==1.18.2", + "mypy==1.19.1", "pytest-asyncio==0.26.0", "pytest==8.4.2", "pytest-cov==7.0.0", diff --git a/requirements.txt b/requirements.txt index bacbe361..feb341ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -cloud-sql-python-connector[asyncpg]==1.18.5 -numpy==2.3.3; python_version >= "3.11" +cloud-sql-python-connector[asyncpg]==1.19.0 +numpy==2.3.5; python_version >= "3.11" numpy==2.2.6; python_version == "3.10" langgraph==1.0.4 langchain-postgres==0.0.16 diff --git a/samples/langchain_on_vertexai/prebuilt_langchain_agent_template.py b/samples/langchain_on_vertexai/prebuilt_langchain_agent_template.py index 9e492783..efd7fb58 100644 --- a/samples/langchain_on_vertexai/prebuilt_langchain_agent_template.py +++ b/samples/langchain_on_vertexai/prebuilt_langchain_agent_template.py @@ -91,9 +91,9 @@ def similarity_search(query: str) -> list[Document]: DISPLAY_NAME = os.getenv("DISPLAY_NAME") or "PrebuiltAgent" remote_app = reasoning_engines.ReasoningEngine.create( - reasoning_engines.LangchainAgent( + reasoning_engines.LangchainAgent( # type: ignore[arg-type] model="gemini-2.0-flash-001", - tools=[similarity_search], + tools=[similarity_search], # type: ignore[list-item] model_kwargs={ "temperature": 0.1, }, @@ -104,4 +104,4 @@ def similarity_search(query: str) -> list[Document]: extra_packages=["config.py"], ) -print(remote_app.query(input="movies about engineers")) +print(remote_app.query(input="movies about engineers")) # type: ignore[attr-defined] diff --git a/samples/langchain_on_vertexai/retriever_agent_with_history_template.py b/samples/langchain_on_vertexai/retriever_agent_with_history_template.py index 2867d041..bba06a16 100644 --- a/samples/langchain_on_vertexai/retriever_agent_with_history_template.py +++ b/samples/langchain_on_vertexai/retriever_agent_with_history_template.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import os -from typing import Optional +from typing import Any, Optional import vertexai # type: ignore from config import ( @@ -132,7 +132,7 @@ def set_up(self): history_messages_key="chat_history", ) - def query(self, input: str, session_id: str) -> str: + def query(self, input: str, session_id: str, **kwargs: Any) -> str: # type: ignore[override] """Query the application. Args: @@ -192,4 +192,4 @@ def query(self, input: str, session_id: str) -> str: extra_packages=["config.py"], ) -print(remote_app.query(input="movies about engineers", session_id="abc123")) +print(remote_app.query(input="movies about engineers", session_id="abc123")) # type: ignore diff --git a/samples/langchain_on_vertexai/retriever_chain_template.py b/samples/langchain_on_vertexai/retriever_chain_template.py index 8abfbb21..0d322ba8 100644 --- a/samples/langchain_on_vertexai/retriever_chain_template.py +++ b/samples/langchain_on_vertexai/retriever_chain_template.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import os -from typing import Optional +from typing import Any, Optional import vertexai # type: ignore from config import ( @@ -106,7 +106,7 @@ def set_up(self): # an LLM to generate a response self.chain = create_retrieval_chain(retriever, combine_docs_chain) - def query(self, input: str) -> str: + def query(self, input: str, **kwargs: Any) -> str: # type: ignore[override] """Query the application. Args: @@ -161,4 +161,4 @@ def query(self, input: str) -> str: extra_packages=["config.py"], ) -print(remote_app.query(input="movies about engineers")) +print(remote_app.query(input="movies about engineers")) # type: ignore diff --git a/samples/requirements.txt b/samples/requirements.txt index b6b27ad1..fa739a07 100644 --- a/samples/requirements.txt +++ b/samples/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-aiplatform[reasoningengine,langchain]==1.97.0 -google-cloud-resource-manager==1.14.2 +google-cloud-aiplatform[reasoningengine,langchain]==1.130.0 +google-cloud-resource-manager==1.15.0 langchain-community==0.3.29 langchain-google-cloud-sql-pg==0.14.1 -langchain-google-vertexai==2.0.27 +langchain-google-vertexai==2.1.2