Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsGradio ToolsOn this pageGradio ToolsThere are many 1000s of Gradio apps on Hugging Face Spaces. This library puts them at the tips of your LLM's fingers ğŸ¦¾Specifically, gradio-tools is a Python library for converting Gradio apps into tools that can be leveraged by a large language model (LLM)-based agent to complete its task. For example, an LLM could use a Gradio tool to transcribe a voice recording it finds online and then summarize it for you. Or it could use a different Gradio tool to apply OCR to a document on your Google Drive and then answer questions about it.It's very easy to create you own tool if you want to use a space that's not one of the pre-built tools. Please see this section of the gradio-tools documentation for information on how to do that. All contributions are welcome!# !pip install gradio_toolsUsing a toolâ€‹from gradio_tools.tools import StableDiffusionToollocal_file_path =


a toolâ€‹from gradio_tools.tools import StableDiffusionToollocal_file_path = StableDiffusionTool().langchain.run(    "Please create a photo of a dog riding a skateboard")local_file_path    Loaded as API: https://gradio-client-demos-stable-diffusion.hf.space âœ”        Job Status: Status.STARTING eta: None    '/Users/harrisonchase/workplace/langchain/docs/modules/agents/tools/integrations/b61c1dd9-47e2-46f1-a47c-20d27640993d/tmp4ap48vnm.jpg'from PIL import Imageim = Image.open(local_file_path)display(im)    ![png](_gradio_tools_files/output_7_0.png)    Using within an agentâ€‹from langchain.agents import initialize_agentfrom langchain.llms import OpenAIfrom gradio_tools.tools import (    StableDiffusionTool,    ImageCaptioningTool,    StableDiffusionPromptGeneratorTool,    TextToVideoTool,)from langchain.memory import ConversationBufferMemoryllm = OpenAI(temperature=0)memory = ConversationBufferMemory(memory_key="chat_history")tools = [    StableDiffusionTool().langchain,    ImageCaptioningTool().langchain,    StableDiffusionPromptGeneratorTool().langchain,    TextToVideoTool().langchain,]agent = initialize_agent(    tools, llm, memory=memory, agent="conversational-react-description", verbose=True)output = agent.run(    input=(        "Please create a photo of a dog riding a skateboard "        "but improve my prompt prior to using an image generator."


"but improve my prompt prior to using an image generator."        "Please caption the generated image and create a video for it using the improved prompt."    ))    Loaded as API: https://gradio-client-demos-stable-diffusion.hf.space âœ”    Loaded as API: https://taesiri-blip-2.hf.space âœ”    Loaded as API: https://microsoft-promptist.hf.space âœ”    Loaded as API: https://damo-vilab-modelscope-text-to-video-synthesis.hf.space âœ”            > Entering new AgentExecutor chain...        Thought: Do I need to use a tool? Yes    Action: StableDiffusionPromptGenerator    Action Input: A dog riding a skateboard    Job Status: Status.STARTING eta: None        Observation: A dog riding a skateboard, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgerm and greg rutkowski and alphonse mucha    Thought: Do I need to use a tool? Yes    Action: StableDiffusion    Action Input: A dog riding a skateboard, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgerm and greg rutkowski and alphonse mucha    Job Status: Status.STARTING eta: None        Job Status: Status.PROCESSING eta: None        Observation:


Job Status: Status.PROCESSING eta: None        Observation: /Users/harrisonchase/workplace/langchain/docs/modules/agents/tools/integrations/2e280ce4-4974-4420-8680-450825c31601/tmpfmiz2g1c.jpg    Thought: Do I need to use a tool? Yes    Action: ImageCaptioner    Action Input: /Users/harrisonchase/workplace/langchain/docs/modules/agents/tools/integrations/2e280ce4-4974-4420-8680-450825c31601/tmpfmiz2g1c.jpg    Job Status: Status.STARTING eta: None        Observation: a painting of a dog sitting on a skateboard    Thought: Do I need to use a tool? Yes    Action: TextToVideo    Action Input: a painting of a dog sitting on a skateboard    Job Status: Status.STARTING eta: None    Due to heavy traffic on this app, the prediction will take approximately 73 seconds.For faster predictions without waiting in queue, you may duplicate the space using: Client.duplicate(damo-vilab/modelscope-text-to-video-synthesis)        Job Status: Status.IN_QUEUE eta: 73.89824726581574    Due to heavy traffic on this app, the prediction will take approximately 42 seconds.For faster predictions without waiting in queue, you may duplicate the space using: Client.duplicate(damo-vilab/modelscope-text-to-video-synthesis)        Job Status: Status.IN_QUEUE eta: 42.49370198879602        Job Status: Status.IN_QUEUE eta: 21.314297944849187        Observation:


eta: 21.314297944849187        Observation: /var/folders/bm/ylzhm36n075cslb9fvvbgq640000gn/T/tmp5snj_nmzf20_cb3m.mp4    Thought: Do I need to use a tool? No    AI: Here is a video of a painting of a dog sitting on a skateboard.        > Finished chain.PreviousGoogle Serper APINextGraphQL toolUsing a toolUsing within an agentCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


DuckDuckGo Search | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsDuckDuckGo SearchDuckDuckGo SearchThis notebook goes over how to use the duck-duck-go search component.# !pip install duckduckgo-searchfrom langchain.tools import DuckDuckGoSearchRunsearch = DuckDuckGoSearchRun()search.run("Obama's first name?")    'Barack Obama, in full Barack Hussein Obama II, (born August 4, 1961, Honolulu, Hawaii, U.S.), 44th president of the United States (2009-17) and the first African American to hold the office. Before winning the presidency, Obama represented Illinois in the U.S. Senate (2005-08). Barack Hussein Obama II (/ b É™ Ëˆ r É‘Ë� k h uË� Ëˆ s eÉª n oÊŠ Ëˆ b É‘Ë� m É™ / bÉ™-RAHK hoo-SAYN oh-BAH-mÉ™; born August 4,


hoo-SAYN oh-BAH-mÉ™; born August 4, 1961) is an American former politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, he was the first African-American president of the United States. Obama previously served as a U.S. senator representing ... Barack Obama was the first African American president of the United States (2009-17). He oversaw the recovery of the U.S. economy (from the Great Recession of 2008-09) and the enactment of landmark health care reform (the Patient Protection and Affordable Care Act ). In 2009 he was awarded the Nobel Peace Prize. His birth certificate lists his first name as Barack: That\'s how Obama has spelled his name throughout his life. His name derives from a Hebrew name which means "lightning.". The Hebrew word has been transliterated into English in various spellings, including Barak, Buraq, Burack, and Barack. Most common names of U.S. presidents 1789-2021. Published by. Aaron O\'Neill , Jun 21, 2022. The most common first name for a U.S. president is James, followed by John and then William. Six U.S ...'PreviousDataForSeo API WrapperNextFile System ToolsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


File System Tools | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsFile System ToolsOn this pageFile System ToolsLangChain provides tools for interacting with a local file system out of the box. This notebook walks through some of them.Note: these tools are not recommended for use outside a sandboxed environment! First, we'll import the tools.from langchain.tools.file_management import (    ReadFileTool,    CopyFileTool,    DeleteFileTool,    MoveFileTool,    WriteFileTool,    ListDirectoryTool,)from langchain.agents.agent_toolkits import FileManagementToolkitfrom tempfile import TemporaryDirectory# We'll make a temporary directory to avoid clutterworking_directory = TemporaryDirectory()The FileManagementToolkitâ€‹If you want to provide all the file tooling to your agent, it's easy to do so with the toolkit. We'll pass the temporary directory in as a root directory as a workspace for the LLM.It's recommended to always pass in a root directory, since without one, it's easy for the LLM to pollute the working directory, and without one, there isn't any validation against


straightforward prompt injection.toolkit = FileManagementToolkit(    root_dir=str(working_directory.name))  # If you don't provide a root_dir, operations will default to the current working directorytoolkit.get_tools()    [CopyFileTool(name='copy_file', description='Create a copy of a file in a specified location', args_schema=<class 'langchain.tools.file_management.copy.FileCopyInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     DeleteFileTool(name='file_delete', description='Delete a file', args_schema=<class 'langchain.tools.file_management.delete.FileDeleteInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     FileSearchTool(name='file_search', description='Recursively search for files in a subdirectory that match the regex pattern', args_schema=<class 'langchain.tools.file_management.file_search.FileSearchInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     MoveFileTool(name='move_file', description='Move or rename a file from one location to another', args_schema=<class


description='Move or rename a file from one location to another', args_schema=<class 'langchain.tools.file_management.move.FileMoveInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     ReadFileTool(name='read_file', description='Read file from disk', args_schema=<class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     WriteFileTool(name='write_file', description='Write file to disk', args_schema=<class 'langchain.tools.file_management.write.WriteFileInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     ListDirectoryTool(name='list_directory', description='List files and directories in a specified folder', args_schema=<class 'langchain.tools.file_management.list_dir.DirectoryListingInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug')]Selecting


