From 1da101d80d442282bdd2e37c903049b12dc615be Mon Sep 17 00:00:00 2001 From: Howard Gil Date: Wed, 4 Sep 2024 15:08:00 -0700 Subject: [PATCH] Fixed broken image urls --- examples/anthropic/anthropic_example.ipynb | 161 ++---------------- examples/autogen/AgentChat.ipynb | 29 +--- examples/autogen/MathAgent.ipynb | 2 +- examples/multion/Sample_browsing_agent.ipynb | 17 +- .../multion/Step_by_step_web_browsing.ipynb | 10 -- examples/multion/Webpage_data_retrieval.ipynb | 7 +- 6 files changed, 25 insertions(+), 201 deletions(-) diff --git a/examples/anthropic/anthropic_example.ipynb b/examples/anthropic/anthropic_example.ipynb index 60684140a..1c2cce8a5 100644 --- a/examples/anthropic/anthropic_example.ipynb +++ b/examples/anthropic/anthropic_example.ipynb @@ -16,58 +16,9 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: anthropic in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (0.34.2)\n", - "Requirement already satisfied: anyio<5,>=3.5.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (4.4.0)\n", - "Requirement already satisfied: distro<2,>=1.7.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (1.9.0)\n", - "Requirement already satisfied: httpx<1,>=0.23.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (0.27.0)\n", - "Requirement already satisfied: jiter<1,>=0.4.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (0.5.0)\n", - "Requirement already satisfied: pydantic<3,>=1.9.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (2.8.2)\n", - "Requirement already satisfied: sniffio in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (1.3.1)\n", - "Requirement already satisfied: tokenizers>=0.13.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (0.20.0)\n", - "Requirement already satisfied: typing-extensions<5,>=4.7 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anthropic) (4.12.2)\n", - "Requirement already satisfied: idna>=2.8 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from anyio<5,>=3.5.0->anthropic) (3.7)\n", - "Requirement already satisfied: certifi in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from httpx<1,>=0.23.0->anthropic) (2024.7.4)\n", - "Requirement already satisfied: httpcore==1.* in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from httpx<1,>=0.23.0->anthropic) (1.0.5)\n", - "Requirement already satisfied: h11<0.15,>=0.13 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->anthropic) (0.14.0)\n", - "Requirement already satisfied: annotated-types>=0.4.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from pydantic<3,>=1.9.0->anthropic) (0.7.0)\n", - "Requirement already satisfied: pydantic-core==2.20.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from pydantic<3,>=1.9.0->anthropic) (2.20.1)\n", - "Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from tokenizers>=0.13.0->anthropic) (0.24.6)\n", - "Requirement already satisfied: filelock in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (3.15.4)\n", - "Requirement already satisfied: fsspec>=2023.5.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (2024.9.0)\n", - "Requirement already satisfied: packaging>=20.9 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (23.2)\n", - "Requirement already satisfied: pyyaml>=5.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (6.0.1)\n", - "Requirement already satisfied: requests in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (2.31.0)\n", - "Requirement already satisfied: tqdm>=4.42.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (4.66.5)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests->huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (3.3.2)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests->huggingface-hub<1.0,>=0.16.4->tokenizers>=0.13.0->anthropic) (2.2.2)\n", - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.0\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.2\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", - "Note: you may need to restart the kernel to use updated packages.\n", - "Requirement already satisfied: agentops in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (0.3.10)\n", - "Requirement already satisfied: requests==2.31.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from agentops) (2.31.0)\n", - "Requirement already satisfied: psutil==5.9.8 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from agentops) (5.9.8)\n", - "Requirement already satisfied: packaging==23.2 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from agentops) (23.2)\n", - "Requirement already satisfied: termcolor==2.4.0 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from agentops) (2.4.0)\n", - "Requirement already satisfied: PyYAML==6.0.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from agentops) (6.0.1)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests==2.31.0->agentops) (3.3.2)\n", - "Requirement already satisfied: idna<4,>=2.5 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests==2.31.0->agentops) (3.7)\n", - "Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests==2.31.0->agentops) (2.2.2)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /Users/howardgil/Desktop/agentops/AgentOps-AI/agentops/env/lib/python3.12/site-packages (from requests==2.31.0->agentops) (2024.7.4)\n", - "\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.0\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.2\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "outputs": [], "source": [ "%pip install -U anthropic\n", "%pip install -U agentops" @@ -82,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -101,7 +52,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -112,27 +63,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=9b32cad5-1899-4cd8-bb3a-11edc0888132\u001b[0m\u001b[0m\n" - ] - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "agentops.init(AGENTOPS_API_KEY, default_tags=[\"anthropic-example\"])" ] @@ -147,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -156,19 +89,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2+2 = 4\n", - "\n", - "This is one of the most basic addition problems. It's often used as an example when teaching young children basic arithmetic.\n" - ] - } - ], + "outputs": [], "source": [ "stream = client.messages.create(\n", " max_tokens=1024,\n", @@ -200,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -209,44 +132,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "I apologize, but there seems to be some confusion here. There isn't a single, widely recognized equation in mathematics or physics known specifically as \"the Leibniz Equation.\" Gottfried Wilhelm Leibniz was a prominent mathematician and philosopher who made significant contributions to various fields, including calculus, but there isn't one equation that bears his name exclusively.\n", - "\n", - "However, Leibniz is associated with several important mathematical concepts and notations. Here are some key areas where Leibniz made significant contributions:\n", - "\n", - "1. Differential and Integral Calculus:\n", - " Leibniz developed notation for calculus that is still widely used today. For example:\n", - " - dy/dx for the derivative\n", - " - ∫ for the integral sign\n", - "\n", - "2. Leibniz's Rule:\n", - " This rule is used for differentiating under the integral sign. It's sometimes called the \"Leibniz integral rule.\"\n", - "\n", - "3. Leibniz Formula for π:\n", - " A series representation of π/4 = 1 - 1/3 + 1/5 - 1/7 + ...\n", - "\n", - "4. Product Rule:\n", - " While not exclusively attributed to Leibniz, he contributed to the development of the product rule in calculus.\n", - "\n", - "5. Chain Rule:\n", - " Again, while not solely his work, Leibniz contributed to the development of the chain rule.\n", - "\n", - "6. Leibniz's Notation for Differentials:\n", - " d(xy) = xdy + ydx\n", - "\n", - "7. Principle of Sufficient Reason:\n", - " While this is more of a philosophical principle than an equation, it states that for every fact, there must be an explanation of why it is so and not otherwise.\n", - "\n", - "If you're referring to a specific equation or concept related to Leibniz, it would be helpful to provide more context or details about the particular area of study or application you're interested in. This would allow for a more accurate and targeted explanation.\n" - ] - } - ], + "outputs": [], "source": [ "async def main() -> None:\n", " message = await aclient.messages.create(\n", @@ -275,17 +163,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - } - ], + "outputs": [], "source": [ "stream = client.messages.create(\n", " max_tokens=1024,\n", @@ -323,18 +203,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: This run's cost $0.00\n", - "🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=9b32cad5-1899-4cd8-bb3a-11edc0888132\u001b[0m\u001b[0m\n" - ] - } - ], + "outputs": [], "source": [ "agentops.end_session(\"Success\")" ] diff --git a/examples/autogen/AgentChat.ipynb b/examples/autogen/AgentChat.ipynb index 4a8350091..9b8af00ed 100644 --- a/examples/autogen/AgentChat.ipynb +++ b/examples/autogen/AgentChat.ipynb @@ -7,7 +7,7 @@ "metadata": {}, "source": [ "# Adding AgentOps to an existing Autogen service\n", - "\n", + "\n", "\n", "To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n", "\n", @@ -105,33 +105,10 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "2962d990-f7ef-43d8-ba09-d29bd8356d9f", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[31m\n", - ">>>>>>>> NO HUMAN INPUT RECEIVED.\u001b[0m\n", - "\u001b[31m\n", - ">>>>>>>> USING AUTO REPLY...\u001b[0m\n", - "\u001b[33muser\u001b[0m (to agent):\n", - "\n", - "\n", - "\n", - "--------------------------------------------------------------------------------\n", - "\u001b[31m\n", - ">>>>>>>> USING AUTO REPLY...\u001b[0m\n", - "\u001b[33magent\u001b[0m (to user):\n", - "\n", - "It seems there might still be an issue. If you need assistance or have questions later on, don't hesitate to reach out. I'm here to help whenever you're ready!\n", - "\n", - "--------------------------------------------------------------------------------\n" - ] - } - ], + "outputs": [], "source": [ "# Define model, openai api key, tags, etc in the agent configuration\n", "config_list = [\n", diff --git a/examples/autogen/MathAgent.ipynb b/examples/autogen/MathAgent.ipynb index c0e0c99d8..00b247c8e 100644 --- a/examples/autogen/MathAgent.ipynb +++ b/examples/autogen/MathAgent.ipynb @@ -7,7 +7,7 @@ "metadata": {}, "source": [ "# Adding AgentOps to an existing Autogen service\n", - "\n", + "\n", "\n", "To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n", "\n", diff --git a/examples/multion/Sample_browsing_agent.ipynb b/examples/multion/Sample_browsing_agent.ipynb index 9a75ff10b..7c3a68d03 100644 --- a/examples/multion/Sample_browsing_agent.ipynb +++ b/examples/multion/Sample_browsing_agent.ipynb @@ -9,9 +9,6 @@ " \n", "Agents using MultiOn can launch and control remote or local web browsers to perform actions and retrieve context using natural language commands. With AgentOps, MultiOn evens such as browse, retrieve, and step are automatically tracked.\n", "\n", - "\n", - "![AgentOps MultiOn Browse](https://github.com/AgentOps-AI/agentops/blob/main/docs/images/agentops-multion-browse.gif?raw=true)\n", - "\n", "Furthermore, events and LLM calls in your Python program will be tracked as well." ] }, @@ -74,16 +71,6 @@ "OPENAI_API_KEY = os.getenv(\"OPENAI_API_KEY\") or \"\"" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check your session\n", - "Check your session on [AgentOps](https://app.agentops.ai). This session should include the MultiOn browse action and the OpenAI call.\n", - "\n", - "![image.png](attachment:image.png)" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -176,7 +163,9 @@ "metadata": {}, "source": [ "## Check your session\n", - "Check your session on [AgentOps](https://app.agentops.ai). This session should include the MultiOn browse action and the OpenAI call." + "Check your session on [AgentOps](https://app.agentops.ai). This session should include the MultiOn browse action and the OpenAI call.\n", + "\n", + "![AgentOps MultiOn Browse](https://github.com/AgentOps-AI/agentops/blob/main/docs/images/agentops-multion-browse.gif?raw=true)" ] } ], diff --git a/examples/multion/Step_by_step_web_browsing.ipynb b/examples/multion/Step_by_step_web_browsing.ipynb index 7069ad9e6..be06d2d65 100644 --- a/examples/multion/Step_by_step_web_browsing.ipynb +++ b/examples/multion/Step_by_step_web_browsing.ipynb @@ -72,16 +72,6 @@ "AGENTOPS_API_KEY = os.getenv(\"AGENTOPS_API_KEY\") or \"\"" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Check your session\n", - "Check your session on [AgentOps](https://app.agentops.ai). This session should include the MultiOn browse action and the OpenAI call.\n", - "\n", - "![image.png](attachment:image.png)" - ] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/examples/multion/Webpage_data_retrieval.ipynb b/examples/multion/Webpage_data_retrieval.ipynb index 9fc89741e..417522a1d 100644 --- a/examples/multion/Webpage_data_retrieval.ipynb +++ b/examples/multion/Webpage_data_retrieval.ipynb @@ -72,10 +72,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Check your session\n", - "Check your session on [AgentOps](https://app.agentops.ai). This session should include the MultiOn browse action and the OpenAI call.\n", - "\n", - "![image.png](attachment:image.png)" + "Now let's use MultiOn's Retrieve functionality to retrieve data from a webpage." ] }, { @@ -115,7 +112,7 @@ "metadata": {}, "source": [ "## Check your session\n", - "Check your session on [AgentOps](https://app.agentops.ai)\n", + "Check your session on [AgentOps](https://app.agentops.ai). The Retrieve actions are automatically captured.\n", "\n", "![AgentOps Multion Retrieve](https://github.com/AgentOps-AI/agentops/blob/main/docs/images/agentops-multion-retrieve.gif?raw=true)" ]