function-calling-google-async-stream

command
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: BSD-2-Clause Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command function-calling-google-async-stream is a voice agent whose LLM calls tools: Google Gemini, with a tool that reports intermediate results.

The track_current_location tool simulates a GPS tracker reporting the device's position during a road trip from San Francisco to San Diego. It sends two intermediate updates (results marked not final) as the vehicle passes through cities along the way, then delivers the final destination. Because the tool is not canceled when the user interrupts, the LLM can keep talking while the trip is in progress; each position update reaches it as a developer message, so it can narrate the journey to the user. Speech-to-text is Deepgram and text-to-speech Cartesia.

DEEPGRAM_API_KEY=… GOOGLE_API_KEY=… CARTESIA_API_KEY=… \
  go run ./examples/function-calling/function-calling-google-async-stream

Then open http://localhost:7860, connect, and ask it to track your location.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL