sasan commited on
Commit
e0e3529
·
1 Parent(s): 8062dc6

chore: Update points of interest search results formatting

Browse files
kitt/core/model.py CHANGED
@@ -103,6 +103,7 @@ When using tools, ensure to only use the tools provided and not make up any data
103
 
104
  When asked for the weather or points of interest, use the appropriate tool with the current location from <car_status>. If user provides a location, use that location.
105
  Always assume user wants to travel by car.
 
106
 
107
  Schema:
108
  Use the following pydantic model json schema for each tool call you will make:
 
103
 
104
  When asked for the weather or points of interest, use the appropriate tool with the current location from <car_status>. If user provides a location, use that location.
105
  Always assume user wants to travel by car.
106
+ Related to points of interests, do not provide any more information to the user other than their name and their distance from the current location. Do provide more information only if the user asks for it.
107
 
108
  Schema:
109
  Use the following pydantic model json schema for each tool call you will make:
kitt/skills/poi.py CHANGED
@@ -78,7 +78,8 @@ def search_points_of_interest(search_query: str = "french restaurant"):
78
  output = (
79
  f"There are {len(results)} options in the vicinity. The most relevant are: "
80
  )
81
- return output + ".\n ".join(formatted_results), [x["poi"] for x in results[:3]]
 
82
 
83
 
84
  def find_points_of_interest(lat="0", lon="0", type_of_poi="restaurant"):
 
78
  output = (
79
  f"There are {len(results)} options in the vicinity. The most relevant are: "
80
  )
81
+ extra_info = [x["poi"] for x in results[:3]]
82
+ return output + ".\n ".join(formatted_results)
83
 
84
 
85
  def find_points_of_interest(lat="0", lon="0", type_of_poi="restaurant"):
kitt/skills/weather.py CHANGED
@@ -67,7 +67,7 @@ def get_weather(location: str = "here"):
67
  # Formulate the sentences - {region}, {country}
68
  weather_sentences = (
69
  f"The current weather in {location} is {condition_text} "
70
- f"with a temperature of {temperature_c}°C that feels like {feelslike_c}°C. "
71
  # f"Humidity is at {humidity}%. "
72
  # f"Wind speed is {wind_kph} kph." if 'wind_kph' in weather_data['current'] else ""
73
  )
@@ -129,7 +129,7 @@ def get_forecast(city_name: str = "", when=0, **kwargs):
129
  number_str = f"in {when-1} days"
130
 
131
  # Generate a sentence for the day's forecast
132
- forecast_sentence = f"On {date} ({number_str}) in {city_name}, the weather will be {conditions} with a high of {max_temp_c}C and a low of {min_temp_c}C. There's a {chance_of_rain}% chance of rain. "
133
 
134
  # number = number + 1
135
  # Add the sentence to the result
 
67
  # Formulate the sentences - {region}, {country}
68
  weather_sentences = (
69
  f"The current weather in {location} is {condition_text} "
70
+ f"with a temperature of {temperature_c} C that feels like {feelslike_c} C. "
71
  # f"Humidity is at {humidity}%. "
72
  # f"Wind speed is {wind_kph} kph." if 'wind_kph' in weather_data['current'] else ""
73
  )
 
129
  number_str = f"in {when-1} days"
130
 
131
  # Generate a sentence for the day's forecast
132
+ forecast_sentence = f"On {date} ({number_str}) in {city_name}, the weather will be {conditions} with a high of {max_temp_c} C and a low of {min_temp_c} C. There's a {chance_of_rain}% chance of rain. "
133
 
134
  # number = number + 1
135
  # Add the sentence to the result