|
319 | 319 | "## Configure the agent\n",
|
320 | 320 | "This step configures agent planning, which includes how the agent handles tool execution and responses. After configuring the LLM, you define the following functions:\n",
|
321 | 321 | "- `tool_selector`: Uses the LLM to determine the best tool based on the user's input.\n",
|
| 322 | + "- `get_llm_response`: Helper function for LLM response generation.\n", |
322 | 323 | "- `generate_answer`: Orchestrates the agent workflow for a task."
|
323 | 324 | ]
|
324 | 325 | },
|
|
498 | 499 | },
|
499 | 500 | {
|
500 | 501 | "cell_type": "code",
|
501 |
| - "execution_count": 16, |
| 502 | + "execution_count": null, |
502 | 503 | "metadata": {},
|
503 | 504 | "outputs": [
|
504 | 505 | {
|
|
516 | 517 | ],
|
517 | 518 | "source": [
|
518 | 519 | "message_1 = generate_response(\n",
|
519 |
| - " session_id=\"1234\",\n", |
| 520 | + " session_id=\"123\",\n", |
520 | 521 | " user_input=\"What was MongoDB's latest acquisition?\",\n",
|
521 | 522 | ")\n",
|
522 | 523 | "print(message_1)\n",
|
523 | 524 | "\n",
|
524 | 525 | "message_2 = generate_response(\n",
|
525 |
| - " session_id=\"1234\",\n", |
| 526 | + " session_id=\"123\",\n", |
526 | 527 | " user_input=\"What do they do?\",\n",
|
527 | 528 | ")\n",
|
528 | 529 | "print(message_2)\n",
|
529 | 530 | "\n",
|
530 | 531 | "message_3 = generate_response(\n",
|
531 |
| - " session_id=\"1234\",\n", |
| 532 | + " session_id=\"123\",\n", |
532 | 533 | " user_input=\"What's 15*25?\",\n",
|
533 | 534 | ")\n",
|
534 | 535 | "print(message_3)"
|
|
0 commit comments