Skip to content

Commit 0bfb2c3

Browse files
fix: Fixed the google search tool name and model name (#226)
* fix: Fixed the google search tool name and model name - With 0.4.0, the tool name has changed to google_search - As of today, gemini-2.0-flash-exp is the workable model with Streaming for ADK that is soon to be replaced with gemini-2.0-flash-live-001. * Formatting --------- Co-authored-by: Kristopher Overholt <[email protected]> Co-authored-by: Kristopher Overholt <[email protected]>
1 parent 5e6fc82 commit 0bfb2c3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/get-started/quickstart-streaming.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ root_agent = Agent(
5757
# A unique name for the agent.
5858
name="basic_search_agent",
5959
# The Large Language Model (LLM) that agent will use.
60-
model="gemini-2.0-flash-exp", # Google AI Studio
61-
#model="gemini-2.0-flash-live-preview-04-09" # Vertex AI Studio
60+
model="gemini-2.0-flash-exp",
61+
# model="gemini-2.0-flash-live-001", # New streaming model version as of Feb 2025
6262
# A short description of the agent's purpose.
6363
description="Agent to answer questions using Google Search.",
6464
# Instructions to set the agent's behavior.
@@ -352,12 +352,12 @@ This code creates a real-time chat application using ADK and FastAPI. It sets up
352352

353353
Key functionalities:
354354

355-
* Loads the Gemini API key.
356-
* Uses ADK to manage agent sessions and run the \`google\_search\_agent\`.
357-
* \`start\_agent\_session\` initializes an agent session with a live request queue for real-time communication.
358-
* \`agent\_to\_client\_messaging\` asynchronously streams the agent's text responses and status updates (turn complete, interrupted) to the connected WebSocket client.
359-
* \`client\_to\_agent\_messaging\` asynchronously receives text messages from the WebSocket client and sends them as user input to the agent.
360-
* FastAPI serves a static frontend and handles WebSocket connections at \`/ws/{session\_id}\`.
355+
* Loads the Gemini API key.
356+
* Uses ADK to manage agent sessions and run the \`google\_search\_agent\`.
357+
* \`start\_agent\_session\` initializes an agent session with a live request queue for real-time communication.
358+
* \`agent\_to\_client\_messaging\` asynchronously streams the agent's text responses and status updates (turn complete, interrupted) to the connected WebSocket client.
359+
* \`client\_to\_agent\_messaging\` asynchronously receives text messages from the WebSocket client and sends them as user input to the agent.
360+
* FastAPI serves a static frontend and handles WebSocket connections at \`/ws/{session\_id}\`.
361361
* When a client connects, it starts an agent session and creates concurrent tasks for bidirectional communication between the client and the agent via WebSockets.
362362

363363
Copy-paste the following code block to the `index.html` file.
@@ -472,12 +472,12 @@ Copy-paste the following code block to the `index.html` file.
472472

473473
This HTML file sets up a basic webpage with:
474474

475-
* A form (\`messageForm\`) with an input field for typing messages and a "Send" button.
476-
* JavaScript that:
477-
* Connects to a WebSocket server at \`wss://\[current host\]/ws/\[random session ID\]\`.
478-
* Enables the "Send" button upon successful connection.
479-
* Appends received messages from the WebSocket to the \`messages\` div, handling streaming responses and turn completion.
480-
* Sends the text entered in the input field to the WebSocket server when the form is submitted.
475+
* A form (\`messageForm\`) with an input field for typing messages and a "Send" button.
476+
* JavaScript that:
477+
* Connects to a WebSocket server at \`wss://\[current host\]/ws/\[random session ID\]\`.
478+
* Enables the "Send" button upon successful connection.
479+
* Appends received messages from the WebSocket to the \`messages\` div, handling streaming responses and turn completion.
480+
* Sends the text entered in the input field to the WebSocket server when the form is submitted.
481481
* Attempts to reconnect if the WebSocket connection closes.
482482

483483
## 6\. Interact with Your Streaming app {#4.-interact-with-your-streaming-app}
@@ -502,8 +502,8 @@ Try asking a question `What is Gemini?`. The agent will use Google Search to res
502502

503503
Benefits over conventional synchronous web apps:
504504

505-
* Real-time two-way communication: Seamless interaction.
506-
* More responsive and engaging: No need to wait for full responses or constant refreshing. Feels like a live conversation.
505+
* Real-time two-way communication: Seamless interaction.
506+
* More responsive and engaging: No need to wait for full responses or constant refreshing. Feels like a live conversation.
507507
* Can be extended to multimodal apps with audio, image and video streaming support.
508508

509509
Congratulations\! You've successfully created and interacted with your first Streaming agent using ADK\!

0 commit comments

Comments
 (0)