Skip to content

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

Merged
esafwan merged 1 commit into
developfrom
feat/google-places-tools
Jul 26, 2026
Merged

feat: Google Places (New) integration tools#479
esafwan merged 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; 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.
  • Operational knobs are configurable via the same google_maps Integration Service (arbitrary credential key/value rows):
    • places_cache_ttl (default 86400 s), places_cache_enabled (default true)
    • places_request_timeout (default 15 s), autocomplete_request_timeout (default 5 s)
    • places_default_radius (default 50000 m)
    • places_photo_max_px (default 800)
    • places_autocomplete_primary_types (default locality,sublocality,administrative_area_level_1,administrative_area_level_2,neighborhood)
  • 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 — 22 unit tests (param building, field masks, validation, cache key/TTL/overrides, cache disable, country filter, photo redirect handling, registry wiring), all passing with mocked requests.
  • compileall clean; no new ruff findings on the new files.

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 parameter 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, 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).

Operational knobs are now configurable via the same Integration Service:
places_cache_ttl, places_cache_enabled, places_request_timeout,
autocomplete_request_timeout, places_default_radius,
places_photo_max_px, places_autocomplete_primary_types.
@esafwan
esafwan merged commit f347f67 into develop Jul 26, 2026
4 checks passed
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