Improve passing user name in pick next research tool prompt

This commit is contained in:
Debanjum 2024-10-28 20:29:47 -07:00
parent deff512baa
commit a39e747d07
2 changed files with 2 additions and 3 deletions

View file

@ -663,7 +663,7 @@ Assuming you can search my notes and the internet.
# Background Context # Background Context
- Current Date: {day_of_week}, {current_date} - Current Date: {day_of_week}, {current_date}
- My Location: {location} - My Location: {location}
- My {username} - My Name: {username}
# Available Tool AIs # Available Tool AIs
Which of the tool AIs listed below would you use to answer my question? You **only** have access to the following tool AIs: Which of the tool AIs listed below would you use to answer my question? You **only** have access to the following tool AIs:

View file

@ -74,7 +74,6 @@ async def apick_next_tool(
# Extract Past User Message and Inferred Questions from Conversation Log # Extract Past User Message and Inferred Questions from Conversation Log
today = datetime.today() today = datetime.today()
location_data = f"{location}" if location else "Unknown" location_data = f"{location}" if location else "Unknown"
username = prompts.user_name.format(name=user_name) if user_name else ""
function_planning_prompt = prompts.plan_function_execution.format( function_planning_prompt = prompts.plan_function_execution.format(
tools=tool_options_str, tools=tool_options_str,
@ -82,7 +81,7 @@ async def apick_next_tool(
personality_context=personality_context, personality_context=personality_context,
current_date=today.strftime("%Y-%m-%d"), current_date=today.strftime("%Y-%m-%d"),
day_of_week=today.strftime("%A"), day_of_week=today.strftime("%A"),
username=username, username=user_name or "Unknown",
location=location_data, location=location_data,
previous_iterations=previous_iterations_history, previous_iterations=previous_iterations_history,
max_iterations=max_iterations, max_iterations=max_iterations,