Skip to content

Commit 3661055

Browse files
authored
chore: Update Gemini model to a stable version (#263)
* chore: Update Gemini model to a stable version * chore(toolbox-llamaindex): Update project ID in README
1 parent 7520adf commit 3661055

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/toolbox-core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ from langchain.tools import StructuredTool
202202
toolbox = ToolboxClient("http://127.0.0.1:5000")
203203
tools = await toolbox.load_toolset()
204204
wrapped_tools = [StructuredTool.from_function(tool, parse_docstring=True) for tool in tools]
205-
model_with_tools = ChatVertexAI(model="gemini-1.5-pro-002").bind_tools(wrapped_tools)
205+
model_with_tools = ChatVertexAI(model="gemini-2.0-flash-001").bind_tools(wrapped_tools)
206206

207207
def call_model(state: MessagesState):
208208
messages = state["messages"]

packages/toolbox-langchain/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ from langgraph.prebuilt import create_react_agent
5454
toolbox = ToolboxClient("http://127.0.0.1:5000")
5555
tools = toolbox.load_toolset()
5656

57-
model = ChatVertexAI(model="gemini-1.5-pro-002")
57+
model = ChatVertexAI(model="gemini-2.0-flash-001")
5858
agent = create_react_agent(model, tools)
5959

6060
prompt = "How's the weather today?"
@@ -110,7 +110,7 @@ input. Include tools loaded from the Toolbox SDK in the agent's toolkit:
110110
```py
111111
from langchain_google_vertexai import ChatVertexAI
112112

113-
model = ChatVertexAI(model="gemini-1.5-pro-002")
113+
model = ChatVertexAI(model="gemini-2.0-flash-001")
114114

115115
# Initialize agent with tools
116116
agent = model.bind_tools(tools)
@@ -140,7 +140,7 @@ def call_model(state: MessagesState):
140140
response = model.invoke(messages)
141141
return {"messages": [response]} # Return a list to add to existing messages
142142

143-
model = ChatVertexAI(model="gemini-1.5-pro-002")
143+
model = ChatVertexAI(model="gemini-2.0-flash-001")
144144
builder = StateGraph(MessagesState)
145145
tool_node = ToolNode(tools)
146146

packages/toolbox-llamaindex/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def run_agent():
5757
tools = toolbox.load_toolset()
5858

5959
vertex_model = GoogleGenAI(
60-
model="gemini-1.5-pro",
60+
model="gemini-2.0-flash-001",
6161
vertexai_config={"project": "project-id", "location": "us-central1"},
6262
)
6363
agent = AgentWorkflow.from_tools_or_functions(
@@ -116,7 +116,7 @@ from llama_index.llms.google_genai import GoogleGenAI
116116
from llama_index.core.agent.workflow import AgentWorkflow
117117

118118
vertex_model = GoogleGenAI(
119-
model="gemini-1.5-pro",
119+
model="gemini-2.0-flash-001",
120120
vertexai_config={"project": "project-id", "location": "us-central1"},
121121
)
122122

@@ -142,8 +142,8 @@ from llama_index.core.workflow import Context
142142
from llama_index.llms.google_genai import GoogleGenAI
143143

144144
vertex_model = GoogleGenAI(
145-
model="gemini-1.5-pro",
146-
vertexai_config={"project": "twisha-dev", "location": "us-central1"},
145+
model="gemini-2.0-flash-001",
146+
vertexai_config={"project": "project-id", "location": "us-central1"},
147147
)
148148
agent = AgentWorkflow.from_tools_or_functions(
149149
tools,
@@ -321,4 +321,4 @@ async def main():
321321

322322
if __name__ == "__main__":
323323
asyncio.run(main())
324-
```
324+
```

0 commit comments

Comments
 (0)