-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP. Saving state of abstract Event to try another way
- Loading branch information
Showing
4 changed files
with
151 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from enum import Enum | ||
import time | ||
from datetime import datetime | ||
import json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 15, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Found existing installation: agentops 0.0.22\n", | ||
"Uninstalling agentops-0.0.22:\n", | ||
" Successfully uninstalled agentops-0.0.22\n", | ||
"Note: you may need to restart the kernel to use updated packages.\n", | ||
"Collecting agentops\n", | ||
" Using cached agentops-0.0.22-py3-none-any.whl.metadata (5.1 kB)\n", | ||
"Collecting requests==2.31.0 (from agentops)\n", | ||
" Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)\n", | ||
"Collecting pydantic>=1.9.0 (from agentops)\n", | ||
" Using cached pydantic-2.6.3-py3-none-any.whl.metadata (84 kB)\n", | ||
"Collecting packaging<24.0,>=23.1 (from agentops)\n", | ||
" Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)\n", | ||
"Collecting charset-normalizer<4,>=2 (from requests==2.31.0->agentops)\n", | ||
" Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl.metadata (33 kB)\n", | ||
"Collecting idna<4,>=2.5 (from requests==2.31.0->agentops)\n", | ||
" Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)\n", | ||
"Collecting urllib3<3,>=1.21.1 (from requests==2.31.0->agentops)\n", | ||
" Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)\n", | ||
"Collecting certifi>=2017.4.17 (from requests==2.31.0->agentops)\n", | ||
" Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)\n", | ||
"Collecting annotated-types>=0.4.0 (from pydantic>=1.9.0->agentops)\n", | ||
" Using cached annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)\n", | ||
"Collecting pydantic-core==2.16.3 (from pydantic>=1.9.0->agentops)\n", | ||
" Using cached pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.5 kB)\n", | ||
"Collecting typing-extensions>=4.6.1 (from pydantic>=1.9.0->agentops)\n", | ||
" Using cached typing_extensions-4.10.0-py3-none-any.whl.metadata (3.0 kB)\n", | ||
"Using cached agentops-0.0.22-py3-none-any.whl (18 kB)\n", | ||
"Using cached requests-2.31.0-py3-none-any.whl (62 kB)\n", | ||
"Using cached packaging-23.2-py3-none-any.whl (53 kB)\n", | ||
"Using cached pydantic-2.6.3-py3-none-any.whl (395 kB)\n", | ||
"Using cached pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB)\n", | ||
"Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)\n", | ||
"Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)\n", | ||
"Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl (119 kB)\n", | ||
"Using cached idna-3.6-py3-none-any.whl (61 kB)\n", | ||
"Using cached typing_extensions-4.10.0-py3-none-any.whl (33 kB)\n", | ||
"Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)\n", | ||
"Installing collected packages: urllib3, typing-extensions, packaging, idna, charset-normalizer, certifi, annotated-types, requests, pydantic-core, pydantic, agentops\n", | ||
" Attempting uninstall: urllib3\n", | ||
" Found existing installation: urllib3 2.2.1\n", | ||
" Uninstalling urllib3-2.2.1:\n", | ||
" Successfully uninstalled urllib3-2.2.1\n", | ||
" Attempting uninstall: typing-extensions\n", | ||
" Found existing installation: typing_extensions 4.10.0\n", | ||
" Uninstalling typing_extensions-4.10.0:\n", | ||
" Successfully uninstalled typing_extensions-4.10.0\n", | ||
" Attempting uninstall: packaging\n", | ||
" Found existing installation: packaging 23.2\n", | ||
" Uninstalling packaging-23.2:\n", | ||
" Successfully uninstalled packaging-23.2\n", | ||
" Attempting uninstall: idna\n", | ||
" Found existing installation: idna 3.6\n", | ||
" Uninstalling idna-3.6:\n", | ||
" Successfully uninstalled idna-3.6\n", | ||
" Attempting uninstall: charset-normalizer\n", | ||
" Found existing installation: charset-normalizer 3.3.2\n", | ||
" Uninstalling charset-normalizer-3.3.2:\n", | ||
" Successfully uninstalled charset-normalizer-3.3.2\n", | ||
" Attempting uninstall: certifi\n", | ||
" Found existing installation: certifi 2024.2.2\n", | ||
" Uninstalling certifi-2024.2.2:\n", | ||
" Successfully uninstalled certifi-2024.2.2\n", | ||
" Attempting uninstall: annotated-types\n", | ||
" Found existing installation: annotated-types 0.6.0\n", | ||
" Uninstalling annotated-types-0.6.0:\n", | ||
" Successfully uninstalled annotated-types-0.6.0\n", | ||
" Attempting uninstall: requests\n", | ||
" Found existing installation: requests 2.31.0\n", | ||
" Uninstalling requests-2.31.0:\n", | ||
" Successfully uninstalled requests-2.31.0\n", | ||
" Attempting uninstall: pydantic-core\n", | ||
" Found existing installation: pydantic_core 2.16.3\n", | ||
" Uninstalling pydantic_core-2.16.3:\n", | ||
" Successfully uninstalled pydantic_core-2.16.3\n", | ||
" Attempting uninstall: pydantic\n", | ||
" Found existing installation: pydantic 2.6.3\n", | ||
" Uninstalling pydantic-2.6.3:\n", | ||
" Successfully uninstalled pydantic-2.6.3\n", | ||
"Successfully installed agentops-0.0.22 annotated-types-0.6.0 certifi-2024.2.2 charset-normalizer-3.3.2 idna-3.6 packaging-23.2 pydantic-2.6.3 pydantic-core-2.16.3 requests-2.31.0 typing-extensions-4.10.0 urllib3-2.2.1\n", | ||
"Note: you may need to restart the kernel to use updated packages.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%pip uninstall -y agentops\n", | ||
"%pip install --upgrade --force-reinstall agentops\n", | ||
"import agentops\n", | ||
"from dotenv import load_dotenv\n", | ||
"load_dotenv()\n", | ||
"agentopsClient = agentops.Client(tags=[\"event-ABC-test\"], endpoint=\"http://localhost:8000\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from agentops import Event\n", | ||
"action = agentopsClient.record(Event(tags=[\"howie-test\"], event_type=\"action\"))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "env", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters