{ "cells": [ { "cell_type": "markdown", "id": "f34864b5", "metadata": {}, "source": [ "# Requests\n", "\n", "The web contains a lot of information that LLMs do not have access to. In order to easily let LLMs interact with that information, we provide a wrapper around the Python Requests module that takes in a URL and fetches data from that URL." ] }, { "cell_type": "code", "execution_count": 1, "id": "81aae09e", "metadata": {}, "outputs": [], "source": [ "from langchain.utilities import RequestsWrapper" ] }, { "cell_type": "code", "execution_count": 2, "id": "fd210142", "metadata": {}, "outputs": [], "source": [ "requests = RequestsWrapper()" ] }, { "cell_type": "code", "execution_count": 5, "id": "29a77bb2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Google
Search Images Maps Play YouTube News Gmail Drive More »
Web History | Settings | Sign in

\"Seasonal
 

Advanced search

© 2022 - Privacy - Terms

'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "requests.run(\"https://www.google.com\")" ] }, { "cell_type": "code", "execution_count": null, "id": "3f27ee3d", "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.10.9" } }, "nbformat": 4, "nbformat_minor": 5 }