-1

For example we have weather api, we have url https://weather.org/city=berlin and want to know weather news of 'berlin', so it hit the api, api has data like (Temperature: 14°C (57°F),Precipitation: 7% Humidity: 90%, Wind Speed: 11 km/h) and get result "Berlin is experiencing mild weather today with a current temperature of 14°C (57°F). The chance of precipitation is low at 7%, The humidity level is relatively high at 90%, so the air might feel a bit damp. It's a good idea to dress accordingly and stay hydrated. The wind is blowing at a gentle pace of 11 km/h, which should make for a comfortable outdoor experience."

I tried to implement jsonloader function of langchain library. but how can we switch city to city and get the result.

  • Please add more details, what you tried and what is the exact problem – ZKS Aug 31 '23 at 07:36
  • Assume we have an API for weather forecast which provides, weather information like temperature, wind speed, and humidity based on city. i have to create a prompt in which I get weather information of any city, like I ask "what is weather in Berlin" it can generate a weather news of Berlin, if I ask "which is more humid Berlin or London" prompt can compare both city data and generate result. I tried to resolve by using this article : https://python.langchain.com/docs/use_cases/apis In we have to upload whole documentation at once, but we have to get the result by apis json object. – ABHISHEK UMRAO Aug 31 '23 at 10:25

0 Answers0