|
219 | 219 | { |
220 | 220 | "data": { |
221 | 221 | "text/plain": [ |
222 | | - "Task(id_='25aa12c3-ae1a-415c-a186-102b4412c268', instruction='Add one to fifty-five point three. Use an appropriate tool!')" |
| 222 | + "Task(id_='38bb636c-3dd2-4916-a45f-f3fb2ada8bec', instruction='Add one to fifty-five point three. Use an appropriate tool!')" |
223 | 223 | ] |
224 | 224 | }, |
225 | 225 | "execution_count": 13, |
|
249 | 249 | "DEBUG (llm_agents_fs.TaskHandler) : 💬 ASSISTANT: \n", |
250 | 250 | "INFO (llm_agents_fs.TaskHandler) : 🛠️ Executing Tool Call: add_one\n", |
251 | 251 | "INFO (llm_agents_fs.TaskHandler) : ✅ Successful Tool Call: 56.3\n", |
252 | | - "INFO (llm_agents_fs.TaskHandler) : ✅ Step Result: The result of adding one to 55.3 is 56.3.\n", |
| 252 | + "INFO (llm_agents_fs.TaskHandler) : ✅ Step Result: The result of adding one to fifty-five point three is fifty-six point three.\n", |
253 | 253 | "DEBUG (llm_agents_fs.TaskHandler) : 🧵 Rollout: assistant: The current instruction is 'Add one to fifty-five point three. Use an appropriate tool!'\n", |
254 | 254 | "assistant: I need to make a tool call(s) to `add_one`.\n", |
255 | 255 | "tool: {\n", |
|
262 | 262 | " \"content\": \"56.3\",\n", |
263 | 263 | " \"error\": false\n", |
264 | 264 | "}\n", |
265 | | - "assistant: The result of adding one to 55.3 is 56.3.\n", |
| 265 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
266 | 266 | "DEBUG (llm_agents_fs.TaskHandler) : ---NEXT STEP PROMPT: You are overseeing an assistant's\n", |
267 | 267 | "progress in accomplishing a user instruction. Provided below is the assistant's\n", |
268 | 268 | "current response to the original task instruction. Also provided, is an\n", |
|
277 | 277 | "</user-instruction>\n", |
278 | 278 | "\n", |
279 | 279 | "<current-response>\n", |
280 | | - "The result of adding one to 55.3 is 56.3.\n", |
| 280 | + "The result of adding one to fifty-five point three is fifty-six point three.\n", |
281 | 281 | "</current-response>\n", |
282 | 282 | "\n", |
283 | 283 | "<thinking-process>\n", |
|
293 | 293 | " \"content\": \"56.3\",\n", |
294 | 294 | " \"error\": false\n", |
295 | 295 | "}\n", |
296 | | - "assistant: The result of adding one to 55.3 is 56.3.\n", |
| 296 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
297 | 297 | "</thinking-process>\n", |
298 | 298 | "\n", |
299 | | - "DEBUG (llm_agents_fs.TaskHandler) : ---NEXT STEP: {\"task_step\":{\"id_\":\"915cca85-0b6b-477d-921e-0dce7b8b3533\",\"task_id\":\"add-one-to-55-point-three\",\"instruction\":\"Add one to fifty-five point three using the tool add_one.\"},\"task_result\":{\"task_id\":\"add-one-to-55-point-three\",\"content\":\"The result of adding one to 55.3 is 56.3.\"}}\n", |
| 299 | + "DEBUG (llm_agents_fs.TaskHandler) : ---NEXT STEP: {\"kind\":\"next_step\",\"content\":\"I need to make a tool call to `add_one` with the number '55.3' as an argument.\"}\n", |
| 300 | + "INFO (llm_agents_fs.TaskHandler) : 🧠 New Step: I need to make a tool call to `add_one` with the number '55.3' as an argument.\n", |
| 301 | + "INFO (llm_agents_fs.TaskHandler) : ⚙️ Processing Step: I need to make a tool call to `add_one` with the number '55.3' as an argument.\n", |
| 302 | + "DEBUG (llm_agents_fs.TaskHandler) : 🧵 Rollout: assistant: The current instruction is 'Add one to fifty-five point three. Use an appropriate tool!'\n", |
| 303 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 304 | + "tool: {\n", |
| 305 | + " \"tool_call\": {\n", |
| 306 | + " \"tool_name\": \"add_one\",\n", |
| 307 | + " \"arguments\": {\n", |
| 308 | + " \"x\": \"55.3\"\n", |
| 309 | + " }\n", |
| 310 | + " },\n", |
| 311 | + " \"content\": \"56.3\",\n", |
| 312 | + " \"error\": false\n", |
| 313 | + "}\n", |
| 314 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 315 | + "DEBUG (llm_agents_fs.TaskHandler) : 💬 SYSTEM: You are a helpful assistant.\n", |
| 316 | + "\n", |
| 317 | + "Here is some past dialogue and context, where another assistant was working\n", |
| 318 | + "towards completing the task.\n", |
| 319 | + "\n", |
| 320 | + "<history>\n", |
| 321 | + "assistant: The current instruction is 'Add one to fifty-five point three. Use an appropriate tool!'\n", |
| 322 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 323 | + "tool: {\n", |
| 324 | + " \"tool_call\": {\n", |
| 325 | + " \"tool_name\": \"add_one\",\n", |
| 326 | + " \"arguments\": {\n", |
| 327 | + " \"x\": \"55.3\"\n", |
| 328 | + " }\n", |
| 329 | + " },\n", |
| 330 | + " \"content\": \"56.3\",\n", |
| 331 | + " \"error\": false\n", |
| 332 | + "}\n", |
| 333 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 334 | + "</history>\n", |
| 335 | + "\n", |
| 336 | + "DEBUG (llm_agents_fs.TaskHandler) : 💬 USER INPUT: I need to make a tool call to `add_one` with the number '55.3' as an argument.\n", |
| 337 | + "DEBUG (llm_agents_fs.TaskHandler) : 💬 ASSISTANT: \n", |
| 338 | + "INFO (llm_agents_fs.TaskHandler) : 🛠️ Executing Tool Call: add_one\n", |
| 339 | + "INFO (llm_agents_fs.TaskHandler) : ✅ Successful Tool Call: 56.3\n", |
| 340 | + "INFO (llm_agents_fs.TaskHandler) : ✅ Step Result: The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 341 | + "DEBUG (llm_agents_fs.TaskHandler) : 🧵 Rollout: assistant: The current instruction is 'Add one to fifty-five point three. Use an appropriate tool!'\n", |
| 342 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 343 | + "tool: {\n", |
| 344 | + " \"tool_call\": {\n", |
| 345 | + " \"tool_name\": \"add_one\",\n", |
| 346 | + " \"arguments\": {\n", |
| 347 | + " \"x\": \"55.3\"\n", |
| 348 | + " }\n", |
| 349 | + " },\n", |
| 350 | + " \"content\": \"56.3\",\n", |
| 351 | + " \"error\": false\n", |
| 352 | + "}\n", |
| 353 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.assistant: The current instruction is 'I need to make a tool call to `add_one` with the number '55.3' as an argument.'\n", |
| 354 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 355 | + "tool: {\n", |
| 356 | + " \"tool_call\": {\n", |
| 357 | + " \"tool_name\": \"add_one\",\n", |
| 358 | + " \"arguments\": {\n", |
| 359 | + " \"x\": \"55.3\"\n", |
| 360 | + " }\n", |
| 361 | + " },\n", |
| 362 | + " \"content\": \"56.3\",\n", |
| 363 | + " \"error\": false\n", |
| 364 | + "}\n", |
| 365 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 366 | + "DEBUG (llm_agents_fs.TaskHandler) : ---NEXT STEP PROMPT: You are overseeing an assistant's\n", |
| 367 | + "progress in accomplishing a user instruction. Provided below is the assistant's\n", |
| 368 | + "current response to the original task instruction. Also provided, is an\n", |
| 369 | + "internal 'thinking' process of the assistant that the user has not seen.\n", |
| 370 | + "\n", |
| 371 | + "Determine if the current the response is sufficient to answer the original task\n", |
| 372 | + "instruction. In the case that it is not, provide a new instruction to the\n", |
| 373 | + "assistant in order to help them improve upon their current response.\n", |
| 374 | + "\n", |
| 375 | + "<user-instruction>\n", |
| 376 | + "Add one to fifty-five point three. Use an appropriate tool!\n", |
| 377 | + "</user-instruction>\n", |
| 378 | + "\n", |
| 379 | + "<current-response>\n", |
| 380 | + "The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 381 | + "</current-response>\n", |
| 382 | + "\n", |
| 383 | + "<thinking-process>\n", |
| 384 | + "assistant: The current instruction is 'Add one to fifty-five point three. Use an appropriate tool!'\n", |
| 385 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 386 | + "tool: {\n", |
| 387 | + " \"tool_call\": {\n", |
| 388 | + " \"tool_name\": \"add_one\",\n", |
| 389 | + " \"arguments\": {\n", |
| 390 | + " \"x\": \"55.3\"\n", |
| 391 | + " }\n", |
| 392 | + " },\n", |
| 393 | + " \"content\": \"56.3\",\n", |
| 394 | + " \"error\": false\n", |
| 395 | + "}\n", |
| 396 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.assistant: The current instruction is 'I need to make a tool call to `add_one` with the number '55.3' as an argument.'\n", |
| 397 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 398 | + "tool: {\n", |
| 399 | + " \"tool_call\": {\n", |
| 400 | + " \"tool_name\": \"add_one\",\n", |
| 401 | + " \"arguments\": {\n", |
| 402 | + " \"x\": \"55.3\"\n", |
| 403 | + " }\n", |
| 404 | + " },\n", |
| 405 | + " \"content\": \"56.3\",\n", |
| 406 | + " \"error\": false\n", |
| 407 | + "}\n", |
| 408 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n", |
| 409 | + "</thinking-process>\n", |
| 410 | + "\n", |
| 411 | + "DEBUG (llm_agents_fs.TaskHandler) : ---NEXT STEP: {\"kind\":\"final_result\",\"content\":\"The result of adding one to fifty-five point three is fifty-six point three.\"}\n", |
300 | 412 | "INFO (llm_agents_fs.TaskHandler) : No new step required.\n", |
301 | | - "INFO (llm_agents_fs.LLMAgent) : 🏁 Task completed: The result of adding one to 55.3 is 56.3.\n" |
| 413 | + "INFO (llm_agents_fs.LLMAgent) : 🏁 Task completed: The result of adding one to fifty-five point three is fifty-six point three.\n" |
302 | 414 | ] |
| 415 | + }, |
| 416 | + { |
| 417 | + "data": { |
| 418 | + "text/plain": [ |
| 419 | + "TaskResult(task_id='38bb636c-3dd2-4916-a45f-f3fb2ada8bec', content='The result of adding one to fifty-five point three is fifty-six point three.')" |
| 420 | + ] |
| 421 | + }, |
| 422 | + "execution_count": 14, |
| 423 | + "metadata": {}, |
| 424 | + "output_type": "execute_result" |
303 | 425 | } |
304 | 426 | ], |
305 | 427 | "source": [ |
306 | | - "result = await agent.run(task)" |
| 428 | + "handler = agent.run(task)\n", |
| 429 | + "await handler" |
307 | 430 | ] |
308 | 431 | }, |
309 | 432 | { |
|
315 | 438 | { |
316 | 439 | "data": { |
317 | 440 | "text/plain": [ |
318 | | - "TaskResult(task_id='25aa12c3-ae1a-415c-a186-102b4412c268', content='The result of adding one to 55.3 is 56.3.')" |
| 441 | + "TaskResult(task_id='38bb636c-3dd2-4916-a45f-f3fb2ada8bec', content='The result of adding one to fifty-five point three is fifty-six point three.')" |
319 | 442 | ] |
320 | 443 | }, |
321 | 444 | "execution_count": 15, |
|
324 | 447 | } |
325 | 448 | ], |
326 | 449 | "source": [ |
327 | | - "result.task_result" |
| 450 | + "result = handler.result()\n", |
| 451 | + "result" |
328 | 452 | ] |
329 | 453 | }, |
330 | 454 | { |
|
337 | 461 | "name": "stdout", |
338 | 462 | "output_type": "stream", |
339 | 463 | "text": [ |
340 | | - "The result of adding one to 55.3 is 56.3.\n" |
| 464 | + "The result of adding one to fifty-five point three is fifty-six point three.\n" |
341 | 465 | ] |
342 | 466 | } |
343 | 467 | ], |
344 | 468 | "source": [ |
345 | | - "print(result.task_result)" |
| 469 | + "print(result)" |
346 | 470 | ] |
347 | 471 | }, |
348 | 472 | { |
|
367 | 491 | " \"content\": \"56.3\",\n", |
368 | 492 | " \"error\": false\n", |
369 | 493 | "}\n", |
370 | | - "assistant: The result of adding one to 55.3 is 56.3.\n" |
| 494 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.assistant: The current instruction is 'I need to make a tool call to `add_one` with the number '55.3' as an argument.'\n", |
| 495 | + "assistant: I need to make a tool call(s) to `add_one`.\n", |
| 496 | + "tool: {\n", |
| 497 | + " \"tool_call\": {\n", |
| 498 | + " \"tool_name\": \"add_one\",\n", |
| 499 | + " \"arguments\": {\n", |
| 500 | + " \"x\": \"55.3\"\n", |
| 501 | + " }\n", |
| 502 | + " },\n", |
| 503 | + " \"content\": \"56.3\",\n", |
| 504 | + " \"error\": false\n", |
| 505 | + "}\n", |
| 506 | + "assistant: The result of adding one to fifty-five point three is fifty-six point three.\n" |
371 | 507 | ] |
372 | 508 | } |
373 | 509 | ], |
374 | 510 | "source": [ |
375 | | - "print(result.rollout)" |
| 511 | + "print(handler.rollout)" |
376 | 512 | ] |
377 | 513 | } |
378 | 514 | ], |
|
0 commit comments