Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAlpha VantageApifyArXivAWS LambdaShell (bash)Bearly Code InterpreterBing SearchBrave SearchChatGPT PluginsDall-E Image GeneratorDataForSeoDuckDuckGo SearchEden AIEleven Labs Text2SpeechFile SystemGolden QueryGoogle DriveGoogle PlacesGoogle SearchGoogle SerperGradioGraphQLHuggingFace Hub ToolsHuman as a toolIFTTT WebHooksLemon AgentMetaphor SearchNuclia UnderstandingOpenWeatherMapPubMedRequestsSceneXplainSearch ToolsSearchApiSearxNG SearchSerpAPITwilioWikipediaWolfram AlphaYahoo Finance NewsYouTubeZapier Natural Language ActionsAgents and toolkitsMemoryCallbacksChat loadersComponentsToolsOpenWeatherMapOn this pageOpenWeatherMapThis 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: 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 =
This notebook goes over how to use the OpenWeatherMap component to fetch weather information.
This notebook goes over how to use the OpenWeatherMap component to fetch weather information. ->: Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAlpha VantageApifyArXivAWS LambdaShell (bash)Bearly Code InterpreterBing SearchBrave SearchChatGPT PluginsDall-E Image GeneratorDataForSeoDuckDuckGo SearchEden AIEleven Labs Text2SpeechFile SystemGolden QueryGoogle DriveGoogle PlacesGoogle SearchGoogle SerperGradioGraphQLHuggingFace Hub ToolsHuman as a toolIFTTT WebHooksLemon AgentMetaphor SearchNuclia UnderstandingOpenWeatherMapPubMedRequestsSceneXplainSearch ToolsSearchApiSearxNG SearchSerpAPITwilioWikipediaWolfram AlphaYahoo Finance NewsYouTubeZapier Natural Language ActionsAgents and toolkitsMemoryCallbacksChat loadersComponentsToolsOpenWeatherMapOn this pageOpenWeatherMapThis 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: 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 =