File System Toolsâ€‹If you only want to select certain tools, you can pass them in as arguments when initializing the toolkit, or you can individually initialize the desired tools.tools = FileManagementToolkit(    root_dir=str(working_directory.name),    selected_tools=["read_file", "write_file", "list_directory"],).get_tools()tools    [ReadFileTool(name='read_file', description='Read file from disk', args_schema=<class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     WriteFileTool(name='write_file', description='Write file to disk', args_schema=<class 'langchain.tools.file_management.write.WriteFileInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug'),     ListDirectoryTool(name='list_directory', description='List files and directories in a specified folder', args_schema=<class 'langchain.tools.file_management.list_dir.DirectoryListingInput'>, return_direct=False, verbose=False, callback_manager=<langchain.callbacks.shared.SharedCallbackManager object at 0x1156f4350>, root_dir='/var/folders/gf/6rnp_mbx5914kx7qmmh7xzmw0000gn/T/tmpxb8c3aug')]read_tool, write_tool, list_tool = toolswrite_tool.run({"file_path":


write_tool, list_tool = toolswrite_tool.run({"file_path": "example.txt", "text": "Hello World!"})    'File written successfully to example.txt.'# List files in the working directorylist_tool.run({})    'example.txt'PreviousDuckDuckGo SearchNextGolden QueryThe FileManagementToolkitSelecting File System ToolsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Google Serper API | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsGoogle Serper APIOn this pageGoogle Serper APIThis notebook goes over how to use the Google Serper component to search the web. First you need to sign up for a free account at serper.dev and get your api key.import osimport pprintos.environ["SERPER_API_KEY"] = ""from langchain.utilities import GoogleSerperAPIWrappersearch = GoogleSerperAPIWrapper()search.run("Obama's first name?")    'Barack Hussein Obama II'As part of a Self Ask With Search Chainâ€‹os.environ["OPENAI_API_KEY"] = ""from langchain.utilities import GoogleSerperAPIWrapperfrom langchain.llms.openai import OpenAIfrom langchain.agents import initialize_agent, Toolfrom langchain.agents import AgentTypellm = OpenAI(temperature=0)search = GoogleSerperAPIWrapper()tools = [    Tool(        name="Intermediate Answer",        func=search.run,


Answer",        func=search.run,        description="useful for when you need to ask with search",    )]self_ask_with_search = initialize_agent(    tools, llm, agent=AgentType.SELF_ASK_WITH_SEARCH, verbose=True)self_ask_with_search.run(    "What is the hometown of the reigning men's U.S. Open champion?")            > Entering new AgentExecutor chain...     Yes.    Follow up: Who is the reigning men's U.S. Open champion?    Intermediate answer: Current champions Carlos Alcaraz, 2022 men's singles champion.    Follow up: Where is Carlos Alcaraz from?    Intermediate answer: El Palmar, Spain    So the final answer is: El Palmar, Spain        > Finished chain.    'El Palmar, Spain'Obtaining results with metadataâ€‹If you would also like to obtain the results in a structured way including metadata. For this we will be using the results method of the wrapper.search = GoogleSerperAPIWrapper()results = search.results("Apple Inc.")pprint.pp(results)    {'searchParameters': {'q': 'Apple Inc.',                          'gl': 'us',                          'hl': 'en',                          'num': 10,


10,                          'type': 'search'},     'knowledgeGraph': {'title': 'Apple',                        'type': 'Technology company',                        'website': 'http://www.apple.com/',                        'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQwGQRv5TjjkycpctY66mOg_e2-npacrmjAb6_jAWhzlzkFE3OTjxyzbA&s=0',                        'description': 'Apple Inc. is an American multinational '                                       'technology company headquartered in '                                       'Cupertino, California. Apple is the '                                       "world's largest technology company by "


'revenue, with US$394.3 billion in 2022 '                                       'revenue. As of March 2023, Apple is the '                                       "world's biggest...",                        'descriptionSource': 'Wikipedia',                        'descriptionLink': 'https://en.wikipedia.org/wiki/Apple_Inc.',                        'attributes': {'Customer service': '1 (800) 275-2273',                                       'CEO': 'Tim Cook (Aug 24, 2011â€“)',                                       'Headquarters': 'Cupertino, CA',                                       'Founded': 'April 1,


'Founded': 'April 1, 1976, Los Altos, CA',                                       'Founders': 'Steve Jobs, Steve Wozniak, '                                                   'Ronald Wayne, and more',                                       'Products': 'iPhone, iPad, Apple TV, and '                                                   'more'}},     'organic': [{'title': 'Apple',                  'link': 'https://www.apple.com/',                  'snippet': 'Discover the innovative world of Apple and shop '                             'everything iPhone, iPad, Apple Watch, Mac, and Apple '                             'TV, plus explore accessories, entertainment, ...',


'TV, plus explore accessories, entertainment, ...',                  'sitelinks': [{'title': 'Support',                                 'link': 'https://support.apple.com/'},                                {'title': 'iPhone',                                 'link': 'https://www.apple.com/iphone/'},                                {'title': 'Site Map',                                 'link': 'https://www.apple.com/sitemap/'},                                {'title': 'Business',                                 'link': 'https://www.apple.com/business/'},                                {'title': 'Mac',


'link': 'https://www.apple.com/mac/'},                                {'title': 'Watch',                                 'link': 'https://www.apple.com/watch/'}],                  'position': 1},                 {'title': 'Apple Inc. - Wikipedia',                  'link': 'https://en.wikipedia.org/wiki/Apple_Inc.',                  'snippet': 'Apple Inc. is an American multinational technology '                             'company headquartered in Cupertino, California. '                             "Apple is the world's largest technology company by "                             'revenue, ...',                  'attributes': {'Products': 'AirPods; Apple Watch; iPad; iPhone; '


'Mac; Full list',                                 'Founders': 'Steve Jobs; Steve Wozniak; Ronald '                                             'Wayne; Mike Markkula'},                  'sitelinks': [{'title': 'History',                                 'link': 'https://en.wikipedia.org/wiki/History_of_Apple_Inc.'},                                {'title': 'Timeline of Apple Inc. products',                                 'link': 'https://en.wikipedia.org/wiki/Timeline_of_Apple_Inc._products'},                                {'title': 'Litigation involving Apple Inc.',                                 'link':


'link': 'https://en.wikipedia.org/wiki/Litigation_involving_Apple_Inc.'},                                {'title': 'Apple Store',                                 'link': 'https://en.wikipedia.org/wiki/Apple_Store'}],                  'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRvmB5fT1LjqpZx02UM7IJq0Buoqt0DZs_y0dqwxwSWyP4PIN9FaxuTea0&s',                  'position': 2},                 {'title': 'Apple Inc. | History, Products, Headquarters, & Facts '                           '| Britannica',                  'link': 'https://www.britannica.com/topic/Apple-Inc',                  'snippet': 'Apple Inc., formerly Apple Computer, Inc., American '                             'manufacturer of personal computers, smartphones, '


'manufacturer of personal computers, smartphones, '                             'tablet computers, computer peripherals, and computer '                             '...',                  'attributes': {'Related People': 'Steve Jobs Steve Wozniak Jony '                                                   'Ive Tim Cook Angela Ahrendts',                                 'Date': '1976 - present'},                  'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS3liELlhrMz3Wpsox29U8jJ3L8qETR0hBWHXbFnwjwQc34zwZvFELst2E&s',                  'position': 3},                 {'title': 'AAPL: Apple Inc Stock Price Quote - NASDAQ GS - '                           'Bloomberg.com',


'Bloomberg.com',                  'link': 'https://www.bloomberg.com/quote/AAPL:US',                  'snippet': 'AAPL:USNASDAQ GS. Apple Inc. COMPANY INFO ; Open. '                             '170.09 ; Prev Close. 169.59 ; Volume. 48,425,696 ; '                             'Market Cap. 2.667T ; Day Range. 167.54170.35.',                  'position': 4},                 {'title': 'Apple Inc. (AAPL) Company Profile & Facts - Yahoo '                           'Finance',                  'link': 'https://finance.yahoo.com/quote/AAPL/profile/',                  'snippet': 'Apple Inc. designs, manufactures, and markets '                             'smartphones, personal computers, tablets, wearables, '


'and accessories worldwide. The company offers '                             'iPhone, a line ...',                  'position': 5},                 {'title': 'Apple Inc. (AAPL) Stock Price, News, Quote & History - '                           'Yahoo Finance',                  'link': 'https://finance.yahoo.com/quote/AAPL',                  'snippet': 'Find the latest Apple Inc. (AAPL) stock quote, '                             'history, news and other vital information to help '                             'you with your stock trading and investing.',                  'position': 6}],     'peopleAlsoAsk': [{'question': 'What does Apple Inc do?',                        'snippet': 'Apple Inc. (Apple) designs, manufactures and '


'                                   'markets smartphones, personal\n'                                   'computers, tablets, wearables and accessories '                                   'and sells a range of related\n'                                   'services.',                        'title': 'AAPL.O - | Stock Price & Latest News - Reuters',                        'link': 'https://www.reuters.com/markets/companies/AAPL.O/'},                       {'question': 'What is the full form of Apple Inc?',                        'snippet': '(formerly Apple Computer Inc.) is an American '                                   'computer and consumer electronics\n'                                   'company famous for


'company famous for creating the iPhone, iPad '                                   'and Macintosh computers.',                        'title': 'What is Apple? An products and history overview '                                 '- TechTarget',                        'link': 'https://www.techtarget.com/whatis/definition/Apple'},                       {'question': 'What is Apple Inc iPhone?',                        'snippet': 'Apple Inc (Apple) designs, manufactures, and '                                   'markets smartphones, tablets,\n'                                   'personal computers, and wearable devices. The '                                   'company also offers software\n'


'applications and related services, '                                   'accessories, and third-party digital content.\n'                                   "Apple's product portfolio includes iPhone, "                                   'iPad, Mac, iPod, Apple Watch, and\n'                                   'Apple TV.',                        'title': 'Apple Inc Company Profile - Apple Inc Overview - '                                 'GlobalData',                        'link': 'https://www.globaldata.com/company-profile/apple-inc/'},                       {'question': 'Who runs Apple Inc?',                        'snippet': 'Timothy Donald Cook (born November 1, 1960) is '


'Timothy Donald Cook (born November 1, 1960) is '                                   'an American business executive\n'                                   'who has been the chief executive officer of '                                   'Apple Inc. since 2011. Cook\n'                                   "previously served as the company's chief "                                   'operating officer under its co-founder\n'                                   'Steve Jobs. He is the first CEO of any Fortune '                                   '500 company who is openly gay.',                        'title': 'Tim Cook - Wikipedia',                        'link': 'https://en.wikipedia.org/wiki/Tim_Cook'}],


'link': 'https://en.wikipedia.org/wiki/Tim_Cook'}],     'relatedSearches': [{'query': 'Who invented the iPhone'},                         {'query': 'Apple iPhone'},                         {'query': 'History of Apple company PDF'},                         {'query': 'Apple company history'},                         {'query': 'Apple company introduction'},                         {'query': 'Apple India'},                         {'query': 'What does Apple Inc own'},                         {'query': 'Apple Inc After Steve'},                         {'query': 'Apple Watch'},                         {'query': 'Apple App Store'}]}Searching for Google Imagesâ€‹We can also query Google Images using this wrapper. For example:search = GoogleSerperAPIWrapper(type="images")results = search.results("Lion")pprint.pp(results)    {'searchParameters': {'q': 'Lion',


'Lion',                          'gl': 'us',                          'hl': 'en',                          'num': 10,                          'type': 'images'},     'images': [{'title': 'Lion - Wikipedia',                 'imageUrl': 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Lion_waiting_in_Namibia.jpg/1200px-Lion_waiting_in_Namibia.jpg',                 'imageWidth': 1200,                 'imageHeight': 900,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRye79ROKwjfb6017jr0iu8Bz2E1KKuHg-A4qINJaspyxkZrkw&s',                 'thumbnailWidth': 259,                 'thumbnailHeight': 194,                 'source': 'Wikipedia',


'source': 'Wikipedia',                 'domain': 'en.wikipedia.org',                 'link': 'https://en.wikipedia.org/wiki/Lion',                 'position': 1},                {'title': 'Lion | Characteristics, Habitat, & Facts | Britannica',                 'imageUrl': 'https://cdn.britannica.com/55/2155-050-604F5A4A/lion.jpg',                 'imageWidth': 754,                 'imageHeight': 752,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS3fnDub1GSojI0hJ-ZGS8Tv-hkNNloXh98DOwXZoZ_nUs3GWSd&s',                 'thumbnailWidth': 225,                 'thumbnailHeight': 224,                 'source': 'Encyclopedia Britannica',                 'domain': 'www.britannica.com',


'link': 'https://www.britannica.com/animal/lion',                 'position': 2},                {'title': 'African lion, facts and photos',                 'imageUrl': 'https://i.natgeofe.com/n/487a0d69-8202-406f-a6a0-939ed3704693/african-lion.JPG',                 'imageWidth': 3072,                 'imageHeight': 2043,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTPlTarrtDbyTiEm-VI_PML9VtOTVPuDXJ5ybDf_lN11H2mShk&s',                 'thumbnailWidth': 275,                 'thumbnailHeight': 183,                 'source': 'National Geographic',                 'domain': 'www.nationalgeographic.com',                 'link': 'https://www.nationalgeographic.com/animals/mammals/facts/african-lion',


'position': 3},                {'title': 'Saint Louis Zoo | African Lion',                 'imageUrl': 'https://optimise2.assets-servd.host/maniacal-finch/production/animals/african-lion-01-01.jpg?w=1200&auto=compress%2Cformat&fit=crop&dm=1658933674&s=4b63f926a0f524f2087a8e0613282bdb',                 'imageWidth': 1200,                 'imageHeight': 1200,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTlewcJ5SwC7yKup6ByaOjTnAFDeoOiMxyJTQaph2W_I3dnks4&s',                 'thumbnailWidth': 225,                 'thumbnailHeight': 225,                 'source': 'St. Louis Zoo',                 'domain': 'stlzoo.org',                 'link': 'https://stlzoo.org/animals/mammals/carnivores/lion',


'https://stlzoo.org/animals/mammals/carnivores/lion',                 'position': 4},                {'title': 'How to Draw a Realistic Lion like an Artist - Studio '                          'Wildlife',                 'imageUrl': 'https://studiowildlife.com/wp-content/uploads/2021/10/245528858_183911853822648_6669060845725210519_n.jpg',                 'imageWidth': 1431,                 'imageHeight': 2048,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTmn5HayVj3wqoBDQacnUtzaDPZzYHSLKUlIEcni6VB8w0mVeA&s',                 'thumbnailWidth': 188,                 'thumbnailHeight': 269,                 'source': 'Studio Wildlife',                 'domain': 'studiowildlife.com',                 'link':


'link': 'https://studiowildlife.com/how-to-draw-a-realistic-lion-like-an-artist/',                 'position': 5},                {'title': 'Lion | Characteristics, Habitat, & Facts | Britannica',                 'imageUrl': 'https://cdn.britannica.com/29/150929-050-547070A1/lion-Kenya-Masai-Mara-National-Reserve.jpg',                 'imageWidth': 1600,                 'imageHeight': 1085,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSCqaKY_THr0IBZN8c-2VApnnbuvKmnsWjfrwKoWHFR9w3eN5o&s',                 'thumbnailWidth': 273,                 'thumbnailHeight': 185,                 'source': 'Encyclopedia Britannica',                 'domain': 'www.britannica.com',                 'link':


'link': 'https://www.britannica.com/animal/lion',                 'position': 6},                {'title': "Where do lions live? Facts about lions' habitats and "                          'other cool facts',                 'imageUrl': 'https://www.gannett-cdn.com/-mm-/b2b05a4ab25f4fca0316459e1c7404c537a89702/c=0-0-1365-768/local/-/media/2022/03/16/USATODAY/usatsports/imageForEntry5-ODq.jpg?width=1365&height=768&fit=crop&format=pjpg&auto=webp',                 'imageWidth': 1365,                 'imageHeight': 768,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTc_4vCHscgvFvYy3PSrtIOE81kNLAfhDK8F3mfOuotL0kUkbs&s',                 'thumbnailWidth': 299,


299,                 'thumbnailHeight': 168,                 'source': 'USA Today',                 'domain': 'www.usatoday.com',                 'link': 'https://www.usatoday.com/story/news/2023/01/08/where-do-lions-live-habitat/10927718002/',                 'position': 7},                {'title': 'Lion',                 'imageUrl': 'https://i.natgeofe.com/k/1d33938b-3d02-4773-91e3-70b113c3b8c7/lion-male-roar_square.jpg',                 'imageWidth': 3072,                 'imageHeight': 3072,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQqLfnBrBLcTiyTZynHH3FGbBtX2bd1ScwpcuOLnksTyS9-4GM&s',                 'thumbnailWidth': 225,


225,                 'thumbnailHeight': 225,                 'source': 'National Geographic Kids',                 'domain': 'kids.nationalgeographic.com',                 'link': 'https://kids.nationalgeographic.com/animals/mammals/facts/lion',                 'position': 8},                {'title': "Lion | Smithsonian's National Zoo",                 'imageUrl': 'https://nationalzoo.si.edu/sites/default/files/styles/1400_scale/public/animals/exhibit/africanlion-005.jpg?itok=6wA745g_',                 'imageWidth': 1400,                 'imageHeight': 845,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSgB3z_D4dMEOWJ7lajJk4XaQSL4DdUvIRj4UXZ0YoE5fGuWuo&s',                 'thumbnailWidth': 289,                 'thumbnailHeight': 174,


'thumbnailHeight': 174,                 'source': "Smithsonian's National Zoo",                 'domain': 'nationalzoo.si.edu',                 'link': 'https://nationalzoo.si.edu/animals/lion',                 'position': 9},                {'title': "Zoo's New Male Lion Explores Habitat for the First Time "                          '- Virginia Zoo',                 'imageUrl': 'https://virginiazoo.org/wp-content/uploads/2022/04/ZOO_0056-scaled.jpg',                 'imageWidth': 2560,                 'imageHeight': 2141,                 'thumbnailUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDCG7XvXRCwpe_-Vy5mpvrQpVl5q2qwgnDklQhrJpQzObQGz4&s',                 'thumbnailWidth': 246,                 'thumbnailHeight': 205,


'thumbnailHeight': 205,                 'source': 'Virginia Zoo',                 'domain': 'virginiazoo.org',                 'link': 'https://virginiazoo.org/zoos-new-male-lion-explores-habitat-for-thefirst-time/',                 'position': 10}]}Searching for Google Newsâ€‹We can also query Google News using this wrapper. For example:search = GoogleSerperAPIWrapper(type="news")results = search.results("Tesla Inc.")pprint.pp(results)    {'searchParameters': {'q': 'Tesla Inc.',                          'gl': 'us',                          'hl': 'en',                          'num': 10,                          'type': 'news'},     'news': [{'title': 'ISS recommends Tesla investors vote against re-election '                        'of Robyn Denholm',               'link':


Denholm',               'link': 'https://www.reuters.com/business/autos-transportation/iss-recommends-tesla-investors-vote-against-re-election-robyn-denholm-2023-05-04/',               'snippet': 'Proxy advisory firm ISS on Wednesday recommended Tesla '                          'investors vote against re-election of board chair Robyn '                          'Denholm, citing "concerns on...',               'date': '5 mins ago',               'source': 'Reuters',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcROdETe_GUyp1e8RHNhaRM8Z_vfxCvdfinZwzL1bT1ZGSYaGTeOojIdBoLevA&s',               'position': 1},              {'title': 'Global companies by market cap: Tesla fell most in April',               'link': 'https://www.reuters.com/markets/global-companies-by-market-cap-tesla-fell-most-april-2023-05-02/',               'snippet': 'Tesla


'snippet': 'Tesla Inc was the biggest loser among top companies by '                          'market capitalisation in April, hit by disappointing '                          'quarterly earnings after it...',               'date': '1 day ago',               'source': 'Reuters',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ4u4CP8aOdGyRFH6o4PkXi-_eZDeY96vLSag5gDjhKMYf98YBER2cZPbkStQ&s',               'position': 2},              {'title': 'Tesla Wanted an EV Price War. Ford Showed Up.',               'link': 'https://www.bloomberg.com/opinion/articles/2023-05-03/tesla-wanted-an-ev-price-war-ford-showed-up',               'snippet': 'The legacy automaker is paring back the cost of its '                          'Mustang Mach-E model after Tesla discounted its '


after Tesla discounted its '                          'competing EVs, portending tighter...',               'date': '6 hours ago',               'source': 'Bloomberg.com',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS_3Eo4VI0H-nTeIbYc5DaQn5ep7YrWnmhx6pv8XddFgNF5zRC9gEpHfDq8yQ&s',               'position': 3},              {'title': 'Joby Aviation to get investment from Tesla shareholder '                        'Baillie Gifford',               'link': 'https://finance.yahoo.com/news/joby-aviation-investment-tesla-shareholder-204450712.html',               'snippet': 'This comes days after Joby clinched a $55 million '                          'contract extension to deliver up to nine air taxis to '                          'the U.S. Air Force,...',


'the U.S. Air Force,...',               'date': '4 hours ago',               'source': 'Yahoo Finance',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQO0uVn297LI-xryrPNqJ-apUOulj4ohM-xkN4OfmvMOYh1CPdUEBbYx6hviw&s',               'position': 4},              {'title': 'Tesla resumes U.S. orders for a Model 3 version at lower '                        'price, range',               'link': 'https://finance.yahoo.com/news/tesla-resumes-us-orders-model-045736115.html',               'snippet': '(Reuters) -Tesla Inc has resumed taking orders for its '                          'Model 3 long-range vehicle in the United States, the '                          "company's website showed late on...",               'date': '19 hours ago',               'source': 'Yahoo Finance',


'source': 'Yahoo Finance',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIZetJ62sQefPfbQ9KKDt6iH7Mc0ylT5t_hpgeeuUkHhJuAx2FOJ4ZTRVDFg&s',               'position': 5},              {'title': 'The Tesla Model 3 Long Range AWD Is Now Available in the '                        'U.S. With 325 Miles of Range',               'link': 'https://www.notateslaapp.com/news/1393/tesla-reopens-orders-for-model-3-long-range-after-months-of-unavailability',               'snippet': 'Tesla has reopened orders for the Model 3 Long Range '                          'RWD, which has been unavailable for months due to high '                          'demand.',               'date': '7 hours ago',               'source': 'Not a Tesla App',               'imageUrl':


Tesla App',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSecrgxZpRj18xIJY-nDHljyP-A4ejEkswa9eq77qhMNrScnVIqe34uql5U4w&s',               'position': 6},              {'title': 'Tesla Cybertruck alpha prototype spotted at the Fremont '                        'factory in new pics and videos',               'link': 'https://www.teslaoracle.com/2023/05/03/tesla-cybertruck-alpha-prototype-interior-and-exterior-spotted-at-the-fremont-factory-in-new-pics-and-videos/',               'snippet': 'A Tesla Cybertruck alpha prototype goes to Fremont, '                          'California for another round of testing before going to '                          'production later this year (pics...',               'date': '14 hours ago',               'source': 'Tesla Oracle',               'imageUrl':


Oracle',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRO7M5ZLQE-Zo4-_5dv9hNAQZ3wSqfvYCuKqzxHG-M6CgLpwPMMG_ssebdcMg&s',               'position': 7},              {'title': 'Tesla putting facility in new part of country - Austin '                        'Business Journal',               'link': 'https://www.bizjournals.com/austin/news/2023/05/02/tesla-leases-building-seattle-area.html',               'snippet': 'Check out what Puget Sound Business Journal has to '                          "report about the Austin-based company's real estate "                          'footprint in the Pacific Northwest.',               'date': '22 hours ago',               'source': 'The Business Journals',               'imageUrl':


Journals',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR9kIEHWz1FcHKDUtGQBS0AjmkqtyuBkQvD8kyIY3kpaPrgYaN7I_H2zoOJsA&s',               'position': 8},              {'title': 'Tesla (TSLA) Resumes Orders for Model 3 Long Range After '                        'Backlog',               'link': 'https://www.bloomberg.com/news/articles/2023-05-03/tesla-resumes-orders-for-popular-model-3-long-range-at-47-240',               'snippet': 'Tesla Inc. has resumed taking orders for its Model 3 '                          'Long Range edition with a starting price of $47240, '                          'according to its website.',               'date': '5 hours ago',               'source': 'Bloomberg.com',               'imageUrl':


'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTWWIC4VpMTfRvSyqiomODOoLg0xhoBf-Tc1qweKnSuaiTk-Y1wMJZM3jct0w&s',               'position': 9}]}If you want to only receive news articles published in the last hour, you can do the following:search = GoogleSerperAPIWrapper(type="news", tbs="qdr:h")results = search.results("Tesla Inc.")pprint.pp(results)    {'searchParameters': {'q': 'Tesla Inc.',                          'gl': 'us',                          'hl': 'en',                          'num': 10,                          'type': 'news',                          'tbs': 'qdr:h'},     'news': [{'title': 'Oklahoma Gov. Stitt sees growing foreign interest in '                        'investments in ...',               'link':


in ...',               'link': 'https://www.reuters.com/world/us/oklahoma-gov-stitt-sees-growing-foreign-interest-investments-state-2023-05-04/',               'snippet': 'T)), a battery supplier to electric vehicle maker Tesla '                          'Inc (TSLA.O), said on Sunday it is considering building '                          'a battery plant in Oklahoma, its third in...',               'date': '53 mins ago',               'source': 'Reuters',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSSTcsXeenqmEKdiekvUgAmqIPR4nlAmgjTkBqLpza-lLfjX1CwB84MoNVj0Q&s',               'position': 1},              {'title': 'Ryder lanza soluciÃ³n llave en mano para vehÃculos '                        'elÃ©ctricos en EU',               'link':


en EU',               'link': 'https://www.tyt.com.mx/nota/ryder-lanza-solucion-llave-en-mano-para-vehiculos-electricos-en-eu',               'snippet': 'Ryder System Inc. presentÃ³ RyderElectric+ TM como su '                          'nueva soluciÃ³n llave en mano ... Ryder tambiÃ©n tiene '                          'reservados los semirremolques Tesla y continÃºa...',               'date': '56 mins ago',               'source': 'Revista Transportes y Turismo',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQJhXTQQtjSUZf9YPM235WQhFU5_d7lEA76zB8DGwZfixcgf1_dhPJyKA1Nbw&s',               'position': 2},              {'title': '"I think people can get by with $999 million," Bernie '                        'Sanders tells American Billionaires.',


tells American Billionaires.',               'link': 'https://thebharatexpressnews.com/i-think-people-can-get-by-with-999-million-bernie-sanders-tells-american-billionaires-heres-how-the-ultra-rich-can-pay-less-income-tax-than-you-legally/',               'snippet': 'The report noted that in 2007 and 2011, Amazon.com Inc. '                          'founder Jeff Bezos â€œdid not pay a dime in federal ... '                          'If you want to bet on Musk, check out Tesla.',               'date': '11 mins ago',               'source': 'THE BHARAT EXPRESS NEWS',               'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR_X9qqSwVFBBdos2CK5ky5IWIE3aJPCQeRYR9O1Jz4t-MjaEYBuwK7AU3AJQ&s',               'position': 3}]}Some examples of the tbs parameter:qdr:h (past hour)


qdr:d (past day)
qdr:w (past week)
qdr:m (past month)
qdr:y (past year)You can specify intermediate time periods by adding a number:
qdr:h12 (past 12 hours)
qdr:d3 (past 3 days)
qdr:w2 (past 2 weeks)
qdr:m6 (past 6 months)


qdr:m2 (past 2 years)For all supported filters simply go to Google Search, search for something, click on "Tools", add your date filter and check the URL for "tbs=".Searching for Google Placesâ€‹We can also query Google Places using this wrapper. For example:search = GoogleSerperAPIWrapper(type="places")results = search.results("Italian restaurants in Upper East Side")pprint.pp(results)    {'searchParameters': {'q': 'Italian restaurants in Upper East Side',                          'gl': 'us',                          'hl': 'en',                          'num': 10,                          'type': 'places'},     'places': [{'position': 1,                 'title': "L'Osteria",                 'address': '1219 Lexington Ave',                 'latitude': 40.777154599999996,                 'longitude': -73.9571363,                 'thumbnailUrl':


'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipNjU7BWEq_aYQANBCbX52Kb0lDpd_lFIx5onw40=w92-h92-n-k-no',                 'rating': 4.7,                 'ratingCount': 91,                 'category': 'Italian'},                {'position': 2,                 'title': "Tony's Di Napoli",                 'address': '1081 3rd Ave',                 'latitude': 40.7643567,                 'longitude': -73.9642373,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipNbNv6jZkJ9nyVi60__8c1DQbe_eEbugRAhIYye=w92-h92-n-k-no',                 'rating': 4.5,                 'ratingCount': 2265,                 'category':


'category': 'Italian'},                {'position': 3,                 'title': 'Caravaggio',                 'address': '23 E 74th St',                 'latitude': 40.773412799999996,                 'longitude': -73.96473379999999,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipPDGchokDvppoLfmVEo6X_bWd3Fz0HyxIHTEe9V=w92-h92-n-k-no',                 'rating': 4.5,                 'ratingCount': 276,                 'category': 'Italian'},                {'position': 4,                 'title': 'Luna Rossa',                 'address': '347 E 85th St',                 'latitude': 40.776593999999996,


40.776593999999996,                 'longitude': -73.950351,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipNPCpCPuqPAb1Mv6_fOP7cjb8Wu1rbqbk2sMBlh=w92-h92-n-k-no',                 'rating': 4.5,                 'ratingCount': 140,                 'category': 'Italian'},                {'position': 5,                 'title': "Paola's",                 'address': '1361 Lexington Ave',                 'latitude': 40.7822019,                 'longitude': -73.9534096,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipPJr2Vcx-B6K-GNQa4koOTffggTePz8TKRTnWi3=w92-h92-n-k-no',                 'rating': 4.5,


4.5,                 'ratingCount': 344,                 'category': 'Italian'},                {'position': 6,                 'title': 'Come Prima',                 'address': '903 Madison Ave',                 'latitude': 40.772124999999996,                 'longitude': -73.965012,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipNrX19G0NVdtDyMovCQ-M-m0c_gLmIxrWDQAAbz=w92-h92-n-k-no',                 'rating': 4.5,                 'ratingCount': 176,                 'category': 'Italian'},                {'position': 7,                 'title': 'Botte UES',                 'address': '1606 1st Ave.',                 'latitude':


'latitude': 40.7750785,                 'longitude': -73.9504801,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipPPN5GXxfH3NDacBc0Pt3uGAInd9OChS5isz9RF=w92-h92-n-k-no',                 'rating': 4.4,                 'ratingCount': 152,                 'category': 'Italian'},                {'position': 8,                 'title': 'Piccola Cucina Uptown',                 'address': '106 E 60th St',                 'latitude': 40.7632468,                 'longitude': -73.9689825,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipPifIgzOCD5SjgzzqBzGkdZCBp0MQsK5k7M7znn=w92-h92-n-k-no',


'rating': 4.6,                 'ratingCount': 941,                 'category': 'Italian'},                {'position': 9,                 'title': 'Pinocchio Restaurant',                 'address': '300 E 92nd St',                 'latitude': 40.781453299999995,                 'longitude': -73.9486788,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipNtxlIyEEJHtDtFtTR9nB38S8A2VyMu-mVVz72A=w92-h92-n-k-no',                 'rating': 4.5,                 'ratingCount': 113,                 'category': 'Italian'},                {'position': 10,                 'title': 'Barbaresco',                 'address':


'address': '843 Lexington Ave #1',                 'latitude': 40.7654332,                 'longitude': -73.9656873,                 'thumbnailUrl': 'https://lh5.googleusercontent.com/p/AF1QipMb9FbPuXF_r9g5QseOHmReejxSHgSahPMPJ9-8=w92-h92-n-k-no',                 'rating': 4.3,                 'ratingCount': 122,                 'locationHint': 'In The Touraine',                 'category': 'Italian'}]}PreviousGoogle SearchNextGradio ToolsAs part of a Self Ask With Search ChainObtaining results with metadataSearching for Google ImagesSearching for Google NewsSearching for Google PlacesCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Google Places | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsGoogle PlacesGoogle PlacesThis notebook goes through how to use Google Places API#!pip install googlemapsimport osos.environ["GPLACES_API_KEY"] = ""from langchain.tools import GooglePlacesToolplaces = GooglePlacesTool()places.run("al fornos")    "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


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"PreviousGolden QueryNextGoogle SearchCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Brave Search | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsBrave SearchBrave SearchThis notebook goes over how to use the Brave Search tool.from langchain.tools import BraveSearchapi_key = "BSAv1neIuQOsxqOyy0sEe_ie2zD_n_V"tool = BraveSearch.from_api_key(api_key=api_key, search_kwargs={"count": 3})tool.run("obama middle name")    '[{"title": "Obama\'s Middle Name -- My Last Name -- is \'Hussein.\' So?", "link": "https://www.cair.com/cair_in_the_news/obamas-middle-name-my-last-name-is-hussein-so/", "snippet": "I wasn\\u2019t sure whether to laugh or cry a few days back listening to radio talk show host Bill Cunningham repeatedly scream Barack Obama\\u2019s middle name \\u2014 my last name \\u2014 as


\\u2014 my last name \\u2014 as if he had anti-Muslim Tourette\\u2019s. \\u201cHussein,\\u201d Cunningham hissed like he was beckoning Satan when shouting the ..."}, {"title": "What\'s up with Obama\'s middle name? - Quora", "link": "https://www.quora.com/Whats-up-with-Obamas-middle-name", "snippet": "Answer (1 of 15): A better question would be, \\u201cWhat\\u2019s up with Obama\\u2019s first name?\\u201d President Barack Hussein Obama\\u2019s father\\u2019s name was Barack Hussein Obama. He was named after his father. Hussein, Obama\\u2019s middle name, is a very common Arabic name, meaning "good," "handsome," or ..."}, {"title": "Barack Obama | Biography, Parents, Education, Presidency, Books, ...", "link": "https://www.britannica.com/biography/Barack-Obama", "snippet": "Barack Obama, in full Barack Hussein Obama II, (born August 4, 1961, Honolulu, Hawaii, U.S.), 44th president of the United States (2009\\u201317) and the first African American to hold the office. Before winning the presidency, Obama represented Illinois in the U.S."}]'PreviousBing


Obama represented Illinois in the U.S."}]'PreviousBing SearchNextChatGPT PluginsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Apify | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsApifyApifyThis notebook shows how to use the Apify integration for LangChain.Apify is a cloud platform for web scraping and data extraction,
which provides an ecosystem of more than a thousand
ready-made apps called Actors for various web scraping, crawling, and data extraction use cases.
For example, you can use it to extract Google Search results, Instagram and Facebook profiles, products from Amazon or Shopify, Google Maps reviews, etc. etc.In this example, we'll use the Website Content Crawler Actor,
which can deeply crawl websites such as documentation, knowledge bases, help centers, or blogs,


and extract text content from the web pages. Then we feed the documents into a vector index and answer questions from it.#!pip install apify-client openai langchain chromadb tiktokenFirst, import ApifyWrapper into your source code:from langchain.document_loaders.base import Documentfrom langchain.indexes import VectorstoreIndexCreatorfrom langchain.utilities import ApifyWrapperInitialize it using your Apify API token and for the purpose of this example, also with your OpenAI API key:import osos.environ["OPENAI_API_KEY"] = "Your OpenAI API key"os.environ["APIFY_API_TOKEN"] = "Your Apify API token"apify = ApifyWrapper()Then run the Actor, wait for it to finish, and fetch its results from the Apify dataset into a LangChain document loader.Note that if you already have some results in an Apify dataset, you can load them directly using ApifyDatasetLoader, as shown in this notebook. In that notebook, you'll also find the explanation of the dataset_mapping_function, which is used to map fields from the Apify dataset records to LangChain Document fields.loader = apify.call_actor(    actor_id="apify/website-content-crawler",    run_input={"startUrls": [{"url": "https://python.langchain.com/en/latest/"}]},    dataset_mapping_function=lambda item: Document(        page_content=item["text"] or "", metadata={"source": item["url"]}    ),)Initialize the vector index from the crawled documents:index = VectorstoreIndexCreator().from_loaders([loader])And finally, query the vector index:query = "What is LangChain?"result = index.query_with_sources(query)print(result["answer"])print(result["sources"])     LangChain is a standard interface through which you can interact with a variety of large language models (LLMs). It provides modules that


through which you can interact with a variety of large language models (LLMs). It provides modules that can be used to build language model applications, and it also provides chains and agents with memory capabilities.        https://python.langchain.com/en/latest/modules/models/llms.html, https://python.langchain.com/en/latest/getting_started/getting_started.htmlPreviousToolsNextArXiv API ToolCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Google Search | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsGoogle SearchOn this pageGoogle SearchThis notebook goes over how to use the google search component.First, you need to set up the proper API keys and environment variables. To set it up, create the GOOGLE_API_KEY in the Google Cloud credential console (https://console.cloud.google.com/apis/credentials) and a GOOGLE_CSE_ID using the Programmable Search Enginge (https://programmablesearchengine.google.com/controlpanel/create). Next, it is good to follow the instructions found here.Then we will need to set some environment variables.import osos.environ["GOOGLE_CSE_ID"] = ""os.environ["GOOGLE_API_KEY"] = ""from langchain.tools import Toolfrom langchain.utilities import GoogleSearchAPIWrappersearch = GoogleSearchAPIWrapper()tool = Tool(    name="Google Search",    description="Search Google for recent results.",    func=search.run,)tool.run("Obama's first name?")    "STATE OF HAWAII. 1 Child's First Name. (Type or print).


"STATE OF HAWAII. 1 Child's First Name. (Type or print). 2. Sex. BARACK. 3. This Birth. CERTIFICATE OF LIVE BIRTH. FILE. NUMBER 151 le. lb. Middle Name. Barack Hussein Obama II is an American former politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic\xa0... When Barack Obama was elected president in 2008, he became the first African American to hold ... The Middle East remained a key foreign policy challenge. Jan 19, 2017 ... Jordan Barack Treasure, New York City, born in 2008 ... Jordan Barack Treasure made national news when he was the focus of a New York newspaper\xa0... Portrait of George Washington, the 1st President of the United States ... Portrait of Barack Obama, the 44th President of the United States\xa0... His full name is Barack Hussein Obama II. Since the â€œIIâ€� is simply because he was named for his father, his last name is Obama. Mar 22, 2008 ... Barry Obama decided that he didn't like his nickname. A few of his friends at Occidental College had already begun to call him Barack (his\xa0... Aug 18, 2017 ... It took him several seconds and multiple clues to remember former President Barack Obama's first name. Miller knew that every answer had to\xa0... Feb 9, 2015 ... Michael Jordan misspelled Barack Obama's first name on 50th-birthday gift ... Knowing Obama is a Chicagoan and huge basketball fan,\xa0... 4 days ago ... Barack Obama, in full Barack Hussein Obama II, (born August 4, 1961, Honolulu, Hawaii, U.S.), 44th president of the United States (2009â€“17) and\xa0..."Number of


president of the United States (2009â€“17) and\xa0..."Number of Resultsâ€‹You can use the k parameter to set the number of resultssearch = GoogleSearchAPIWrapper(k=1)tool = Tool(    name="I'm Feeling Lucky",    description="Search Google and return the first result.",    func=search.run,)tool.run("python")    'The official home of the Python Programming Language.''The official home of the Python Programming Language.'Metadata Resultsâ€‹Run query through GoogleSearch and return snippet, title, and link metadata.Snippet: The description of the result.Title: The title of the result.Link: The link to the result.search = GoogleSearchAPIWrapper()def top5_results(query):    return search.results(query, 5)tool = Tool(    name="Google Search Snippets",    description="Search Google for recent results.",    func=top5_results,)PreviousGoogle PlacesNextGoogle Serper APINumber of ResultsMetadata ResultsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Wikipedia | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsWikipediaWikipediaWikipedia is a multilingual free online encyclopedia written and maintained by a community of volunteers, known as Wikipedians, through open collaboration and using a wiki-based editing system called MediaWiki. Wikipedia is the largest and most-read reference work in history.First, you need to install wikipedia python package.pip install wikipediafrom langchain.tools import WikipediaQueryRunfrom langchain.utilities import WikipediaAPIWrapperwikipedia = WikipediaQueryRun(api_wrapper=WikipediaAPIWrapper())wikipedia.run("HUNTER X HUNTER")    'Page: Hunter Ã— Hunter\nSummary: Hunter Ã— Hunter (stylized as HUNTERÃ—HUNTER and pronounced "hunter hunter") is a Japanese manga series written and illustrated by Yoshihiro Togashi. It has been serialized in Shueisha\'s shÅ�nen manga magazine Weekly ShÅ�nen Jump since March 1998, although the manga has frequently gone on extended hiatuses since 2006. Its chapters have been collected in 37 tankÅ�bon


hiatuses since 2006. Its chapters have been collected in 37 tankÅ�bon volumes as of November 2022. The story focuses on a young boy named Gon Freecss who discovers that his father, who left him at a young age, is actually a world-renowned Hunter, a licensed professional who specializes in fantastical pursuits such as locating rare or unidentified animal species, treasure hunting, surveying unexplored enclaves, or hunting down lawless individuals. Gon departs on a journey to become a Hunter and eventually find his father. Along the way, Gon meets various other Hunters and encounters the paranormal.\nHunter Ã— Hunter was adapted into a 62-episode anime television series produced by Nippon Animation and directed by Kazuhiro Furuhashi, which ran on Fuji Television from October 1999 to March 2001. Three separate original video animations (OVAs) totaling 30 episodes were subsequently produced by Nippon Animation and released in Japan from 2002 to 2004. A second anime television series by Madhouse aired on Nippon Television from October 2011 to September 2014, totaling 148 episodes, with two animated theatrical films released in 2013. There are also numerous audio albums, video games, musicals, and other media based on Hunter Ã— Hunter.\nThe manga has been translated into English and released in North America by Viz Media since April 2005. Both television series have been also licensed by Viz Media, with the first series having aired on the Funimation Channel in 2009 and the second series broadcast on Adult Swim\'s Toonami programming block from April 2016 to June 2019.\nHunter Ã— Hunter has been a huge critical and financial success and has become one of the best-selling manga series of all time, having over 84 million copies in circulation by July 2022.\n\nPage: Hunter Ã— Hunter


84 million copies in circulation by July 2022.\n\nPage: Hunter Ã— Hunter (2011 TV series)\nSummary: Hunter Ã— Hunter is an anime television series that aired from 2011 to 2014 based on Yoshihiro Togashi\'s manga series Hunter Ã— Hunter. The story begins with a young boy named Gon Freecss, who one day discovers that the father who he thought was dead, is in fact alive and well. He learns that his father, Ging, is a legendary "Hunter", an individual who has proven themselves an elite member of humanity. Despite the fact that Ging left his son with his relatives in order to pursue his own dreams, Gon becomes determined to follow in his father\'s footsteps, pass the rigorous "Hunter Examination", and eventually find his father to become a Hunter in his own right.\nThis new Hunter Ã— Hunter anime was announced on July 24, 2011. It is a complete reboot starting from the beginning of the original manga, with no connection to the first anime television series from 1999. Produced by Nippon TV, VAP, Shueisha and Madhouse, the series is directed by Hiroshi KÅ�jina, with Atsushi Maekawa and Tsutomu Kamishiro handling series composition, Takahiro Yoshimatsu designing the characters and Yoshihisa Hirano composing the music. Instead of having the old cast reprise their roles for the new adaptation, the series features an entirely new cast to voice the characters. The new series premiered airing weekly on Nippon TV and the nationwide Nippon News Network from October 2, 2011.  The series started to be collected in both DVD and Blu-ray format on January 25, 2012. Viz Media has licensed the anime for a DVD/Blu-ray release in North America with an English dub. On television, the series began airing on Adult


release in North America with an English dub. On television, the series began airing on Adult Swim\'s Toonami programming block on April 17, 2016, and ended on June 23, 2019.The anime series\' opening theme is alternated between the song "Departure!" and an alternate version titled "Departure! -Second Version-" both sung by Galneryus\' voc'PreviousTwilioNextWolfram AlphaCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Lemon AI NLP Workflow Automation | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsLemon AI NLP Workflow AutomationOn this pageLemon AI NLP Workflow Automation\


Full docs are available at: https://github.com/felixbrock/lemonai-py-clientLemon AI helps you build powerful AI assistants in minutes and automate workflows by allowing for accurate and reliable read and write operations in tools like Airtable, Hubspot, Discord, Notion, Slack and Github.Most connectors available today are focused on read-only operations, limiting the potential of LLMs. Agents, on the other hand, have a tendency to hallucinate from time to time due to missing context or instructions.With Lemon AI, it is possible to give your agents access to well-defined APIs for reliable read and write operations. In addition, Lemon AI functions allow you to further reduce the risk of hallucinations by providing a way to statically define workflows that the model can rely on in case of uncertainty.Quick Startâ€‹The following quick start demonstrates how to use Lemon AI in combination with Agents to automate workflows that involve interaction with internal tooling.1. Install Lemon AIâ€‹Requires Python 3.8.1 and above.To use Lemon AI in your Python project run pip install lemonaiThis will install the corresponding Lemon AI client which you can then import into your script.The tool uses Python packages langchain and loguru. In case of any installation errors with Lemon AI, install both packages first and then install the Lemon AI package.2. Launch the Serverâ€‹The interaction of your agents and all tools provided by Lemon AI is handled by the Lemon AI Server. To use Lemon AI you need to run the server on your local machine so the Lemon AI Python client can connect to it.3. Use Lemon AI with Langchainâ€‹Lemon AI automatically solves given tasks by finding the right combination of relevant tools or uses Lemon AI Functions as an alternative. The following example demonstrates how to retrieve a user from Hackernews and write it to a table in Airtable:(Optional) Define your Lemon AI Functionsâ€‹Similar


it to a table in Airtable:(Optional) Define your Lemon AI Functionsâ€‹Similar to OpenAI functions, Lemon AI provides the option to define workflows as reusable functions. These functions can be defined for use cases where it is especially important to move as close as possible to near-deterministic behavior. Specific workflows can be defined in a separate lemonai.json:[  {    "name": "Hackernews Airtable User Workflow",    "description": "retrieves user data from Hackernews and appends it to a table in Airtable",    "tools": ["hackernews-get-user", "airtable-append-data"]  }]Your model will have access to these functions and will prefer them over self-selecting tools to solve a given task. All you have to do is to let the agent know that it should use a given function by including the function name in the prompt.Include Lemon AI in your Langchain projectâ€‹import osfrom lemonai import execute_workflowfrom langchain import OpenAILoad API Keys and Access Tokensâ€‹To use tools that require authentication, you have to store the corresponding access credentials in your environment in the format "{tool name}_{authentication string}" where the authentication string is one of ["API_KEY", "SECRET_KEY", "SUBSCRIPTION_KEY", "ACCESS_KEY"] for API keys or ["ACCESS_TOKEN", "SECRET_TOKEN"] for authentication tokens. Examples are "OPENAI_API_KEY", "BING_SUBSCRIPTION_KEY", "AIRTABLE_ACCESS_TOKEN".""" Load all relevant API Keys and Access Tokens into your environment variables """os.environ["OPENAI_API_KEY"] = "*INSERT OPENAI API KEY HERE*"os.environ["AIRTABLE_ACCESS_TOKEN"] = "*INSERT AIRTABLE TOKEN HERE*"hackernews_username = "*INSERT HACKERNEWS USERNAME HERE*"airtable_base_id = "*INSERT BASE ID HERE*"airtable_table_id = "*INSERT TABLE ID HERE*"""" Define your instruction


BASE ID HERE*"airtable_table_id = "*INSERT TABLE ID HERE*"""" Define your instruction to be given to your LLM """prompt = f"""Read information from Hackernews for user {hackernews_username} and then write the results toAirtable (baseId: {airtable_base_id}, tableId: {airtable_table_id}). Only write the fields "username", "karma"and "created_at_i". Please make sure that Airtable does NOT automatically convert the field types.""""""Use the Lemon AI execute_workflow wrapper to run your Langchain agent in combination with Lemon AI  """model = OpenAI(temperature=0)execute_workflow(llm=model, prompt_string=prompt)4. Gain transparency on your Agent's decision makingâ€‹To gain transparency on how your Agent interacts with Lemon AI tools to solve a given task, all decisions made, tools used and operations performed are written to a local lemonai.log file. Every time your LLM agent is interacting with the Lemon AI tool stack a corresponding log entry is created.2023-06-26T11:50:27.708785+0100 - b5f91c59-8487-45c2-800a-156eac0c7dae - hackernews-get-user2023-06-26T11:50:39.624035+0100 - b5f91c59-8487-45c2-800a-156eac0c7dae - airtable-append-data2023-06-26T11:58:32.925228+0100 - 5efe603c-9898-4143-b99a-55b50007ed9d - hackernews-get-user2023-06-26T11:58:43.988788+0100 - 5efe603c-9898-4143-b99a-55b50007ed9d -


- airtable-append-dataBy using the Lemon AI Analytics Tool you can easily gain a better understanding of how frequently and in which order tools are used. As a result, you can identify weak spots in your agentâ€™s decision-making capabilities and move to a more deterministic behavior by defining Lemon AI functions.PreviousIFTTT WebHooksNextMetaphor SearchQuick Start1. Install Lemon AI2. Launch the Server3. Use Lemon AI with Langchain4. Gain transparency on your Agent's decision makingCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


YouTubeSearchTool | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsYouTubeSearchToolYouTubeSearchToolThis notebook shows how to use a tool to search YouTubeAdapted from https://github.com/venuv/langchain_yt_tools#! pip install youtube_searchfrom langchain.tools import YouTubeSearchTooltool = YouTubeSearchTool()tool.run("lex friedman")    "['/watch?v=VcVfceTsD0A&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=gPfriiHBBek&pp=ygUMbGV4IGZyaWVkbWFu']"You can also specify the number of results that are returnedtool.run("lex friedman,5")    "['/watch?v=VcVfceTsD0A&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=YVJ8gTnDC4Y&pp=ygUMbGV4IGZyaWVkbWFu',


'/watch?v=Udh22kuLebg&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=gPfriiHBBek&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=L_Guz73e6fw&pp=ygUMbGV4IGZyaWVkbWFu']"PreviousWolfram AlphaNextZapier Natural Language Actions APICommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Zapier Natural Language Actions API | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsZapier Natural Language Actions APIOn this pageZapier Natural Language Actions API\


Full docs here: https://nla.zapier.com/start/Zapier Natural Language Actions gives you access to the 5k+ apps, 20k+ actions on Zapier's platform through a natural language API interface.NLA supports apps like Gmail, Salesforce, Trello, Slack, Asana, HubSpot, Google Sheets, Microsoft Teams, and thousands more apps: https://zapier.com/appsZapier NLA handles ALL the underlying API auth and translation from natural language --> underlying API call --> return simplified output for LLMs. The key idea is you, or your users, expose a set of actions via an oauth-like setup window, which you can then query and execute via a REST API.NLA offers both API Key and OAuth for signing NLA API requests.Server-side (API Key): for quickly getting started, testing, and production scenarios where LangChain will only use actions exposed in the developer's Zapier account (and will use the developer's connected accounts on Zapier.com)User-facing (Oauth): for production scenarios where you are deploying an end-user facing application and LangChain needs access to end-user's exposed actions and connected accounts on Zapier.comThis quick start will focus mostly on the server-side use case for brevity. Jump to Example Using OAuth Access Token to see a short example how to set up Zapier for user-facing situations. Review full docs for full user-facing oauth developer support.This example goes over how to use the Zapier integration with a SimpleSequentialChain, then an Agent.


In code, below:import os# get from https://platform.openai.com/os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "")# get from https://nla.zapier.com/docs/authentication/ after logging in):os.environ["ZAPIER_NLA_API_KEY"] = os.environ.get("ZAPIER_NLA_API_KEY", "")Example with Agentâ€‹Zapier tools can be used with an agent. See the example below.from langchain.llms import OpenAIfrom langchain.agents import initialize_agentfrom langchain.agents.agent_toolkits import ZapierToolkitfrom langchain.agents import AgentTypefrom langchain.utilities.zapier import ZapierNLAWrapper## step 0. expose gmail 'find email' and slack 'send channel message' actions# first go here, log in, expose (enable) the two actions: https://nla.zapier.com/demo/start -- for this example, can leave all fields "Have AI guess"# in an oauth scenario, you'd get your own <provider> id (instead of 'demo') which you route your users through firstllm = OpenAI(temperature=0)zapier = ZapierNLAWrapper()toolkit = ZapierToolkit.from_zapier_nla_wrapper(zapier)agent = initialize_agent(    toolkit.get_tools(), llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)agent.run(    "Summarize the last email I received regarding Silicon Valley Bank. Send the summary to the #test-zapier channel in slack.")            > Entering new AgentExecutor chain...     I need to find the email and summarize it.    Action: Gmail: Find Email    Action Input: Find the latest email from Silicon Valley Bank    Observation:


Email    Action Input: Find the latest email from Silicon Valley Bank    Observation: {"from__name": "Silicon Valley Bridge Bank, N.A.", "from__email": "sreply@svb.com", "body_plain": "Dear Clients, After chaotic, tumultuous & stressful days, we have clarity on path for SVB, FDIC is fully insuring all deposits & have an ask for clients & partners as we rebuild. Tim Mayopoulos <https://eml.svb.com/NjEwLUtBSy0yNjYAAAGKgoxUeBCLAyF_NxON97X4rKEaNBLG", "reply_to__email": "sreply@svb.com", "subject": "Meet the new CEO Tim Mayopoulos", "date": "Tue, 14 Mar 2023 23:42:29 -0500 (CDT)", "message_url": "https://mail.google.com/mail/u/0/#inbox/186e393b13cfdf0a", "attachment_count": "0", "to__emails": "ankush@langchain.dev", "message_id": "186e393b13cfdf0a", "labels": "IMPORTANT, CATEGORY_UPDATES, INBOX"}    Thought: I need to summarize the email and send it to the #test-zapier channel in Slack.    Action: Slack: Send Channel Message    Action Input: Send a slack message to the #test-zapier channel with the text "Silicon Valley Bank has announced that Tim Mayopoulos is the new CEO. FDIC is fully insuring all deposits and they have an ask for clients and partners as they rebuild."    Observation: {"message__text": "Silicon Valley Bank has announced that Tim Mayopoulos is the new CEO. FDIC is fully insuring all deposits and they have an ask for


is the new CEO. FDIC is fully insuring all deposits and they have an ask for clients and partners as they rebuild.", "message__permalink": "https://langchain.slack.com/archives/C04TSGU0RA7/p1678859932375259", "channel": "C04TSGU0RA7", "message__bot_profile__name": "Zapier", "message__team": "T04F8K3FZB5", "message__bot_id": "B04TRV4R74K", "message__bot_profile__deleted": "false", "message__bot_profile__app_id": "A024R9PQM", "ts_time": "2023-03-15T05:58:52Z", "message__bot_profile__icons__image_36": "https://avatars.slack-edge.com/2022-08-02/3888649620612_f864dc1bb794cf7d82b0_36.png", "message__blocks[]block_id": "kdZZ", "message__blocks[]elements[]type": "['rich_text_section']"}    Thought: I now know the final answer.    Final Answer: I have sent a summary of the last email from Silicon Valley Bank to the #test-zapier channel in Slack.        > Finished chain.    'I have sent a summary of the last email from Silicon Valley Bank to the #test-zapier channel in Slack.'Example with SimpleSequentialChainâ€‹If you need more explicit control, use a chain, like below.from langchain.llms import OpenAIfrom langchain.chains import LLMChain, TransformChain, SimpleSequentialChainfrom langchain.prompts import PromptTemplatefrom langchain.tools.zapier.tool import ZapierNLARunActionfrom langchain.utilities.zapier import


import ZapierNLARunActionfrom langchain.utilities.zapier import ZapierNLAWrapper## step 0. expose gmail 'find email' and slack 'send direct message' actions# first go here, log in, expose (enable) the two actions: https://nla.zapier.com/demo/start -- for this example, can leave all fields "Have AI guess"# in an oauth scenario, you'd get your own <provider> id (instead of 'demo') which you route your users through firstactions = ZapierNLAWrapper().list()## step 1. gmail find emailGMAIL_SEARCH_INSTRUCTIONS = "Grab the latest email from Silicon Valley Bank"def nla_gmail(inputs):    action = next(        (a for a in actions if a["description"].startswith("Gmail: Find Email")), None    )    return {        "email_data": ZapierNLARunAction(            action_id=action["id"],            zapier_description=action["description"],            params_schema=action["params"],        ).run(inputs["instructions"])    }gmail_chain = TransformChain(    input_variables=["instructions"],    output_variables=["email_data"],    transform=nla_gmail,)## step 2. generate draft replytemplate = """You are an assisstant who drafts replies to an incoming email. Output draft reply in plain text (not JSON).Incoming email:{email_data}Draft email reply:"""prompt_template = PromptTemplate(input_variables=["email_data"], template=template)reply_chain = LLMChain(llm=OpenAI(temperature=0.7), prompt=prompt_template)## step


prompt=prompt_template)## step 3. send draft reply via a slack direct messageSLACK_HANDLE = "@Ankush Gola"def nla_slack(inputs):    action = next(        (            a            for a in actions            if a["description"].startswith("Slack: Send Direct Message")        ),        None,    )    instructions = f'Send this to {SLACK_HANDLE} in Slack: {inputs["draft_reply"]}'    return {        "slack_data": ZapierNLARunAction(            action_id=action["id"],            zapier_description=action["description"],            params_schema=action["params"],        ).run(instructions)    }slack_chain = TransformChain(    input_variables=["draft_reply"],    output_variables=["slack_data"],    transform=nla_slack,)## finally, executeoverall_chain = SimpleSequentialChain(    chains=[gmail_chain, reply_chain, slack_chain], verbose=True)overall_chain.run(GMAIL_SEARCH_INSTRUCTIONS)            > Entering new SimpleSequentialChain chain...    {"from__name": "Silicon Valley Bridge Bank, N.A.", "from__email": "sreply@svb.com", "body_plain": "Dear Clients, After chaotic, tumultuous & stressful days, we have clarity on path for SVB, FDIC is fully insuring all deposits & have


we have clarity on path for SVB, FDIC is fully insuring all deposits & have an ask for clients & partners as we rebuild. Tim Mayopoulos <https://eml.svb.com/NjEwLUtBSy0yNjYAAAGKgoxUeBCLAyF_NxON97X4rKEaNBLG", "reply_to__email": "sreply@svb.com", "subject": "Meet the new CEO Tim Mayopoulos", "date": "Tue, 14 Mar 2023 23:42:29 -0500 (CDT)", "message_url": "https://mail.google.com/mail/u/0/#inbox/186e393b13cfdf0a", "attachment_count": "0", "to__emails": "ankush@langchain.dev", "message_id": "186e393b13cfdf0a", "labels": "IMPORTANT, CATEGORY_UPDATES, INBOX"}        Dear Silicon Valley Bridge Bank,         Thank you for your email and the update regarding your new CEO Tim Mayopoulos. We appreciate your dedication to keeping your clients and partners informed and we look forward to continuing our relationship with you.         Best regards,     [Your Name]    {"message__text": "Dear Silicon Valley Bridge Bank, \n\nThank you for your email and the update regarding your new CEO Tim Mayopoulos. We appreciate your dedication to keeping your clients and partners informed and we look forward to continuing our relationship with you. \n\nBest regards, \n[Your Name]", "message__permalink": "https://langchain.slack.com/archives/D04TKF5BBHU/p1678859968241629", "channel": "D04TKF5BBHU", "message__bot_profile__name":


"channel": "D04TKF5BBHU", "message__bot_profile__name": "Zapier", "message__team": "T04F8K3FZB5", "message__bot_id": "B04TRV4R74K", "message__bot_profile__deleted": "false", "message__bot_profile__app_id": "A024R9PQM", "ts_time": "2023-03-15T05:59:28Z", "message__blocks[]block_id": "p7i", "message__blocks[]elements[]elements[]type": "[['text']]", "message__blocks[]elements[]type": "['rich_text_section']"}        > Finished chain.    '{"message__text": "Dear Silicon Valley Bridge Bank, \\n\\nThank you for your email and the update regarding your new CEO Tim Mayopoulos. We appreciate your dedication to keeping your clients and partners informed and we look forward to continuing our relationship with you. \\n\\nBest regards, \\n[Your Name]", "message__permalink": "https://langchain.slack.com/archives/D04TKF5BBHU/p1678859968241629", "channel": "D04TKF5BBHU", "message__bot_profile__name": "Zapier", "message__team": "T04F8K3FZB5", "message__bot_id": "B04TRV4R74K", "message__bot_profile__deleted": "false", "message__bot_profile__app_id": "A024R9PQM", "ts_time": "2023-03-15T05:59:28Z", "message__blocks[]block_id": "p7i", "message__blocks[]elements[]elements[]type": "[[\'text\']]",


