Skip to content
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions samples/langchain_on_vertexai/retriever_chain_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions samples/requirements.txt
Original file line number Diff line number Diff line change
@@ -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