Skip to content

feat: Google Places (New) integration tools - #450

Closed
esafwan wants to merge 1 commit into
developfrom
feat/google-places-tools
Closed

feat: Google Places (New) integration tools#450
esafwan wants to merge 1 commit into
developfrom
feat/google-places-tools

Conversation

@esafwan

@esafwan esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Ports the Google Places API (New) integrations from Travel-with-Genie-AI/google_services@develop into huf as first-class App Provided tools — with full parameter coverage (the source hardcoded many API params; the tools expose them).

Tools (5, category: Google Places)

Tool Google endpoint Coverage
gplaces_text_search places:searchText query, language/region, includedType, minRating, priceLevels, openNow, rankPreference, locationBias/Restriction (circle), pageSize, pageToken
gplaces_place_details places/{id} full field mask: contacts, hours, photos, reviews (top 5), review summary, accessibility/payment/parking
gplaces_place_photo {photo}/media photoUri (skipHttpRedirect) or redirect-Location resolution, max height/width
gplaces_autocomplete places:autocomplete primary types, session token, language/region, location bias/restriction, origin, query predictions; 24h Redis cache; country post-filter
gplaces_nearby_search places:searchNearby included/excluded types + primary types, rank preference, max results

Design

  • Follows the existing google_maps.py App Provided pattern: no DocType, frontend, or sdk_tools.py changes — tools sync via sync_discovered_tools() and appear in the agent tool picker automatically.
  • Credentials reuse the google_maps Integration Service (config UI + Password field); env fallbacks PLACE_API_KEY / GOOGLE_PLACES_API_KEY added.
  • Keys resolved lazily per call (the source resolved at import time); no mid-request commits; read-only, no guest access.
  • Source bugs intentionally not ported: import-time clients, min-photos gate, DB persistence (tools return data, they do not sync DocTypes).

Testing

  • huf/ai/tests/test_google_places_tools.py — 17 unit tests (param building, field masks, validation, cache key/TTL, country filter, photo redirect handling, registry wiring), all passing with mocked requests.
  • ruff check/format clean on new files; compileall clean.

Related: #439 (Google/Perplexity search tools). Companion SERP PR follows separately.

Adds 5 App Provided tools (category: Google Places) ported from
Travel-with-Genie-AI/google_services with full param coverage:

- gplaces_text_search: text search with location bias/restriction,
  type/price/rating filters, pagination
- gplaces_place_details: full field-mask details incl. photos,
  reviews, review summary
- gplaces_place_photo: photo media URL resolution (photoUri or redirect)
- gplaces_autocomplete: suggestions with primary-type filter, location
  bias, 24h Redis cache, country post-filter
- gplaces_nearby_search: searchNearby with included/excluded types

Credentials reuse the google_maps Integration Service (env fallbacks
PLACE_API_KEY / GOOGLE_PLACES_API_KEY added). No DocType or frontend
changes; tools sync via the existing huf_tools registry.
@esafwan

esafwan commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by consolidated Google Places PR #464, now included in integration PR #468.

@esafwan esafwan closed this Jul 26, 2026
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.

1 participant