"message__blocks[]elements[]elements[]type": "[[\'text\']]", "message__blocks[]elements[]type": "[\'rich_text_section\']"}'Example Using OAuth Access Tokenâ€‹The below snippet shows how to initialize the wrapper with a procured OAuth access token. Note the argument being passed in as opposed to setting an environment variable. Review the authentication docs for full user-facing oauth developer support.The developer is tasked with handling the OAuth handshaking to procure and refresh the access token.llm = OpenAI(temperature=0)zapier = ZapierNLAWrapper(zapier_nla_oauth_access_token="<fill in access token here>")toolkit = ZapierToolkit.from_zapier_nla_wrapper(zapier)agent = initialize_agent(    toolkit.get_tools(), llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)agent.run(    "Summarize the last email I received regarding Silicon Valley Bank. Send the summary to the #test-zapier channel in slack.")PreviousYouTubeSearchToolNextVector storesExample with AgentExample with SimpleSequentialChainExample Using OAuth Access TokenCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Shell Tool | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsShell ToolOn this pageShell ToolGiving agents access to the shell is powerful (though risky outside a sandboxed environment).The LLM can use it to execute any shell commands. A common use case for this is letting the LLM interact with your local file system.from langchain.tools import ShellToolshell_tool = ShellTool()print(shell_tool.run({"commands": ["echo 'Hello World!'", "time"]}))    Hello World!        real    0m0.000s    user    0m0.000s    sys 0m0.000s        /Users/wfh/code/lc/lckg/langchain/tools/shell/tool.py:34: UserWarning: The shell tool has no safeguards by default. Use at your own risk.      warnings.warn(Use with Agentsâ€‹As with all tools, these can be given to an agent to accomplish more complex tasks. Let's have the agent


