Skip to content

Conversation

@doitundoit
Copy link
Contributor

Summary

This PR adds map image support to the Rizzcharts sample agent, using a local placeholder image instead of relying on external services.

Changes

  • New asset: Added map-placeholder.png to samples/client/lit/shell/public/
  • Updated map.json: Added map-image component using local /map-placeholder.png path
  • Updated agent.py: Added map image instructions that:
    • Use local placeholder by default
    • Support Google Maps Static API when GOOGLEMAPS_API_KEY env var is set

Affected files:

  • samples/client/lit/shell/public/map-placeholder.png [NEW]
  • samples/agent/adk/rizzcharts/examples/standard_catalog/map.json
  • samples/agent/adk/rizzcharts/agent.py

Verification

  • Python syntax verified
  • JSON syntax verified

Related

Addresses feedback from #396 - reviewer requested avoiding external placeholder services like placehold.co.

@google-cla
Copy link

google-cla bot commented Jan 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

- Add local map-placeholder.png to shell public directory
- Update standard_catalog/map.json with map-image component using local image
- Update agent.py to instruct LLM to use local placeholder (or Google Maps API if key available)
- Avoids dependency on external placehold.co service
@doitundoit doitundoit force-pushed the feat/rizzcharts-map-support branch from 3a51069 to a1839f2 Compare January 3, 2026 05:18
# Check for Google API Key
googlemaps_api_key = os.getenv("GOOGLEMAPS_API_KEY")
if googlemaps_api_key:
map_image_instruction = f"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the need for delegating the LLM to decide whether to use Google Maps or a fall-back image?
Can we update the client side code to decide this?

One thing that catches my eye here is that the code will embed a GoogleMaps API Key inside the prompt which is preferably kept private as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @sugoi-yuzuru

I agree that embedding the API key in the prompt is a security concern and the decision should move to the client.

To enable client-side decision making, I'm considering adding a new GoogleMap component. The server would send map data (coordinates, pins), and the client would decide how to render based on API key availability. This fully addresses your concerns but requires adding a new component and extending the catalog.

Would you be okay with this approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants