{ "cells": [ { "cell_type": "markdown", "id": "487607cd", "metadata": {}, "source": [ "# Google Places\n", "\n", "This notebook goes through how to use Google Places API" ] }, { "cell_type": "code", "execution_count": 10, "id": "8690845f", "metadata": {}, "outputs": [], "source": [ "#!pip install googlemaps" ] }, { "cell_type": "code", "execution_count": 12, "id": "fae31ef4", "metadata": {}, "outputs": [], "source": [ "import os\n", "os.environ[\"GPLACES_API_KEY\"] = \"\"" ] }, { "cell_type": "code", "execution_count": 13, "id": "abb502b3", "metadata": {}, "outputs": [], "source": [ "from langchain.tools import GooglePlacesTool" ] }, { "cell_type": "code", "execution_count": 14, "id": "a83a02ac", "metadata": {}, "outputs": [], "source": [ "places = GooglePlacesTool()" ] }, { "cell_type": "code", "execution_count": 16, "id": "2b65a285", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "\"1. Delfina Restaurant\\nAddress: 3621 18th St, San Francisco, CA 94110, USA\\nPhone: (415) 552-4055\\nWebsite: https://www.delfinasf.com/\\n\\n\\n2. Piccolo Forno\\nAddress: 725 Columbus Ave, San Francisco, CA 94133, USA\\nPhone: (415) 757-0087\\nWebsite: https://piccolo-forno-sf.com/\\n\\n\\n3. L'Osteria del Forno\\nAddress: 519 Columbus Ave, San Francisco, CA 94133, USA\\nPhone: (415) 982-1124\\nWebsite: Unknown\\n\\n\\n4. Il Fornaio\\nAddress: 1265 Battery St, San Francisco, CA 94111, USA\\nPhone: (415) 986-0100\\nWebsite: https://www.ilfornaio.com/\\n\\n\"" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "places.run(\"al fornos\")" ] }, { "cell_type": "code", "execution_count": null, "id": "66d3da8a", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.1" } }, "nbformat": 4, "nbformat_minor": 5 }