Skip to content

Commit

Permalink
Fixed broken image urls
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieG committed Sep 4, 2024
1 parent 148b780 commit 1da101d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 201 deletions.
161 changes: 16 additions & 145 deletions examples/anthropic/anthropic_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -82,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -101,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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": [
"<agentops.session.Session at 0x1053864b0>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"agentops.init(AGENTOPS_API_KEY, default_tags=[\"anthropic-example\"])"
]
Expand All @@ -147,7 +80,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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",
Expand Down Expand Up @@ -200,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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\")"
]
Expand Down
29 changes: 3 additions & 26 deletions examples/autogen/AgentChat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"metadata": {},
"source": [
"# Adding AgentOps to an existing Autogen service\n",
"<img src=\"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/docs/images/external/autogen/autogen_integration.png?raw=true\"/>\n",
"<img src=\"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/docs/images/external/autogen/autogen-integration.png?raw=true\"/>\n",
"\n",
"To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n",
"\n",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion examples/autogen/MathAgent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"metadata": {},
"source": [
"# Adding AgentOps to an existing Autogen service\n",
"<img src=\"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/docs/images/external/autogen/autogen_integration.png?raw=true\"/>\n",
"<img src=\"https://raw.githubusercontent.com/AgentOps-AI/agentops/main/docs/images/external/autogen/autogen-integration.png?raw=true\"/>\n",
"\n",
"To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n",
"\n",
Expand Down
17 changes: 3 additions & 14 deletions examples/multion/Sample_browsing_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
Expand Down Expand Up @@ -74,16 +71,6 @@
"OPENAI_API_KEY = os.getenv(\"OPENAI_API_KEY\") or \"<your_openai_key>\""
]
},
{
"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": {},
Expand Down Expand Up @@ -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)"
]
}
],
Expand Down
10 changes: 0 additions & 10 deletions examples/multion/Step_by_step_web_browsing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@
"AGENTOPS_API_KEY = os.getenv(\"AGENTOPS_API_KEY\") or \"<your_agentops_key>\""
]
},
{
"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": {},
Expand Down
7 changes: 2 additions & 5 deletions examples/multion/Webpage_data_retrieval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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)"
]
Expand Down

0 comments on commit 1da101d

Please sign in to comment.