|
15 | 15 | "- Retrieve and process file content \n",
|
16 | 16 | "- Determine the next steps for resolution and post them as a comment \n",
|
17 | 17 | "\n",
|
18 |
| - "For this, we'll use the new experimental [Agent](https://github.com/deepset-ai/haystack-experimental/blob/main/haystack_experimental/components/agents/agent.py) component. **`Agent`** is a Haystack component that implements a tool-calling functionality with provider-agnostic chat model support. We can use `Agent` either as a standalone component or within a pipeline.\n", |
| 18 | + "For this, we'll use the new [Agent](https://docs.haystack.deepset.ai/docs/agent) component. **`Agent`** is a Haystack component that implements a tool-calling functionality with provider-agnostic chat model support. We can use `Agent` either as a standalone component or within a pipeline.\n", |
19 | 19 | "\n",
|
20 | 20 | "Here's what our **Github Issue Resolver Pipeline** looks like:"
|
21 | 21 | ]
|
|
40 | 40 | },
|
41 | 41 | {
|
42 | 42 | "cell_type": "code",
|
43 |
| - "execution_count": 1, |
| 43 | + "execution_count": null, |
44 | 44 | "metadata": {
|
45 | 45 | "colab": {
|
46 | 46 | "base_uri": "https://localhost:8080/"
|
47 | 47 | },
|
48 | 48 | "id": "8jbGvWWa_ARY",
|
49 | 49 | "outputId": "c38564d6-8da1-4285-b6c7-53e00e1027c4"
|
50 | 50 | },
|
51 |
| - "outputs": [ |
52 |
| - { |
53 |
| - "name": "stdout", |
54 |
| - "output_type": "stream", |
55 |
| - "text": [ |
56 |
| - "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/440.2 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m440.2/440.2 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", |
57 |
| - "\u001b[?25h\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/239.5 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m239.5/239.5 kB\u001b[0m \u001b[31m11.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", |
58 |
| - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.0/72.0 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", |
59 |
| - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m126.5/126.5 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", |
60 |
| - "\u001b[?25h" |
61 |
| - ] |
62 |
| - } |
63 |
| - ], |
| 51 | + "outputs": [], |
64 | 52 | "source": [
|
65 | 53 | "!pip install anthropic-haystack -q"
|
66 | 54 | ]
|
|
77 | 65 | "from getpass import getpass\n",
|
78 | 66 | "from typing import List\n",
|
79 | 67 | "\n",
|
80 |
| - "# Standard Haystack imports\n", |
81 | 68 | "from haystack import Pipeline\n",
|
| 69 | + "from haystack.components.agents import Agent\n", |
82 | 70 | "from haystack.components.builders import ChatPromptBuilder\n",
|
83 | 71 | "from haystack.dataclasses import ChatMessage, Document\n",
|
84 |
| - "from haystack_integrations.components.generators.anthropic.chat.chat_generator import AnthropicChatGenerator\n", |
85 |
| - "\n", |
86 |
| - "# Experimental imports needed for our Agent\n", |
87 |
| - "from haystack_experimental.components.agents import Agent\n", |
88 |
| - "from haystack_experimental.tools.component_tool import ComponentTool\n", |
89 |
| - "from haystack_experimental.tools.from_function import tool" |
| 72 | + "from haystack.tools.component_tool import ComponentTool\n", |
| 73 | + "from haystack.tools.from_function import tool\n", |
| 74 | + "from haystack_integrations.components.generators.anthropic.chat.chat_generator import AnthropicChatGenerator" |
90 | 75 | ]
|
91 | 76 | },
|
92 | 77 | {
|
|
364 | 349 | "source": [
|
365 | 350 | "## Create a \"GithubRepositoryViewer\" Tool\n",
|
366 | 351 | "\n",
|
367 |
| - "We'll create a custom `GithubRepositoryViewer` component for our agent and convert it into a tool using the experimental [`ComponentTool`](https://github.com/deepset-ai/haystack-experimental/blob/main/haystack_experimental/tools/component_tool.py).\n", |
| 352 | + "We'll create a custom `GithubRepositoryViewer` component for our agent and convert it into a tool using the [`ComponentTool`](https://docs.haystack.deepset.ai/docs/componenttool).\n", |
368 | 353 | "\n",
|
369 | 354 | "### Custom `GithubRepositoryViewer` Component\n",
|
370 | 355 | "\n",
|
|
0 commit comments