tools, these can be given to an agent to accomplish more complex tasks. Let's have the agent fetch some links from a web page.from langchain.chat_models import ChatOpenAIfrom langchain.agents import initialize_agentfrom langchain.agents import AgentTypellm = ChatOpenAI(temperature=0)shell_tool.description = shell_tool.description + f"args {shell_tool.args}".replace(    "{", "{{").replace("}", "}}")self_ask_with_search = initialize_agent(    [shell_tool], llm, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)self_ask_with_search.run(    "Download the langchain.com webpage and grep for all urls. Return only a sorted list of them. Be sure to use double quotes.")            > Entering new AgentExecutor chain...    Question: What is the task?    Thought: We need to download the langchain.com webpage and extract all the URLs from it. Then we need to sort the URLs and return them.    Action:    ```    {      "action": "shell",      "action_input": {        "commands": [          "curl -s https://langchain.com | grep -o 'http[s]*://[^\" ]*' | sort"        ]      }    }    ```    /Users/wfh/code/lc/lckg/langchain/tools/shell/tool.py:34: UserWarning: The shell tool has no safeguards by default. Use at your own risk.      warnings.warn(        Observation: https://blog.langchain.dev/


Observation: https://blog.langchain.dev/    https://discord.gg/6adMQxSpJS    https://docs.langchain.com/docs/    https://github.com/hwchase17/chat-langchain    https://github.com/hwchase17/langchain    https://github.com/hwchase17/langchainjs    https://github.com/sullivan-sean/chat-langchainjs    https://js.langchain.com/docs/    https://python.langchain.com/en/latest/    https://twitter.com/langchainai        Thought:The URLs have been successfully extracted and sorted. We can return the list of URLs as the final answer.    Final Answer: ["https://blog.langchain.dev/", "https://discord.gg/6adMQxSpJS", "https://docs.langchain.com/docs/", "https://github.com/hwchase17/chat-langchain", "https://github.com/hwchase17/langchain", "https://github.com/hwchase17/langchainjs", "https://github.com/sullivan-sean/chat-langchainjs", "https://js.langchain.com/docs/", "https://python.langchain.com/en/latest/", "https://twitter.com/langchainai"]        > Finished chain.    '["https://blog.langchain.dev/", "https://discord.gg/6adMQxSpJS", "https://docs.langchain.com/docs/", "https://github.com/hwchase17/chat-langchain", "https://github.com/hwchase17/langchain", "https://github.com/hwchase17/langchainjs", "https://github.com/sullivan-sean/chat-langchainjs", "https://js.langchain.com/docs/", "https://python.langchain.com/en/latest/",


