Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions examples/ch03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"response=\"Sure! Here's one for you:\\n\\nWhy don't scientists trust atoms?\\n\\nBecause they make up everything!\" prompt='Tell me a joke.'\n"
"response='Sure! Here\\'s one for you:\\n\\nWhy don\\'t scientists trust atoms?\\n\\nBecause they make up everything!\\n\\nThis is a play on the phrase \"they make up matter,\" and in this case, it makes no sense because we can\\'t blame or rely on atoms to do things as humans would.' prompt='Tell me a joke.'\n"
]
}
],
Expand Down Expand Up @@ -180,7 +180,7 @@
"output_type": "stream",
"text": [
"Joke\n",
"subject='biology' joke='Why did the tomato turn red? Because it saw the salad dressing!'\n"
"subject='math' joke='Why was the math book sad? Because it had too many problems.'\n"
]
}
],
Expand Down Expand Up @@ -235,7 +235,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[ToolCall(id_='d3a4bd11-7ec1-49c9-b715-c93e2e7ca068', tool_name='hailstone_step_func', arguments={'x': 3})]\n"
"[ToolCall(id_='96efe041-50ff-45f0-867b-8e493901a28f', tool_name='hailstone_step_func', arguments={'x': 3})]\n"
]
}
],
Expand All @@ -251,7 +251,8 @@
"async def main():\n",
" user_input = (\n",
" \"What is the result of taking the next step of the \"\n",
" \"Hailstone sequence on the number 3?\"\n",
" \"Hailstone sequence on the number 3?\\n\\n\"\n",
" \"Be very succinct in your response.\"\n",
" )\n",
" return await llm.chat(\n",
" user_input,\n",
Expand Down Expand Up @@ -280,7 +281,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"tool_call_id='d3a4bd11-7ec1-49c9-b715-c93e2e7ca068' content='10' error=False\n"
"tool_call_id='96efe041-50ff-45f0-867b-8e493901a28f' content='10' error=False\n"
]
}
],
Expand Down Expand Up @@ -308,7 +309,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"role=<ChatRole.ASSISTANT: 'assistant'> content='The result of taking the next step in the Hailstone sequence for the number 3 is 10. In the Hailstone sequence, if the number is even, you divide it by 2; if the number is odd, you multiply it by 3 and add 1. So starting with 3 (an odd number), we perform \\\\(3 \\\\times 3 + 1 = 10\\\\).' tool_calls=None\n"
"role=<ChatRole.ASSISTANT: 'assistant'> content='The result of taking the next step in the Hailstone sequence on the number 3 is 10.' tool_calls=None\n"
]
}
],
Expand Down