doc(langchain-sdk): Update LangChain SDK example to use Gemini Pro model for better tool selection. (#196)

This commit is contained in:
Anubhav Dhawan
2025-01-10 11:02:23 +05:30
committed by GitHub
parent cccc34d019
commit c58f0104f8

View File

@@ -90,7 +90,7 @@ toolkit.
```py
from langchain_google_vertexai import ChatVertexAI
model = ChatVertexAI(model="gemini-1.5-flash-001")
model = ChatVertexAI(model="gemini-1.5-pro-002")
# Initialize agent with tools
agent = model.bind_tools(tools)
@@ -123,7 +123,7 @@ def call_model(state: MessagesState):
# We return a list, because this will get added to the existing list
return {"messages": [response]}
model = ChatVertexAI(model="gemini-1.5-flash-001")
model = ChatVertexAI(model="gemini-1.5-pro-002")
builder = StateGraph(MessagesState)
tool_node = ToolNode(tools)