ABAO77 commited on
Commit
68e3556
·
verified ·
1 Parent(s): bec62f4

Upload 164 files

Browse files
src/langgraph/tools/__pycache__/plan_itinerary.cpython-311.pyc CHANGED
Binary files a/src/langgraph/tools/__pycache__/plan_itinerary.cpython-311.pyc and b/src/langgraph/tools/__pycache__/plan_itinerary.cpython-311.pyc differ
 
src/langgraph/tools/plan_itinerary.py CHANGED
@@ -1,6 +1,7 @@
1
  from langchain_core.tools import tool
2
 
3
  from langchain_core.runnables.config import RunnableConfig
 
4
  from src.langgraph.multi_agent.planner.planner_flow import planner_app
5
 
6
 
@@ -8,15 +9,15 @@ from src.langgraph.multi_agent.planner.planner_flow import planner_app
8
  async def plan_itinerary(
9
  duration: int,
10
  interests: str,
11
- include_destination: str,
12
  config: RunnableConfig,
13
  ):
14
  """Call to planner to make a travel itinerary for a period of time in Quy Nhon, Vietnam.
 
15
  Args:
16
  duration (int): number of travel
17
- interests (str): interests of the travel
18
- include_destination (str): include destination in the itinerary
19
- limit_interation (int): limit interation of the travel
20
  """
21
  # input_graph = {
22
  # "duration": duration,
@@ -32,9 +33,9 @@ async def plan_itinerary(
32
  # output = await planner_app.ainvoke(input_graph, config)
33
  # Use path parameters for cleaner URLs that won't break in chat interfaces
34
  # Remove spaces from parameters to ensure URL works correctly
35
- clean_interests = interests.replace(" ", "")
36
  clean_location = "QuyNhon,Vietnam" # Removing spaces in location
37
- clean_destination = include_destination.replace(" ", "")
38
 
39
  url = f"https://triventure.vercel.app/planner/{duration}/{clean_interests}/{clean_location}/{clean_destination}"
40
  return "Markdown string: " + f"[Vào đây để tạo kế hoạch]({url})"
 
1
  from langchain_core.tools import tool
2
 
3
  from langchain_core.runnables.config import RunnableConfig
4
+ from typing import Optional
5
  from src.langgraph.multi_agent.planner.planner_flow import planner_app
6
 
7
 
 
9
  async def plan_itinerary(
10
  duration: int,
11
  interests: str,
12
+ include_destination: Optional[str],
13
  config: RunnableConfig,
14
  ):
15
  """Call to planner to make a travel itinerary for a period of time in Quy Nhon, Vietnam.
16
+
17
  Args:
18
  duration (int): number of travel
19
+ interests (str): interests of the travel(natural, culture, etc.)
20
+ include_destination (Optional[str]): include destination in the itinerary
 
21
  """
22
  # input_graph = {
23
  # "duration": duration,
 
33
  # output = await planner_app.ainvoke(input_graph, config)
34
  # Use path parameters for cleaner URLs that won't break in chat interfaces
35
  # Remove spaces from parameters to ensure URL works correctly
36
+ clean_interests = interests.replace(" ", "") if interests else ","
37
  clean_location = "QuyNhon,Vietnam" # Removing spaces in location
38
+ clean_destination = include_destination.replace(" ", "") if include_destination else ","
39
 
40
  url = f"https://triventure.vercel.app/planner/{duration}/{clean_interests}/{clean_location}/{clean_destination}"
41
  return "Markdown string: " + f"[Vào đây để tạo kế hoạch]({url})"