Skip to content

Commit

Permalink
dep: Upgrade LangChain version and other modules. (#509)
Browse files Browse the repository at this point in the history
* Pin Retrieval Service and LLM Demo modules to latest versions.
* Upgrade test module requirements for LLM Demo and Retrieval Service.
* Fix google-cloud-alloydb-connector version.
* Use asyncio dependencies in sqlalchemy.

---------

Co-authored-by: Yuan <[email protected]>
  • Loading branch information
anubhav756 and Yuan325 authored Nov 19, 2024
1 parent 292fec6 commit 676229c
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
from langchain.agents.agent import AgentExecutor
from langchain.globals import set_verbose # type: ignore
from langchain.memory import ConversationBufferMemory
from langchain.prompts.chat import ChatPromptTemplate
from langchain.tools import StructuredTool
from langchain_community.chat_message_histories import ChatMessageHistory
from langchain_core.messages import AIMessage, BaseMessage, HumanMessage
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.tools import StructuredTool
from langchain_google_vertexai import VertexAI
from pytz import timezone

Expand Down
4 changes: 2 additions & 2 deletions llm_demo/orchestrator/langchain_tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import google.oauth2.id_token # type: ignore
from google.auth import compute_engine # type: ignore
from google.auth.transport.requests import Request # type: ignore
from langchain.tools import StructuredTool
from pydantic.v1 import BaseModel, Field
from langchain_core.tools import StructuredTool
from pydantic import BaseModel, Field

BASE_URL = os.getenv("BASE_URL", default="http://127.0.0.1:8080")
CREDENTIALS = None
Expand Down
2 changes: 1 addition & 1 deletion llm_demo/orchestrator/langgraph/langgraph_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables import RunnableConfig, RunnableLambda
from langchain_core.tools import StructuredTool
from langgraph.checkpoint import MemorySaver
from langgraph.checkpoint.base import empty_checkpoint
from langgraph.checkpoint.memory import MemorySaver
from pytz import timezone

from ..orchestrator import BaseOrchestrator, classproperty
Expand Down
2 changes: 1 addition & 1 deletion llm_demo/orchestrator/langgraph/react_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from langchain_core.prompts.chat import ChatPromptTemplate
from langchain_core.runnables import RunnableConfig, RunnableLambda
from langchain_google_vertexai import VertexAI
from langgraph.checkpoint import MemorySaver
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import END, StateGraph
from langgraph.graph.message import add_messages
from langgraph.managed import IsLastStep
Expand Down
2 changes: 1 addition & 1 deletion llm_demo/orchestrator/langgraph/tool_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from langchain_core.runnables.config import get_executor_for_config
from langchain_core.tools import BaseTool
from langchain_core.tools import tool as create_tool
from langgraph.utils import RunnableCallable
from langgraph.utils.runnable import RunnableCallable


def str_output(output: Any) -> str:
Expand Down
2 changes: 1 addition & 1 deletion llm_demo/orchestrator/langgraph/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from google.auth import compute_engine # type: ignore
from google.auth.transport.requests import Request # type: ignore
from langchain_core.tools import StructuredTool
from pydantic.v1 import BaseModel, Field
from pydantic import BaseModel, Field

BASE_URL = os.getenv("BASE_URL", default="http://127.0.0.1:8080")
CREDENTIALS = None
Expand Down
10 changes: 5 additions & 5 deletions llm_demo/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==24.3.0
pytest==8.2.0
mypy==1.8.0
black==24.10.0
pytest==8.3.3
mypy==1.11.2
isort==5.13.2
types-requests==2.31.0.20240125
types-python-dateutil==2.8.19.20240106
types-requests==2.32.0.20240914
types-python-dateutil==2.9.0.20241003
28 changes: 14 additions & 14 deletions llm_demo/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
fastapi==0.109.2
google-auth==2.33.0
fastapi==0.115.0
google-auth==2.35.0
google-cloud-aiplatform[evaluation]==1.72.0
itsdangerous==2.2.0
jinja2==3.1.4
langchain-community==0.2.9
langchain==0.2.11
langchain-google-vertexai==1.0.7
markdown==3.5.2
types-Markdown==3.5.0.20240129
uvicorn[standard]==0.27.0.post1
python-multipart==0.0.7
langchain-community==0.3.2
langchain==0.3.7
langchain-google-vertexai==2.0.4
markdown==3.7
types-Markdown==3.7.0.20240822
uvicorn[standard]==0.31.0
python-multipart==0.0.12
pytz==2024.2
types-pytz==2024.1.0.20240417
langgraph==0.1.16
httpx==0.27.0
pandas-stubs==2.2.2.240603
pandas==2.1.4
types-pytz==2024.2.0.20241003
langgraph==0.2.48
httpx==0.27.2
pandas-stubs==2.2.2.240807
pandas==2.2.3
16 changes: 8 additions & 8 deletions retrieval_service/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
asyncpg-stubs==0.29.1
black==24.3.0
httpx==0.26.0
asyncpg-stubs==0.30.0
black==24.10.0
httpx==0.27.2
isort==5.13.2
mypy==1.8.0
pytest-asyncio==0.23.6
pytest==8.2.0
types-PyYAML==6.0.12.20240724
mypy==1.11.2
pytest-asyncio==0.24.0
pytest==8.3.3
types-PyYAML==6.0.12.20240917
csv-diff==1.2
pytest-cov==5.0.0
pytest-cov==6.0.0
33 changes: 17 additions & 16 deletions retrieval_service/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
asyncpg==0.29.0
fastapi==0.109.2
google-auth==2.33.0
google-cloud-firestore==2.17.1
google-cloud-aiplatform==1.60.0
google-cloud-spanner==3.46.0
langchain-core==0.2.24
pgvector==0.2.5
pydantic==2.6.1
uvicorn[standard]==0.27.0.post1
cloud-sql-python-connector==1.10.0
google-cloud-alloydb-connector[asyncpg]==1.2.0
sqlalchemy==2.0.25
pandas==2.2.2
asyncpg==0.30.0
fastapi==0.115.0
google-auth==2.35.0
google-cloud-firestore==2.19.0
google-cloud-aiplatform==1.72.0
google-cloud-spanner==3.49.1
langchain-core==0.3.18
pgvector==0.3.5
pydantic==2.9.2
uvicorn[standard]==0.31.0
cloud-sql-python-connector==1.12.1
google-cloud-alloydb-connector[asyncpg]==1.4.0
sqlalchemy[asyncio]==2.0.36
pandas==2.2.3
pandas-stubs==2.2.2.240807
langchain-text-splitters==0.2.2
langchain-google-vertexai==1.0.7
langchain-text-splitters==0.3.0
langchain-google-vertexai==2.0.7
asyncio==3.4.3
datetime==5.5
pymysql==1.1.1
types-PyMySQL==1.1.0.20240524
neo4j==5.26.0
sqlparse==0.5.1

0 comments on commit 676229c

Please sign in to comment.