Commit 4c0845d
authored
fix(quickstart): robust tool lookup and modernize dependencies in Python samples (googleapis#2863)
## Description
This PR addresses several reliability and modernization issues in the
Python quickstart samples and documentation:
* Replaced brittle hardcoded index-based tool lookups
(`toolbox_tools[0]`) with a robust name-based lookup dictionary
(`tool_map`) in `core/quickstart.py` and `local_quickstart.md`.
* This prevents `TypeError` failures when the tool order returned by the
server changes.
* Implemented modernization & model updates.
* Updated models to use `gemini-2.5-flash` across Core, LangChain, and
LlamaIndex quickstarts.
* Updated `toolbox-core` and `toolbox-langchain` dependencies to
`1.0.0`.
* Switched the LangChain sample from `ChatVertexAI` to
`ChatGoogleGenerativeAI` and updated `langgraph` to `1.1.6` to resolve
dependency conflicts in the CI environment.
* Updated a test query in `adk/agent.py` to directly call `update-hotel`
instead of asking for a complex multi-action "Book with dates" request
in one shot, which was causing model execution failures.1 parent 2490a4b commit 4c0845d
12 files changed
Lines changed: 1128 additions & 1098 deletions
File tree
- docs/en
- documentation
- configuration/pre-post-processing/python
- adk
- langchain
- getting-started
- quickstart/python
- adk
- core
- langchain
- llamaindex
- integrations/bigquery/samples
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
0 commit comments