LangChain is a framework designed to build applications powered by language models. It provides tools and abstractions to interact with LLMs (Large Language Models) and external APIs, enabling the creation of dynamic and context-aware applications (took this from internet)
To build the travel planner, I created several custom tools using LangChain’s Tool class. These tools are designed to handle specific aspects of travel planning, such as cost breakdowns, timing, and travel conditions.
search_serp = Tool(
name="search",
func=search.run,
description="useful for when you need to answer questions about current events. Use searching when Cost breakdown is required. Use this when time of travel is required. Ask targeted and specific questions!",
)
search_serp_costing = Tool(
name="search_serp_costing",
func=search.run,
description="Use this when you are asked to calculate travel costs. Make sure to get the accurate costs by doing precise searches. You have to calculate the cost per person as there can be many people in the group. These components contribute to cost: 1. Transportation 2. Visiting ticket fee 3. Fooding 4. Recreational/Luxury costs etc. Be accurate and precise in your web searching questions!",
)
search_serp_timing = Tool(
name="search_serp_timing",
func=search.run,
description="Use this when you are asked to calculate travel timing. Make sure to get the accurate times for each possible location-to-location travel and then return the total of all times. Be accurate and precise in your web searching questions!",
)