Spaces:
Sleeping
Sleeping
Update travel.py
Browse files
travel.py
CHANGED
@@ -384,6 +384,26 @@ def get_user_input() -> dict:
|
|
384 |
"special_requirements": special_requirements
|
385 |
}
|
386 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
def generate_travel_itinerary(user_input: dict) -> str:
|
388 |
print("\nGenerating your personalized travel itinerary...\n")
|
389 |
|
|
|
384 |
"special_requirements": special_requirements
|
385 |
}
|
386 |
|
387 |
+
def update_llm(api_key: str):
|
388 |
+
global llm
|
389 |
+
llm = ChatGoogleGenerativeAI(model="gemini-2.0-pro-exp-02-05", google_api_key=api_key)
|
390 |
+
if destination_research_agent:
|
391 |
+
destination_research_agent.llm = llm
|
392 |
+
if accommodation_agent:
|
393 |
+
accommodation_agent.llm = llm
|
394 |
+
if transportation_agent:
|
395 |
+
transportation_agent.llm = llm
|
396 |
+
if activities_agent:
|
397 |
+
activities_agent.llm = llm
|
398 |
+
if dining_agent:
|
399 |
+
dining_agent.llm = llm
|
400 |
+
if itinerary_agent:
|
401 |
+
itinerary_agent.llm = llm
|
402 |
+
if chatbot_agent:
|
403 |
+
chatbot_agent.llm = llm
|
404 |
+
logging.info("LLM updated with new API key.")
|
405 |
+
|
406 |
+
|
407 |
def generate_travel_itinerary(user_input: dict) -> str:
|
408 |
print("\nGenerating your personalized travel itinerary...\n")
|
409 |
|