|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
| 15 | +import json |
15 | 16 | from dataclasses import dataclass, field |
16 | 17 |
|
17 | 18 | from datasets import Dataset |
@@ -212,14 +213,14 @@ def get_wind_conditions(city: str, unit: str) -> tuple[int, str]: |
212 | 213 | ] |
213 | 214 | ], |
214 | 215 | "tools": [ |
215 | | - [start_timer, create_reminder], |
216 | | - [get_current_time], |
217 | | - [get_air_quality_index, get_weather_forecast, get_wind_conditions], |
218 | | - [play_music, control_light], |
219 | | - [get_weather_forecast, get_wind_conditions], |
220 | | - [control_light], |
221 | | - [start_timer, create_reminder], |
222 | | - [get_weather_forecast, get_wind_conditions], |
| 216 | + json.dumps([start_timer, create_reminder]), |
| 217 | + json.dumps([get_current_time]), |
| 218 | + json.dumps([get_air_quality_index, get_weather_forecast, get_wind_conditions]), |
| 219 | + json.dumps([play_music, control_light]), |
| 220 | + json.dumps([get_weather_forecast, get_wind_conditions]), |
| 221 | + json.dumps([control_light]), |
| 222 | + json.dumps([start_timer, create_reminder]), |
| 223 | + json.dumps([get_weather_forecast, get_wind_conditions]), |
223 | 224 | ] |
224 | 225 | }) |
225 | 226 | language_modeling_dataset = language_modeling_dataset.train_test_split(test_size=test_size, shuffle=False) |
@@ -318,14 +319,14 @@ def get_wind_conditions(city: str, unit: str) -> tuple[int, str]: |
318 | 319 | ], |
319 | 320 | ], |
320 | 321 | "tools": [ |
321 | | - [start_timer], |
322 | | - [get_current_time], |
323 | | - [get_air_quality_index], |
324 | | - [play_music], |
325 | | - [get_weather_forecast], |
326 | | - [control_light], |
327 | | - [create_reminder], |
328 | | - [get_wind_conditions], |
| 322 | + json.dumps([start_timer]), |
| 323 | + json.dumps([get_current_time]), |
| 324 | + json.dumps([get_air_quality_index]), |
| 325 | + json.dumps([play_music]), |
| 326 | + json.dumps([get_weather_forecast]), |
| 327 | + json.dumps([control_light]), |
| 328 | + json.dumps([create_reminder]), |
| 329 | + json.dumps([get_wind_conditions]), |
329 | 330 | ], |
330 | 331 | }) |
331 | 332 | preference_dataset = preference_dataset.train_test_split(test_size=test_size, shuffle=False) |
|
0 commit comments