"https://js.langchain.com/docs/", "https://python.langchain.com/en/latest/", "https://twitter.com/langchainai"]'PreviousawslambdaNextBing SearchUse with AgentsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


OpenWeatherMap API | ğŸ¦œï¸�ğŸ”— Langchain


Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsOpenWeatherMap APIOn this pageOpenWeatherMap APIThis notebook goes over how to use the OpenWeatherMap component to fetch weather information.First, you need to sign up for an OpenWeatherMap API key:Go to OpenWeatherMap and sign up for an API key herepip install pyowmThen we will need to set some environment variables:Save your API KEY into OPENWEATHERMAP_API_KEY env variableUse the wrapperâ€‹from langchain.utilities import OpenWeatherMapAPIWrapperimport osos.environ["OPENWEATHERMAP_API_KEY"] = ""weather = OpenWeatherMapAPIWrapper()weather_data = weather.run("London,GB")print(weather_data)    In London,GB, the current weather is as follows:    Detailed status: broken clouds    Wind speed: 2.57 m/s, direction: 240Â°    Humidity: 55%    Temperature:       - Current: 20.12Â°C      - High:


- Current: 20.12Â°C      - High: 21.75Â°C      - Low: 18.68Â°C      - Feels like: 19.62Â°C    Rain: {}    Heat index: None    Cloud cover: 75%Use the toolâ€‹from langchain.llms import OpenAIfrom langchain.agents import load_tools, initialize_agent, AgentTypeimport osos.environ["OPENAI_API_KEY"] = ""os.environ["OPENWEATHERMAP_API_KEY"] = ""llm = OpenAI(temperature=0)tools = load_tools(["openweathermap-api"], llm)agent_chain = initialize_agent(    tools=tools, llm=llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)agent_chain.run("What's the weather like in London?")            > Entering new AgentExecutor chain...     I need to find out the current weather in London.    Action: OpenWeatherMap    Action Input: London,GB    Observation: In London,GB, the current weather is as follows:    Detailed status: broken clouds    Wind speed: 2.57 m/s, direction: 240Â°    Humidity: 56%    Temperature:       - Current: 20.11Â°C      - High: 21.75Â°C      - Low: 18.68Â°C      - Feels like: 19.64Â°C    Rain: {}    Heat index: None    Cloud cover: 75%    Thought: I now know the current weather


Cloud cover: 75%    Thought: I now know the current weather in London.    Final Answer: The current weather in London is broken clouds, with a wind speed of 2.57 m/s, direction 240Â°, humidity of 56%, temperature of 20.11Â°C, high of 21.75Â°C, low of 18.68Â°C, and a heat index of None.        > Finished chain.    'The current weather in London is broken clouds, with a wind speed of 2.57 m/s, direction 240Â°, humidity of 56%, temperature of 20.11Â°C, high of 21.75Â°C, low of 18.68Â°C, and a heat index of None.'PreviousMetaphor SearchNextPubMed ToolUse the wrapperUse the toolCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.


Golden Query | ğŸ¦œï¸�ğŸ”— Langchain