From 58ca38e2bbc301eb0d10810b6cd570c87719af64 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Wed, 15 Jan 2025 22:04:29 +0530 Subject: [PATCH 01/25] remove exception handling in ollama test --- tests/integration/test_llm_providers.py | 54 ++++++++++--------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 3d9616fbe..65e1b11b3 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -301,40 +301,30 @@ def test_ollama_provider(test_messages: List[Dict[str, Any]]): import ollama from ollama import AsyncClient - try: - # Test if Ollama server is running - ollama.list() - except Exception as e: - pytest.skip(f"Ollama server not running: {e}") + # Sync chat + response = ollama.chat( + model="llama3.2:1b", + messages=test_messages, + ) + assert response["message"]["content"] - try: - # Sync chat - response = ollama.chat( - model="llama3.2:1b", - messages=test_messages, - ) - assert response["message"]["content"] + # Stream chat + stream = ollama.chat( + model="llama3.2:1b", + messages=test_messages, + stream=True, + ) + content = collect_stream_content(stream, "ollama") + assert len(content) > 0 - # Stream chat - stream = ollama.chat( + # Async chat + async def async_test(): + client = AsyncClient() + response = await client.chat( model="llama3.2:1b", messages=test_messages, - stream=True, ) - content = collect_stream_content(stream, "ollama") - assert len(content) > 0 - - # Async chat - async def async_test(): - client = AsyncClient() - response = await client.chat( - model="llama3.2:1b", - messages=test_messages, - ) - return response - - async_response = asyncio.run(async_test()) - assert async_response["message"]["content"] - - except Exception as e: - pytest.skip(f"Ollama test failed: {e}") + return response + + async_response = asyncio.run(async_test()) + assert async_response["message"]["content"] From 846f37894175daecfbfb4553dcb6cae76871312c Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Wed, 15 Jan 2025 22:05:10 +0530 Subject: [PATCH 02/25] make assistants test work --- tests/integration/test_llm_providers.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 65e1b11b3..746d7ae2a 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -57,8 +57,7 @@ def test_openai_provider(openai_client, test_messages: List[Dict[str, Any]]): ## Assistants API Tests -# @pytest.mark.vcr() -@pytest.mark.skip("For some reason this is not being recorded and the test is not behaving correctly") +@pytest.mark.vcr() async def test_openai_assistants_provider(openai_client): """Test OpenAI Assistants API integration for all overridden methods.""" @@ -107,21 +106,8 @@ async def test_openai_assistants_provider(openai_client): run = openai_client.beta.threads.runs.create(thread_id=thread.id, assistant_id=assistant.id) assert run.id.startswith("run_") - # Monitor run status with timeout - async def check_run_status(): - while True: - run_status = openai_client.beta.threads.runs.retrieve(thread_id=thread.id, run_id=run.id) - print(f"Current run status: {run_status.status}") # Print status for debugging - if run_status.status in ["completed", "failed", "cancelled", "expired"]: - return run_status - await asyncio.sleep(1) - - try: - run_status = await asyncio.wait_for(check_run_status(), timeout=10) # Shorter timeout - except TimeoutError: - # Cancel the run if it's taking too long - openai_client.beta.threads.runs.cancel(thread_id=thread.id, run_id=run.id) - pytest.skip("Assistant run timed out and was cancelled") + while run.status not in ["completed", "failed"]: + run = openai_client.beta.threads.runs.retrieve(thread_id=thread.id, run_id=run.id) # Get run steps run_steps = openai_client.beta.threads.runs.steps.list(thread_id=thread.id, run_id=run.id) From 9f72715cf05ff044cdc80c3d60af0e5de988123f Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Thu, 16 Jan 2025 11:41:21 +0530 Subject: [PATCH 03/25] remove redundant comments --- tests/integration/test_llm_providers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 746d7ae2a..bf9afc668 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -7,7 +7,7 @@ def collect_stream_content(stream_response: Any, provider: str) -> List[str]: """Collect streaming content based on provider-specific response format.""" - collected_content = [] # Initialize the list first + collected_content = [] handlers = { "openai": lambda chunk: chunk.choices[0].delta.content, @@ -27,8 +27,8 @@ def collect_stream_content(stream_response: Any, provider: str) -> List[str]: raise ValueError(f"Unknown provider: {provider}") for chunk in stream_response: - if chunk_content := handler(chunk): # Use different variable name - collected_content.append(chunk_content) # Append to the list + if chunk_content := handler(chunk): + collected_content.append(chunk_content) return collected_content From 88d59f5a36d0e81c83bea0673f34798fc4fd6d53 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 02:13:28 +0530 Subject: [PATCH 04/25] add auotgen integration tests --- tests/fixtures/partners.py | 91 ++++ .../test_autogen_logger_session_flow.yaml | 422 ++++++++++++++++++ .../test_math_agent_error_handling.yaml | 382 ++++++++++++++++ .../test_math_agent_termination.yaml | 382 ++++++++++++++++ .../test_math_agent_tool_usage.yaml | 382 ++++++++++++++++ tests/fixtures/vcr.py | 14 +- tests/integration/conftest.py | 7 +- tests/integration/test_partners.py | 73 +++ 8 files changed, 1747 insertions(+), 6 deletions(-) create mode 100644 tests/fixtures/partners.py create mode 100644 tests/fixtures/recordings/test_autogen_logger_session_flow.yaml create mode 100644 tests/fixtures/recordings/test_math_agent_error_handling.yaml create mode 100644 tests/fixtures/recordings/test_math_agent_termination.yaml create mode 100644 tests/fixtures/recordings/test_math_agent_tool_usage.yaml create mode 100644 tests/integration/test_partners.py diff --git a/tests/fixtures/partners.py b/tests/fixtures/partners.py new file mode 100644 index 000000000..83a3dae0e --- /dev/null +++ b/tests/fixtures/partners.py @@ -0,0 +1,91 @@ +import pytest +from agentops.partners.autogen_logger import AutogenLogger +from autogen import UserProxyAgent, AssistantAgent, register_function +import agentops + +@pytest.fixture +def autogen_logger(agentops_session): + """Fixture for AutogenLogger with auto start/stop.""" + logger = AutogenLogger() + logger.start() + yield logger + logger.stop() + +@pytest.fixture +def math_agents(openai_client, autogen_logger): + """Math agent group with calculator tool and all configurations.""" + # Initialize AgentOps + agentops.init() + + # Base configuration for all agents + base_config = { + "max_consecutive_auto_reply": 0, # Disable auto-reply + "code_execution_config": False, + "llm_config": False, # Disable LLM-based auto reply + } + + # LLM configuration for math assistant + llm_config = { + "config_list": [{ + "model": "gpt-4", + "api_key": openai_client.api_key, + "timeout": 10, + }], + "timeout": 10, + "temperature": 0, # Deterministic for testing + } + + # Create user proxy agent + user_proxy = UserProxyAgent( + name="user_proxy", + human_input_mode="NEVER", + is_termination_msg=lambda x: "TERMINATE" in x.get("content", "") + or x.get("content", "") == "", + **base_config + ) + + # Create assistant agent + assistant = AssistantAgent( + name="assistant", + system_message="You are a math assistant. Use the calculator tool when needed. Return TERMINATE when done.", + llm_config=llm_config, + max_consecutive_auto_reply=1 + ) + + # Register agents with logger + autogen_logger.log_new_agent(user_proxy, {}) + autogen_logger.log_new_agent(assistant, {}) + + # Define calculator tool + def calculator(a: int, b: int, operator: str) -> int: + if operator == "+": + return a + b + elif operator == "-": + return a - b + elif operator == "*": + return a * b + elif operator == "/": + return int(a / b) + else: + raise ValueError("Invalid operator") + + # Register calculator with both agents + assistant.register_for_llm( + name="calculator", + description="A simple calculator" + )(calculator) + + user_proxy.register_for_execution( + name="calculator" + )(calculator) + + # Register function between agents + register_function( + calculator, + caller=assistant, + executor=user_proxy, + name="calculator", + description="A simple calculator" + ) + + return user_proxy, assistant \ No newline at end of file diff --git a/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml b/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml new file mode 100644 index 000000000..19e24d354 --- /dev/null +++ b/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml @@ -0,0 +1,422 @@ +interactions: +- request: + body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": + "3ebf07b3-1417-433f-856f-b00c2626c64b", "init_timestamp": "2025-01-16T20:42:43.001822+00:00", + "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps + SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": + "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": + "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": + "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", + "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", + "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", + "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": + "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", + "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": + "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", + "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": + "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": + "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": + "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", + "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": + "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": + "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": + "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", + "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", + "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", + "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", + "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": + "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, + "errors": 0, "apis": 0}}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '10802' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_session + response: + body: + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiM2ViZjA3YjMtMTQxNy00MzNmLTg1NmYtYjAwYzI2MjZjNjRiIiwiZXhwIjoxNzM3MTQ2NTYzLjk3MDk4Mn0.26Ggk4-XI3gDaZTUjlXy0U48PKC9U9dtqE5Vchq2LHU","session_url":"https://app.agentops.ai/drilldown?session_id=3ebf07b3-1417-433f-856f-b00c2626c64b","status":"Success"}' + headers: + Content-Length: + - '311' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:43 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"id": "e812e199-2a6e-4350-b8f6-c06426134ac0", "name": "user_proxy"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:44 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"id": "3b7fb19d-19a7-49ae-b005-84b9634596b8", "name": "assistant"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:45 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"session": {"end_timestamp": "2025-01-16T20:42:45.139379+00:00", "end_state": + "Indeterminate", "session_id": "3ebf07b3-1417-433f-856f-b00c2626c64b", "init_timestamp": + "2025-01-16T20:42:43.001822+00:00", "tags": [], "video": null, "end_state_reason": + null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": + "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", + "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", + "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": + "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", + "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": + "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", + "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": + "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", + "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": + "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": + "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", + "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", + "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", + "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": + "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", + "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", + "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": + "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": + "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": + "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": + "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiM2ViZjA3YjMtMTQxNy00MzNmLTg1NmYtYjAwYzI2MjZjNjRiIiwiZXhwIjoxNzM3MTQ2NTYzLjk3MDk4Mn0.26Ggk4-XI3gDaZTUjlXy0U48PKC9U9dtqE5Vchq2LHU", + "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", + "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, + "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": + ""}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11101' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/update_session + response: + body: + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=3ebf07b3-1417-433f-856f-b00c2626c64b","status":"success","token_cost":"0.00"}' + headers: + Content-Length: + - '138' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:45 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_error_handling.yaml b/tests/fixtures/recordings/test_math_agent_error_handling.yaml new file mode 100644 index 000000000..b9abbd4b3 --- /dev/null +++ b/tests/fixtures/recordings/test_math_agent_error_handling.yaml @@ -0,0 +1,382 @@ +interactions: +- request: + body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": + "5df002b7-d953-4346-8e01-9b3d24751d68", "init_timestamp": "2025-01-16T20:42:48.174279+00:00", + "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps + SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": + "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": + "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": + "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", + "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", + "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", + "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": + "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", + "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": + "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", + "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": + "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": + "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": + "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", + "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": + "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": + "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": + "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", + "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", + "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", + "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", + "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": + "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, + "errors": 0, "apis": 0}}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '10802' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_session + response: + body: + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNWRmMDAyYjctZDk1My00MzQ2LThlMDEtOWIzZDI0NzUxZDY4IiwiZXhwIjoxNzM3MTQ2NTY4Ljg4NDEwNH0.mSkEe4WZ5Qq9dRv1Dxvb3i4IWo5KQgZJzvIxKrK8aEk","session_url":"https://app.agentops.ai/drilldown?session_id=5df002b7-d953-4346-8e01-9b3d24751d68","status":"Success"}' + headers: + Content-Length: + - '311' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:48 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"id": "ee44e3d8-3330-4286-9601-7d9412fc4d48", "name": "assistant"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:50 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"session": {"end_timestamp": "2025-01-16T20:42:49.967615+00:00", "end_state": + "Indeterminate", "session_id": "5df002b7-d953-4346-8e01-9b3d24751d68", "init_timestamp": + "2025-01-16T20:42:48.174279+00:00", "tags": [], "video": null, "end_state_reason": + null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": + "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", + "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", + "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": + "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", + "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": + "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", + "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": + "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", + "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": + "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": + "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", + "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", + "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", + "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": + "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", + "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", + "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": + "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": + "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": + "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": + "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNWRmMDAyYjctZDk1My00MzQ2LThlMDEtOWIzZDI0NzUxZDY4IiwiZXhwIjoxNzM3MTQ2NTY4Ljg4NDEwNH0.mSkEe4WZ5Qq9dRv1Dxvb3i4IWo5KQgZJzvIxKrK8aEk", + "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", + "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, + "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": + ""}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11101' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/update_session + response: + body: + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=5df002b7-d953-4346-8e01-9b3d24751d68","status":"success","token_cost":"0.00"}' + headers: + Content-Length: + - '138' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:50 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_termination.yaml b/tests/fixtures/recordings/test_math_agent_termination.yaml new file mode 100644 index 000000000..225ab3cb8 --- /dev/null +++ b/tests/fixtures/recordings/test_math_agent_termination.yaml @@ -0,0 +1,382 @@ +interactions: +- request: + body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": + "088e28c8-a151-4979-a826-bcdbef2cde63", "init_timestamp": "2025-01-16T20:42:50.504490+00:00", + "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps + SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": + "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": + "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": + "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", + "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", + "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", + "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": + "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", + "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": + "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", + "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": + "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": + "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": + "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", + "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": + "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": + "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": + "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", + "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", + "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", + "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", + "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": + "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, + "errors": 0, "apis": 0}}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '10802' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_session + response: + body: + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMDg4ZTI4YzgtYTE1MS00OTc5LWE4MjYtYmNkYmVmMmNkZTYzIiwiZXhwIjoxNzM3MTQ2NTcxLjQ0NDQ5fQ.XEE2V1CZ2ALPYjzRzQPFcUhfqMHA00N9uBDQf8RgEqg","session_url":"https://app.agentops.ai/drilldown?session_id=088e28c8-a151-4979-a826-bcdbef2cde63","status":"Success"}' + headers: + Content-Length: + - '310' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:51 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"id": "54693a9f-ebc8-43b4-8947-815323617cef", "name": "assistant"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:52 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"session": {"end_timestamp": "2025-01-16T20:42:52.671662+00:00", "end_state": + "Indeterminate", "session_id": "088e28c8-a151-4979-a826-bcdbef2cde63", "init_timestamp": + "2025-01-16T20:42:50.504490+00:00", "tags": [], "video": null, "end_state_reason": + null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": + "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", + "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", + "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": + "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", + "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": + "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", + "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": + "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", + "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": + "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": + "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", + "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", + "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", + "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": + "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", + "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", + "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": + "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": + "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": + "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": + "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMDg4ZTI4YzgtYTE1MS00OTc5LWE4MjYtYmNkYmVmMmNkZTYzIiwiZXhwIjoxNzM3MTQ2NTcxLjQ0NDQ5fQ.XEE2V1CZ2ALPYjzRzQPFcUhfqMHA00N9uBDQf8RgEqg", + "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", + "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, + "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": + ""}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11100' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/update_session + response: + body: + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=088e28c8-a151-4979-a826-bcdbef2cde63","status":"success","token_cost":"0.00"}' + headers: + Content-Length: + - '138' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:53 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_tool_usage.yaml b/tests/fixtures/recordings/test_math_agent_tool_usage.yaml new file mode 100644 index 000000000..06b4141fe --- /dev/null +++ b/tests/fixtures/recordings/test_math_agent_tool_usage.yaml @@ -0,0 +1,382 @@ +interactions: +- request: + body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": + "ad797412-10d3-44b9-805f-5c1a92196a85", "init_timestamp": "2025-01-16T20:42:45.884907+00:00", + "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps + SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": + "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": + "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": + "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", + "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", + "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", + "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": + "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", + "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": + "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", + "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": + "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": + "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": + "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", + "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": + "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": + "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": + "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", + "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", + "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", + "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", + "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": + "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, + "errors": 0, "apis": 0}}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '10802' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_session + response: + body: + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiYWQ3OTc0MTItMTBkMy00NGI5LTgwNWYtNWMxYTkyMTk2YTg1IiwiZXhwIjoxNzM3MTQ2NTY2LjcyODQ5MX0.5wAq8jTsb-0Sq8VlfHqlAJBfkRTX2oT2zVDNPQg0Tj0","session_url":"https://app.agentops.ai/drilldown?session_id=ad797412-10d3-44b9-805f-5c1a92196a85","status":"Success"}' + headers: + Content-Length: + - '311' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:46 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"id": "9154ed2e-4e89-4892-98b9-6febe0503ed3", "name": "assistant"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:47 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"session": {"end_timestamp": "2025-01-16T20:42:47.615211+00:00", "end_state": + "Indeterminate", "session_id": "ad797412-10d3-44b9-805f-5c1a92196a85", "init_timestamp": + "2025-01-16T20:42:45.884907+00:00", "tags": [], "video": null, "end_state_reason": + null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": + "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", + "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", + "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": + "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", + "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": + "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", + "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": + "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", + "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": + "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": + "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", + "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", + "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", + "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": + "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", + "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", + "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": + "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": + "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": + "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": + "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": + "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": + "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": + "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": + "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", + "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": + "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", + "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": + "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": + "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST + 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": + {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": + "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, + "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": + "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": + "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 + GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", + "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": + "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 + GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": + {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", + "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", + "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, + "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", + "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": + {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 + GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": + "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", + "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, + "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", + "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, + "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": + "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": + {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", + "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": + "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", + "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": + "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": + "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": + "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", + "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": + "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", + "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", + "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", + "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", + "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": + "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", + "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": + "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": + "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": + "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", + "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": + "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", + "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": + "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": + "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", + "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": + "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": + "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", + "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", + "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": + "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", + "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": + "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": + "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", + "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": + "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": + "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", + "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", + "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": + "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": + "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": + "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", + "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": + "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", + "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": + "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", + "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": + "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", + "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", + "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": + "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", + "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": + "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", + "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": + "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": + "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", + "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": + "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", + "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", + "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": + "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": + "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", + "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": + "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", + "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": + "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": + "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": + "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": + "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": + "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", + "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project + Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, + "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, + "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiYWQ3OTc0MTItMTBkMy00NGI5LTgwNWYtNWMxYTkyMTk2YTg1IiwiZXhwIjoxNzM3MTQ2NTY2LjcyODQ5MX0.5wAq8jTsb-0Sq8VlfHqlAJBfkRTX2oT2zVDNPQg0Tj0", + "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", + "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, + "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": + ""}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11101' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/update_session + response: + body: + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=ad797412-10d3-44b9-805f-5c1a92196a85","status":"success","token_cost":"0.00"}' + headers: + Content-Length: + - '138' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:42:48 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index a824c3535..5ab9ba31a 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -76,19 +76,25 @@ def vcr_config(): ("x-stainless-async", "REDACTED"), ("x-stainless-runtime", "REDACTED"), ("x-stainless-runtime-version", "REDACTED"), + # Add JWT-related headers + ("x-railway-request-id", "REDACTED"), + ("x-request-id", "REDACTED"), + ("x-ratelimit-remaining-tokens", "REDACTED"), + ("x-ratelimit-reset-requests", "REDACTED"), + ("x-ratelimit-reset-tokens", "REDACTED"), + ("x-debug-trace-id", "REDACTED") ] def filter_response_headers(response): """Filter sensitive headers from response.""" headers = response["headers"] - headers_lower = {k.lower(): k for k in headers} # Map of lowercase -> original header names + headers_lower = {k.lower(): k for k in headers} for header, replacement in sensitive_headers: header_lower = header.lower() if header_lower in headers_lower: - # Replace using the original header name from the response - original_header = headers_lower[header_lower] - headers[original_header] = replacement + headers[headers_lower[header_lower]] = [replacement] + return response return { diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 90fda319b..b11d59573 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -13,13 +13,16 @@ openai_client, test_messages, ) +from tests.fixtures.partners import ( + autogen_logger, + math_agents, +) from tests.fixtures.vcr import vcr_config @pytest.fixture def agentops_session(): + """Fixture for managing AgentOps sessions.""" agentops.start_session() - yield - agentops.end_all_sessions() diff --git a/tests/integration/test_partners.py b/tests/integration/test_partners.py new file mode 100644 index 000000000..c9696ea7b --- /dev/null +++ b/tests/integration/test_partners.py @@ -0,0 +1,73 @@ +import pytest +from agentops.partners.autogen_logger import AutogenLogger + +@pytest.mark.usefixtures("agentops_session") +@pytest.mark.vcr +def test_autogen_logger_init(autogen_logger): + """Test AutogenLogger initialization""" + assert isinstance(autogen_logger, AutogenLogger) + assert hasattr(autogen_logger, 'start') + assert hasattr(autogen_logger, 'stop') + assert hasattr(autogen_logger, 'get_connection') + +@pytest.mark.usefixtures("agentops_session") +@pytest.mark.vcr +def test_autogen_logger_session_flow(autogen_logger, math_agents): + """Test complete session flow with AutogenLogger""" + user_proxy, assistant = math_agents + + user_proxy.initiate_chat( + assistant, + message="What is 2 + 2?", + ) + + # Check that events were logged through the logger's methods + assert len(autogen_logger.agent_store) > 0 # Agents were registered + assert any(agent["autogen_id"] == str(id(user_proxy)) for agent in autogen_logger.agent_store) + assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) + +@pytest.mark.usefixtures("agentops_session") +@pytest.mark.vcr +def test_math_agent_tool_usage(autogen_logger, math_agents): + """Test math agent tool usage tracking""" + user_proxy, assistant = math_agents + + user_proxy.initiate_chat( + assistant, + message="What is (1423 - 123) / 3 + (32 + 23) * 5?", + ) + + # Check that tool usage was logged + assert len(autogen_logger.agent_store) > 0 + assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) + +@pytest.mark.usefixtures("agentops_session") +@pytest.mark.vcr +def test_math_agent_error_handling(autogen_logger, math_agents): + """Test math agent error handling""" + user_proxy, assistant = math_agents + + # The assistant should handle invalid operators gracefully + user_proxy.initiate_chat( + assistant, + message="What is 123 @ 456?", + ) + + # Check that error was logged + assert len(autogen_logger.agent_store) > 0 + assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) + +@pytest.mark.usefixtures("agentops_session") +@pytest.mark.vcr +def test_math_agent_termination(autogen_logger, math_agents): + """Test math agent termination""" + user_proxy, assistant = math_agents + + user_proxy.initiate_chat( + assistant, + message="What is 1 + 1? Return TERMINATE when done.", + ) + + # Check that termination was logged + assert len(autogen_logger.agent_store) > 0 + assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) From b5165d1c21f2295a824741b65eaf84d5602e8b1e Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 02:19:47 +0530 Subject: [PATCH 05/25] change vcr config to not check body --- tests/fixtures/vcr.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 5ab9ba31a..48912ed0e 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -85,6 +85,13 @@ def vcr_config(): ("x-debug-trace-id", "REDACTED") ] + def before_record_request(request): + """Filter sensitive data from request body""" + if request.body: + # Don't match on dynamic fields in the request body + request.body = None + return request + def filter_response_headers(response): """Filter sensitive headers from response.""" headers = response["headers"] @@ -101,7 +108,7 @@ def filter_response_headers(response): # Basic VCR configuration "serializer": "yaml", "cassette_library_dir": str(vcr_cassettes), - "match_on": ["uri", "method", "body"], + "match_on": ["uri", "method"], "record_mode": "once", "ignore_localhost": True, "ignore_hosts": [ @@ -114,6 +121,7 @@ def filter_response_headers(response): ], # Header filtering for requests and responses "filter_headers": sensitive_headers, + "before_record_request": before_record_request, "before_record_response": filter_response_headers, # Add these new options "decode_compressed_response": True, From 649500e03b779d4978a85f2f7bd5a540d0b423b4 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 02:20:08 +0530 Subject: [PATCH 06/25] consolidate autogen integration tests into a single test --- tests/fixtures/recordings/test_autogen.yaml | 160 +++++++ .../test_autogen_logger_session_flow.yaml | 422 ------------------ .../test_math_agent_error_handling.yaml | 382 ---------------- .../test_math_agent_termination.yaml | 382 ---------------- .../test_math_agent_tool_usage.yaml | 382 ---------------- tests/integration/test_partners.py | 47 +- 6 files changed, 173 insertions(+), 1602 deletions(-) create mode 100644 tests/fixtures/recordings/test_autogen.yaml delete mode 100644 tests/fixtures/recordings/test_autogen_logger_session_flow.yaml delete mode 100644 tests/fixtures/recordings/test_math_agent_error_handling.yaml delete mode 100644 tests/fixtures/recordings/test_math_agent_termination.yaml delete mode 100644 tests/fixtures/recordings/test_math_agent_tool_usage.yaml diff --git a/tests/fixtures/recordings/test_autogen.yaml b/tests/fixtures/recordings/test_autogen.yaml new file mode 100644 index 000000000..fc0debc82 --- /dev/null +++ b/tests/fixtures/recordings/test_autogen.yaml @@ -0,0 +1,160 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '10803' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_session + response: + body: + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMTcwNjg5ZjAtZTI4MS00ODdjLTkzMTctOWExOTU3ZDc4OWJmIiwiZXhwIjoxNzM3MTQ2ODk1Ljc5OTY0fQ.K38gltvALNeeUckcFDPRfPaO3NOVzdbiShZF86xutTY","session_url":"https://app.agentops.ai/drilldown?session_id=170689f0-e281-487c-9317-9a1957d789bf","status":"Success"}' + headers: + Content-Length: + - '310' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:48:15 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:48:16 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/create_agent + response: + body: + string: '"Success"' + headers: + Content-Length: + - '9' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:48:16 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11101' + Content-Type: + - application/json; charset=UTF-8 + Keep-Alive: + - timeout=10, max=1000 + User-Agent: + - python-requests/2.32.3 + authorization: + - REDACTED + x-agentops-api-key: + - REDACTED + method: POST + uri: https://api.agentops.ai/v2/update_session + response: + body: + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=170689f0-e281-487c-9317-9a1957d789bf","status":"success","token_cost":"0.00"}' + headers: + Content-Length: + - '138' + Content-Type: + - application/json + Date: + - Thu, 16 Jan 2025 20:48:17 GMT + Server: + - railway-edge + X-Railway-Request-Id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml b/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml deleted file mode 100644 index 19e24d354..000000000 --- a/tests/fixtures/recordings/test_autogen_logger_session_flow.yaml +++ /dev/null @@ -1,422 +0,0 @@ -interactions: -- request: - body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": - "3ebf07b3-1417-433f-856f-b00c2626c64b", "init_timestamp": "2025-01-16T20:42:43.001822+00:00", - "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps - SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": - "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": - "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": - "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", - "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", - "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", - "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": - "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", - "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": - "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", - "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": - "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": - "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": - "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", - "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": - "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": - "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": - "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", - "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", - "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", - "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", - "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": - "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, - "errors": 0, "apis": 0}}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '10802' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_session - response: - body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiM2ViZjA3YjMtMTQxNy00MzNmLTg1NmYtYjAwYzI2MjZjNjRiIiwiZXhwIjoxNzM3MTQ2NTYzLjk3MDk4Mn0.26Ggk4-XI3gDaZTUjlXy0U48PKC9U9dtqE5Vchq2LHU","session_url":"https://app.agentops.ai/drilldown?session_id=3ebf07b3-1417-433f-856f-b00c2626c64b","status":"Success"}' - headers: - Content-Length: - - '311' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:43 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"id": "e812e199-2a6e-4350-b8f6-c06426134ac0", "name": "user_proxy"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '68' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_agent - response: - body: - string: '"Success"' - headers: - Content-Length: - - '9' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:44 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"id": "3b7fb19d-19a7-49ae-b005-84b9634596b8", "name": "assistant"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_agent - response: - body: - string: '"Success"' - headers: - Content-Length: - - '9' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:45 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"session": {"end_timestamp": "2025-01-16T20:42:45.139379+00:00", "end_state": - "Indeterminate", "session_id": "3ebf07b3-1417-433f-856f-b00c2626c64b", "init_timestamp": - "2025-01-16T20:42:43.001822+00:00", "tags": [], "video": null, "end_state_reason": - null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": - "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", - "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", - "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": - "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", - "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": - "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", - "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": - "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", - "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": - "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": - "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", - "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", - "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", - "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": - "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", - "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", - "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": - "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": - "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": - "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": - "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiM2ViZjA3YjMtMTQxNy00MzNmLTg1NmYtYjAwYzI2MjZjNjRiIiwiZXhwIjoxNzM3MTQ2NTYzLjk3MDk4Mn0.26Ggk4-XI3gDaZTUjlXy0U48PKC9U9dtqE5Vchq2LHU", - "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", - "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, - "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": - ""}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11101' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/update_session - response: - body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=3ebf07b3-1417-433f-856f-b00c2626c64b","status":"success","token_cost":"0.00"}' - headers: - Content-Length: - - '138' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:45 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_error_handling.yaml b/tests/fixtures/recordings/test_math_agent_error_handling.yaml deleted file mode 100644 index b9abbd4b3..000000000 --- a/tests/fixtures/recordings/test_math_agent_error_handling.yaml +++ /dev/null @@ -1,382 +0,0 @@ -interactions: -- request: - body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": - "5df002b7-d953-4346-8e01-9b3d24751d68", "init_timestamp": "2025-01-16T20:42:48.174279+00:00", - "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps - SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": - "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": - "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": - "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", - "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", - "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", - "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": - "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", - "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": - "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", - "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": - "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": - "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": - "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", - "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": - "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": - "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": - "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", - "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", - "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", - "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", - "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": - "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, - "errors": 0, "apis": 0}}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '10802' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_session - response: - body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNWRmMDAyYjctZDk1My00MzQ2LThlMDEtOWIzZDI0NzUxZDY4IiwiZXhwIjoxNzM3MTQ2NTY4Ljg4NDEwNH0.mSkEe4WZ5Qq9dRv1Dxvb3i4IWo5KQgZJzvIxKrK8aEk","session_url":"https://app.agentops.ai/drilldown?session_id=5df002b7-d953-4346-8e01-9b3d24751d68","status":"Success"}' - headers: - Content-Length: - - '311' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:48 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"id": "ee44e3d8-3330-4286-9601-7d9412fc4d48", "name": "assistant"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_agent - response: - body: - string: '"Success"' - headers: - Content-Length: - - '9' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:50 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"session": {"end_timestamp": "2025-01-16T20:42:49.967615+00:00", "end_state": - "Indeterminate", "session_id": "5df002b7-d953-4346-8e01-9b3d24751d68", "init_timestamp": - "2025-01-16T20:42:48.174279+00:00", "tags": [], "video": null, "end_state_reason": - null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": - "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", - "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", - "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": - "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", - "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": - "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", - "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": - "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", - "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": - "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": - "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", - "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", - "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", - "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": - "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", - "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", - "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": - "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": - "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": - "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": - "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNWRmMDAyYjctZDk1My00MzQ2LThlMDEtOWIzZDI0NzUxZDY4IiwiZXhwIjoxNzM3MTQ2NTY4Ljg4NDEwNH0.mSkEe4WZ5Qq9dRv1Dxvb3i4IWo5KQgZJzvIxKrK8aEk", - "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", - "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, - "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": - ""}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11101' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/update_session - response: - body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=5df002b7-d953-4346-8e01-9b3d24751d68","status":"success","token_cost":"0.00"}' - headers: - Content-Length: - - '138' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:50 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_termination.yaml b/tests/fixtures/recordings/test_math_agent_termination.yaml deleted file mode 100644 index 225ab3cb8..000000000 --- a/tests/fixtures/recordings/test_math_agent_termination.yaml +++ /dev/null @@ -1,382 +0,0 @@ -interactions: -- request: - body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": - "088e28c8-a151-4979-a826-bcdbef2cde63", "init_timestamp": "2025-01-16T20:42:50.504490+00:00", - "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps - SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": - "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": - "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": - "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", - "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", - "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", - "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": - "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", - "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": - "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", - "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": - "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": - "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": - "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", - "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": - "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": - "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": - "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", - "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", - "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", - "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", - "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": - "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, - "errors": 0, "apis": 0}}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '10802' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_session - response: - body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMDg4ZTI4YzgtYTE1MS00OTc5LWE4MjYtYmNkYmVmMmNkZTYzIiwiZXhwIjoxNzM3MTQ2NTcxLjQ0NDQ5fQ.XEE2V1CZ2ALPYjzRzQPFcUhfqMHA00N9uBDQf8RgEqg","session_url":"https://app.agentops.ai/drilldown?session_id=088e28c8-a151-4979-a826-bcdbef2cde63","status":"Success"}' - headers: - Content-Length: - - '310' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:51 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"id": "54693a9f-ebc8-43b4-8947-815323617cef", "name": "assistant"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_agent - response: - body: - string: '"Success"' - headers: - Content-Length: - - '9' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:52 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"session": {"end_timestamp": "2025-01-16T20:42:52.671662+00:00", "end_state": - "Indeterminate", "session_id": "088e28c8-a151-4979-a826-bcdbef2cde63", "init_timestamp": - "2025-01-16T20:42:50.504490+00:00", "tags": [], "video": null, "end_state_reason": - null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": - "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", - "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", - "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": - "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", - "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": - "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", - "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": - "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", - "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": - "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": - "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", - "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", - "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", - "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": - "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", - "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", - "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": - "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": - "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": - "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": - "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMDg4ZTI4YzgtYTE1MS00OTc5LWE4MjYtYmNkYmVmMmNkZTYzIiwiZXhwIjoxNzM3MTQ2NTcxLjQ0NDQ5fQ.XEE2V1CZ2ALPYjzRzQPFcUhfqMHA00N9uBDQf8RgEqg", - "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", - "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, - "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": - ""}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11100' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/update_session - response: - body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=088e28c8-a151-4979-a826-bcdbef2cde63","status":"success","token_cost":"0.00"}' - headers: - Content-Length: - - '138' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:53 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/recordings/test_math_agent_tool_usage.yaml b/tests/fixtures/recordings/test_math_agent_tool_usage.yaml deleted file mode 100644 index 06b4141fe..000000000 --- a/tests/fixtures/recordings/test_math_agent_tool_usage.yaml +++ /dev/null @@ -1,382 +0,0 @@ -interactions: -- request: - body: '{"session": {"end_timestamp": null, "end_state": "Indeterminate", "session_id": - "ad797412-10d3-44b9-805f-5c1a92196a85", "init_timestamp": "2025-01-16T20:42:45.884907+00:00", - "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps - SDK Version": "0.3.21", "Python Version": "3.10.16", "System Packages": {"future_fstrings": - "1.2.0", "pluggy": "1.5.0", "exceptiongroup": "1.2.2", "importlib.metadata": - "8.5.0", "iniconfig": "2.0.0", "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": - "0.13.2", "pytest_cov": "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", - "fancycompleter": "0.9.1", "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", - "pytest_sugar": "1.0.0", "sniffio": "1.3.1", "typing_extensions": "4.12.2", - "anyio": "4.8.0", "pytest_mock": "3.14.0", "colorama": "0.4.6", "importlib.resources": - "6.5.2", "networkx": "3.4.2", "pytest_depends": "1.0.1", "urllib3": "2.3.0", - "charset_normalizer": "3.4.1", "idna": "3.10", "certifi": "2024.12.14", "requests": - "2.32.3", "requests_mock": "1.12.1", "psutil": "6.0.0", "packaging": "24.2", - "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": "8.5.0", "zipp": - "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", "langchain_core": - "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", "annotated_types": - "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", "attrs": "24.3.0", - "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": "0.28.0", "h11": - "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", "httpcore": - "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", "httpx": - "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": "1.33", - "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": "0.8.2", - "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": "1.18.3", - "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": "1.5.0", - "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": null, "_lock": "", "_end_session_lock": "", "token_cost": - "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, - "errors": 0, "apis": 0}}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '10802' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_session - response: - body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiYWQ3OTc0MTItMTBkMy00NGI5LTgwNWYtNWMxYTkyMTk2YTg1IiwiZXhwIjoxNzM3MTQ2NTY2LjcyODQ5MX0.5wAq8jTsb-0Sq8VlfHqlAJBfkRTX2oT2zVDNPQg0Tj0","session_url":"https://app.agentops.ai/drilldown?session_id=ad797412-10d3-44b9-805f-5c1a92196a85","status":"Success"}' - headers: - Content-Length: - - '311' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:46 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"id": "9154ed2e-4e89-4892-98b9-6febe0503ed3", "name": "assistant"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/create_agent - response: - body: - string: '"Success"' - headers: - Content-Length: - - '9' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:47 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -- request: - body: '{"session": {"end_timestamp": "2025-01-16T20:42:47.615211+00:00", "end_state": - "Indeterminate", "session_id": "ad797412-10d3-44b9-805f-5c1a92196a85", "init_timestamp": - "2025-01-16T20:42:45.884907+00:00", "tags": [], "video": null, "end_state_reason": - null, "host_env": {"SDK": {"AgentOps SDK Version": "0.3.21", "Python Version": - "3.10.16", "System Packages": {"future_fstrings": "1.2.0", "pluggy": "1.5.0", - "exceptiongroup": "1.2.2", "importlib.metadata": "8.5.0", "iniconfig": "2.0.0", - "pytest": "8.3.4", "tomli": "2.2.1", "pytest_recording": "0.13.2", "pytest_cov": - "6.0.0", "coverage": "7.6.10", "pyfakefs": "5.7.4", "fancycompleter": "0.9.1", - "pytest_asyncio": "0.25.2", "termcolor": "2.4.0", "pytest_sugar": "1.0.0", "sniffio": - "1.3.1", "typing_extensions": "4.12.2", "anyio": "4.8.0", "pytest_mock": "3.14.0", - "colorama": "0.4.6", "importlib.resources": "6.5.2", "networkx": "3.4.2", "pytest_depends": - "1.0.1", "urllib3": "2.3.0", "charset_normalizer": "3.4.1", "idna": "3.10", - "certifi": "2024.12.14", "requests": "2.32.3", "requests_mock": "1.12.1", "psutil": - "6.0.0", "packaging": "24.2", "wrapt": "1.17.2", "deprecated": "1.2.15", "importlib_metadata": - "8.5.0", "zipp": "3.21.0", "opentelemetry.sdk": "1.29.0", "tenacity": "8.5.0", - "langchain_core": "0.2.43", "pydantic": "2.10.5", "pydantic_core": "2.27.2", - "annotated_types": "0.7.0", "langsmith": "0.1.147", "requests_toolbelt": "1.0.0", - "attrs": "24.3.0", "outcome": "1.3.0.post0", "sortedcontainers": "2.4.0", "trio": - "0.28.0", "h11": "0.14.0", "h2": "4.1.0", "hyperframe": "6.0.1", "hpack": "4.0.0", - "httpcore": "1.0.7", "click": "8.1.8", "pygments": "2.19.1", "rich": "13.9.4", - "httpx": "0.27.2", "orjson": "3.10.14", "jsonpointer": "3.0.0", "jsonpatch": - "1.33", "langchain": "0.2.17", "agentops": "0.3.21", "distro": "1.9.0", "jiter": - "0.8.2", "openai": "1.59.7", "multidict": "6.1.0", "propcache": "0.2.1", "yarl": - "1.18.3", "async_timeout": "5.0.1", "aiohappyeyeballs": "2.4.4", "frozenlist": - "1.5.0", "aiosignal": "1.3.2", "aiohttp": "3.11.11", "regex": "2024.11.6", "tiktoken": - "0.8.0", "tokenizers": "0.21.0", "markupsafe": "3.0.2", "jinja2": "3.1.5", "litellm": - "1.58.2", "anthropic": "0.43.0", "sentencepiece": "0.2.0", "ai21_tokenizer": - "0.12.0", "ai21": "3.0.1", "httpx_sse": "0.4.0", "fastavro": "1.10.0", "cohere": - "5.13.8", "groq": "0.15.0", "mypy_extensions": "1.0.0", "typing_inspect": "0.9.0", - "mistralai": "1.3.1", "websockets": "14.1", "diskcache": "5.6.3", "docker": - "7.1.0", "google.api_core": "2.24.0", "ollama": "0.4.6", "numpy": "1.26.4", - "pytz": "2024.2", "pyarrow": "19.0.0", "six": "1.17.0", "pandas": "2.2.3", "flaml": - "2.3.3", "autogen": "0.3.2"}}, "OS": {"Hostname": "HawK-X-MBP.local", "OS": - "Darwin", "OS Version": "Darwin Kernel Version 24.2.0: Fri Dec 6 18:56:34 PST - 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6020", "OS Release": "24.2.0"}, "CPU": - {"Physical cores": 12, "Total cores": 12, "CPU Usage": "46.8%"}, "RAM": {"Total": - "32.00 GB", "Available": "5.82 GB", "Used": "9.81 GB", "Percentage": "81.8%"}, - "Disk": {"/dev/disk3s1s1": {"Mountpoint": "/", "Total": "926.35 GB", "Used": - "10.43 GB", "Free": "507.02 GB", "Percentage": "2.0%"}, "/dev/disk3s6": {"Mountpoint": - "/System/Volumes/VM", "Total": "926.35 GB", "Used": "41.00 GB", "Free": "507.02 - GB", "Percentage": "7.5%"}, "/dev/disk3s2": {"Mountpoint": "/System/Volumes/Preboot", - "Total": "926.35 GB", "Used": "6.36 GB", "Free": "507.02 GB", "Percentage": - "1.2%"}, "/dev/disk3s4": {"Mountpoint": "/System/Volumes/Update", "Total": "926.35 - GB", "Used": "0.00 GB", "Free": "507.02 GB", "Percentage": "0.0%"}, "/dev/disk1s2": - {"Mountpoint": "/System/Volumes/xarts", "Total": "0.49 GB", "Used": "0.01 GB", - "Free": "0.47 GB", "Percentage": "1.2%"}, "/dev/disk1s1": {"Mountpoint": "/System/Volumes/iSCPreboot", - "Total": "0.49 GB", "Used": "0.01 GB", "Free": "0.47 GB", "Percentage": "1.1%"}, - "/dev/disk1s3": {"Mountpoint": "/System/Volumes/Hardware", "Total": "0.49 GB", - "Used": "0.00 GB", "Free": "0.47 GB", "Percentage": "0.6%"}, "/dev/disk3s5": - {"Mountpoint": "/System/Volumes/Data", "Total": "926.35 GB", "Used": "360.38 - GB", "Free": "507.02 GB", "Percentage": "41.5%"}, "/dev/disk5s1": {"Mountpoint": - "/Library/Developer/CoreSimulator/Cryptex/Images/bundle/SimRuntimeBundle-B4E5023D-40BB-40DD-AAE6-1286B3994E15", - "Total": "8.24 GB", "Used": "7.97 GB", "Free": "0.24 GB", "Percentage": "97.1%"}, - "/dev/disk7s1": {"Mountpoint": "/Library/Developer/CoreSimulator/Volumes/iOS_22B81", - "Total": "18.13 GB", "Used": "17.63 GB", "Free": "0.46 GB", "Percentage": "97.5%"}, - "/dev/disk3s3": {"Mountpoint": "/Volumes/Recovery", "Total": "926.35 GB", "Used": - "0.96 GB", "Free": "507.02 GB", "Percentage": "0.2%"}}, "Installed Packages": - {"Installed Packages": {"agentops": "0.3.21", "pytest-recording": "0.13.2", - "shellingham": "1.5.4", "anthropic": "0.43.0", "opentelemetry-instrumentation": - "0.50b0", "langchain-experimental": "0.0.65", "opentelemetry-api": "1.29.0", - "coloredlogs": "15.0.1", "chromadb": "0.4.24", "humanfriendly": "10.0", "hyperframe": - "6.0.1", "Pygments": "2.19.1", "pandas": "2.2.3", "coverage": "7.6.10", "tomli": - "2.2.1", "opentelemetry-proto": "1.29.0", "importlib_metadata": "8.5.0", "async-timeout": - "5.0.1", "pypdf": "4.3.1", "filelock": "3.16.1", "idna": "3.10", "h2": "4.1.0", - "pytest-cov": "6.0.0", "pyasn1_modules": "0.4.1", "termcolor": "2.4.0", "diskcache": - "5.6.3", "multidict": "6.1.0", "outcome": "1.3.0.post0", "langchain-core": "0.2.43", - "fastapi": "0.115.6", "grpc-google-iam-v1": "0.14.0", "huggingface-hub": "0.27.1", - "docx2txt": "0.8", "overrides": "7.7.0", "colorama": "0.4.6", "uvicorn": "0.34.0", - "opentelemetry-util-http": "0.50b0", "tokenizers": "0.21.0", "lancedb": "0.18.0", - "zipp": "3.21.0", "pyfakefs": "5.7.4", "typer": "0.15.1", "fancycompleter": - "0.9.1", "qdrant-client": "1.12.1", "google-cloud-resource-manager": "1.14.0", - "rich-toolkit": "0.13.2", "schema": "0.7.7", "flatbuffers": "24.12.23", "opentelemetry-exporter-otlp-proto-grpc": - "1.29.0", "pytest-asyncio": "0.25.2", "crewai-tools": "0.17.0", "langchain-cohere": - "0.1.9", "referencing": "0.35.1", "googleapis-common-protos": "1.66.0", "selenium": - "4.27.1", "requests": "2.32.3", "frozenlist": "1.5.0", "dnspython": "2.7.0", - "httpx-sse": "0.4.0", "opentelemetry-instrumentation-fastapi": "0.50b0", "shapely": - "2.0.6", "mem0ai": "0.1.44", "soupsieve": "2.6", "google-api-core": "2.24.0", - "json_repair": "0.25.3", "markdown-it-py": "3.0.0", "pytest": "8.3.4", "litellm": - "1.58.2", "httpx": "0.27.2", "sympy": "1.13.3", "FLAML": "2.3.3", "mypy-extensions": - "1.0.0", "h11": "0.14.0", "langchain-openai": "0.1.25", "networkx": "3.4.2", - "google-cloud-aiplatform": "1.77.0", "opentelemetry-sdk": "1.29.0", "pytest-sugar": - "1.0.0", "autogen": "0.3.2", "typing-inspect": "0.9.0", "pyrepl": "0.9.0", "PySocks": - "1.7.1", "google-cloud-bigquery": "3.28.0", "iniconfig": "2.0.0", "rich": "13.9.4", - "opentelemetry-instrumentation-asgi": "0.50b0", "google-resumable-media": "2.7.2", - "tqdm": "4.67.1", "urllib3": "2.3.0", "Mako": "1.3.8", "hpack": "4.0.0", "protobuf": - "5.29.3", "ollama": "0.4.6", "exceptiongroup": "1.2.2", "jsonpatch": "1.33", - "click": "8.1.8", "jsonpointer": "3.0.0", "grpcio-tools": "1.69.0", "numpy": - "1.26.4", "docstring_parser": "0.16", "kubernetes": "31.0.0", "grpcio-status": - "1.69.0", "appdirs": "1.4.4", "aiohttp": "3.11.11", "jsonschema": "4.23.0", - "google-crc32c": "1.6.0", "opentelemetry-semantic-conventions": "0.50b0", "ruff": - "0.9.1", "propcache": "0.2.1", "pyasn1": "0.6.1", "Jinja2": "3.1.5", "cachetools": - "5.5.0", "portalocker": "2.10.1", "asgiref": "3.8.1", "dataclasses-json": "0.6.7", - "oauthlib": "3.2.2", "psutil": "6.0.0", "pylance": "0.22.0", "vcrpy": "7.0.0", - "python-dotenv": "1.0.1", "chroma-hnswlib": "0.7.3", "regex": "2024.11.6", "orjson": - "3.10.14", "fsspec": "2024.12.0", "anyio": "4.8.0", "crewai": "0.51.1", "sniffio": - "1.3.1", "nodeenv": "1.9.1", "google-cloud-storage": "2.19.0", "jsonschema-specifications": - "2024.10.1", "cohere": "5.13.8", "fastapi-cli": "0.0.7", "marshmallow": "3.25.1", - "mdurl": "0.1.2", "fastavro": "1.10.0", "python-dateutil": "2.9.0.post0", "mpmath": - "1.3.0", "opentelemetry-exporter-otlp-proto-common": "1.29.0", "build": "1.2.2.post1", - "types-requests": "2.32.0.20241016", "pytz": "2024.2", "yarl": "1.18.3", "charset-normalizer": - "3.4.1", "jsonref": "1.1.0", "sortedcontainers": "2.4.0", "mistralai": "1.3.1", - "rsa": "4.9", "Deprecated": "1.2.15", "packaging": "24.2", "ai21-tokenizer": - "0.12.0", "pyright": "1.1.392.post0", "grpcio": "1.69.0", "tenacity": "8.5.0", - "pulsar-client": "3.5.0", "trio-websocket": "0.11.1", "pydantic_core": "2.27.2", - "parameterized": "0.9.0", "httpcore": "1.0.7", "trio": "0.28.0", "embedchain": - "0.1.122", "websockets": "14.1", "pluggy": "1.5.0", "future-fstrings": "1.2.0", - "python-multipart": "0.0.20", "starlette": "0.41.3", "langchain-text-splitters": - "0.2.4", "google-cloud-core": "2.4.1", "mypy": "1.14.1", "alembic": "1.14.0", - "deprecation": "2.1.0", "distro": "1.9.0", "SQLAlchemy": "2.0.37", "jiter": - "0.8.2", "jsonpath-python": "1.0.6", "onnxruntime": "1.20.1", "pydantic-settings": - "2.7.1", "bcrypt": "4.2.1", "requests-toolbelt": "1.0.0", "wrapt": "1.17.2", - "docker": "7.1.0", "httptools": "0.6.4", "proto-plus": "1.25.0", "aiosignal": - "1.3.2", "typing_extensions": "4.12.2", "wmctrl": "0.5", "PyYAML": "6.0.2", - "setuptools": "75.8.0", "rpds-py": "0.22.3", "attrs": "24.3.0", "groq": "0.15.0", - "watchfiles": "1.0.4", "sentencepiece": "0.2.0", "ai21": "3.0.1", "email_validator": - "2.2.0", "monotonic": "1.6", "backoff": "2.2.1", "pdbpp": "0.10.3", "pytube": - "15.0.0", "langchain-community": "0.2.19", "posthog": "3.8.3", "tzdata": "2024.2", - "pytest-mock": "3.14.0", "tiktoken": "0.8.0", "openai": "1.59.7", "pyproject_hooks": - "1.2.0", "google-auth": "2.37.0", "beautifulsoup4": "4.12.3", "uvloop": "0.21.0", - "aiohappyeyeballs": "2.4.4", "instructor": "1.3.3", "langchain": "0.2.17", "annotated-types": - "0.7.0", "certifi": "2024.12.14", "wsproto": "1.2.0", "mmh3": "5.0.1", "eval_type_backport": - "0.2.2", "PyPika": "0.48.9", "gptcache": "0.1.44", "pysbd": "0.3.4", "pydantic": - "2.10.5", "six": "1.17.0", "pytest-depends": "1.0.1", "opentelemetry-exporter-otlp-proto-http": - "1.29.0", "langsmith": "0.1.147", "requests-oauthlib": "2.0.0", "importlib_resources": - "6.5.2", "durationpy": "0.9", "requests-mock": "1.12.1", "tabulate": "0.9.0", - "pyarrow": "19.0.0", "websocket-client": "1.8.0", "MarkupSafe": "3.0.2"}}, "Project - Working Directory": {"Project Working Directory": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops"}, - "Virtual Environment": {"Virtual Environment": "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/agentops/.venv"}}, - "config": "", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiYWQ3OTc0MTItMTBkMy00NGI5LTgwNWYtNWMxYTkyMTk2YTg1IiwiZXhwIjoxNzM3MTQ2NTY2LjcyODQ5MX0.5wAq8jTsb-0Sq8VlfHqlAJBfkRTX2oT2zVDNPQg0Tj0", - "_lock": "", "_end_session_lock": "", "token_cost": "", "_session_url": "", - "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, - "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": - ""}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11101' - Content-Type: - - application/json; charset=UTF-8 - Keep-Alive: - - timeout=10, max=1000 - User-Agent: - - python-requests/2.32.3 - authorization: - - REDACTED - x-agentops-api-key: - - REDACTED - method: POST - uri: https://api.agentops.ai/v2/update_session - response: - body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=ad797412-10d3-44b9-805f-5c1a92196a85","status":"success","token_cost":"0.00"}' - headers: - Content-Length: - - '138' - Content-Type: - - application/json - Date: - - Thu, 16 Jan 2025 20:42:48 GMT - Server: - - railway-edge - X-Railway-Request-Id: - - REDACTED - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integration/test_partners.py b/tests/integration/test_partners.py index c9696ea7b..b6aaf5798 100644 --- a/tests/integration/test_partners.py +++ b/tests/integration/test_partners.py @@ -3,71 +3,50 @@ @pytest.mark.usefixtures("agentops_session") @pytest.mark.vcr -def test_autogen_logger_init(autogen_logger): - """Test AutogenLogger initialization""" +def test_autogen(autogen_logger, math_agents): + """Test complete AutogenLogger integration with math agents""" + # 1. Verify logger initialization assert isinstance(autogen_logger, AutogenLogger) assert hasattr(autogen_logger, 'start') assert hasattr(autogen_logger, 'stop') assert hasattr(autogen_logger, 'get_connection') -@pytest.mark.usefixtures("agentops_session") -@pytest.mark.vcr -def test_autogen_logger_session_flow(autogen_logger, math_agents): - """Test complete session flow with AutogenLogger""" user_proxy, assistant = math_agents - + + # 2. Test basic calculation and agent registration user_proxy.initiate_chat( assistant, message="What is 2 + 2?", ) - # Check that events were logged through the logger's methods - assert len(autogen_logger.agent_store) > 0 # Agents were registered + # Verify agent registration + assert len(autogen_logger.agent_store) > 0 assert any(agent["autogen_id"] == str(id(user_proxy)) for agent in autogen_logger.agent_store) assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) -@pytest.mark.usefixtures("agentops_session") -@pytest.mark.vcr -def test_math_agent_tool_usage(autogen_logger, math_agents): - """Test math agent tool usage tracking""" - user_proxy, assistant = math_agents - + # 3. Test complex calculation with tool usage user_proxy.initiate_chat( assistant, message="What is (1423 - 123) / 3 + (32 + 23) * 5?", ) - # Check that tool usage was logged - assert len(autogen_logger.agent_store) > 0 + # Verify tool usage logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) -@pytest.mark.usefixtures("agentops_session") -@pytest.mark.vcr -def test_math_agent_error_handling(autogen_logger, math_agents): - """Test math agent error handling""" - user_proxy, assistant = math_agents - - # The assistant should handle invalid operators gracefully + # 4. Test error handling user_proxy.initiate_chat( assistant, message="What is 123 @ 456?", ) - # Check that error was logged - assert len(autogen_logger.agent_store) > 0 + # Verify error logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) -@pytest.mark.usefixtures("agentops_session") -@pytest.mark.vcr -def test_math_agent_termination(autogen_logger, math_agents): - """Test math agent termination""" - user_proxy, assistant = math_agents - + # 5. Test termination user_proxy.initiate_chat( assistant, message="What is 1 + 1? Return TERMINATE when done.", ) - # Check that termination was logged - assert len(autogen_logger.agent_store) > 0 + # Verify termination logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) From f98497fa88d6d60a7f203e146647c4458ce49644 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 03:32:11 +0530 Subject: [PATCH 07/25] update vcr config to handle dynamic body content in autogen integration test --- tests/fixtures/vcr.py | 56 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 48912ed0e..8c46906ce 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -1,5 +1,6 @@ import pytest from pathlib import Path +import json @pytest.fixture(scope="session") @@ -85,13 +86,6 @@ def vcr_config(): ("x-debug-trace-id", "REDACTED") ] - def before_record_request(request): - """Filter sensitive data from request body""" - if request.body: - # Don't match on dynamic fields in the request body - request.body = None - return request - def filter_response_headers(response): """Filter sensitive headers from response.""" headers = response["headers"] @@ -104,11 +98,55 @@ def filter_response_headers(response): return response + def scrub_request_body(request): + """Scrub sensitive and dynamic data from request body.""" + if request.body: + try: + body_dict = json.loads(request.body) + + # Handle session creation/update requests + if request.uri.endswith('/v2/create_session') or request.uri.endswith('/v2/update_session'): + if 'session' in body_dict: + session = body_dict['session'] + # Standardize session fields + session['session_id'] = 'SESSION_ID' + session['init_timestamp'] = 'TIMESTAMP' + session['end_timestamp'] = 'TIMESTAMP' + session['jwt'] = 'JWT_TOKEN' + + # Minimize host_env to essential fields only + if 'host_env' in session: + session['host_env'] = { + 'SDK': { + 'AgentOps SDK Version': session['host_env']['SDK'].get('AgentOps SDK Version') + }, + 'OS': { + 'OS': session['host_env']['OS'].get('OS') + } + } + + # Reset dynamic counts and states + session['event_counts'] = { + 'llms': 0, 'tools': 0, 'actions': 0, + 'errors': 0, 'apis': 0 + } + session['is_running'] = False + + # Handle agent creation requests + if request.uri.endswith('/v2/create_agent'): + if 'id' in body_dict: + body_dict['id'] = 'AGENT_ID' + + request.body = json.dumps(body_dict).encode() + except (json.JSONDecodeError, AttributeError): + pass + return request + return { # Basic VCR configuration "serializer": "yaml", "cassette_library_dir": str(vcr_cassettes), - "match_on": ["uri", "method"], + "match_on": ["uri", "method", "body"], "record_mode": "once", "ignore_localhost": True, "ignore_hosts": [ @@ -121,10 +159,10 @@ def filter_response_headers(response): ], # Header filtering for requests and responses "filter_headers": sensitive_headers, - "before_record_request": before_record_request, "before_record_response": filter_response_headers, # Add these new options "decode_compressed_response": True, "record_on_exception": False, "allow_playback_repeats": True, + "before_record_request": scrub_request_body, } From 1b09285891861f248edeb74c0172d91c1cd93580 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 03:32:32 +0530 Subject: [PATCH 08/25] re-record autogen cassette after new vcr config --- tests/fixtures/recordings/test_autogen.yaml | 38 ++++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/fixtures/recordings/test_autogen.yaml b/tests/fixtures/recordings/test_autogen.yaml index fc0debc82..114a1cf13 100644 --- a/tests/fixtures/recordings/test_autogen.yaml +++ b/tests/fixtures/recordings/test_autogen.yaml @@ -1,6 +1,12 @@ interactions: - request: - body: null + body: '{"session": {"end_timestamp": "TIMESTAMP", "end_state": "Indeterminate", + "session_id": "SESSION_ID", "init_timestamp": "TIMESTAMP", "tags": [], "video": + null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps SDK Version": + "0.3.21"}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": + "", "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": + {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, "is_running": + false}}' headers: Accept: - '*/*' @@ -9,7 +15,7 @@ interactions: Connection: - keep-alive Content-Length: - - '10803' + - '10906' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -22,14 +28,14 @@ interactions: uri: https://api.agentops.ai/v2/create_session response: body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiMTcwNjg5ZjAtZTI4MS00ODdjLTkzMTctOWExOTU3ZDc4OWJmIiwiZXhwIjoxNzM3MTQ2ODk1Ljc5OTY0fQ.K38gltvALNeeUckcFDPRfPaO3NOVzdbiShZF86xutTY","session_url":"https://app.agentops.ai/drilldown?session_id=170689f0-e281-487c-9317-9a1957d789bf","status":"Success"}' + string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNTU4ZjExMTUtYjMzMi00MGIyLWIyMTctYTUxYjRkOGE0ZGFjIiwiZXhwIjoxNzM3MTUxMjU3LjI4MzI2OX0.auKxEgxG6x148MSNV3wgm2H5SZ7wtq7RfFxjr9NnkxI","session_url":"https://app.agentops.ai/drilldown?session_id=558f1115-b332-40b2-b217-a51b4d8a4dac","status":"Success"}' headers: Content-Length: - - '310' + - '311' Content-Type: - application/json Date: - - Thu, 16 Jan 2025 20:48:15 GMT + - Thu, 16 Jan 2025 22:00:57 GMT Server: - railway-edge X-Railway-Request-Id: @@ -38,7 +44,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"id": "AGENT_ID", "name": "user_proxy"}' headers: Accept: - '*/*' @@ -69,7 +75,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 20:48:16 GMT + - Thu, 16 Jan 2025 22:00:58 GMT Server: - railway-edge X-Railway-Request-Id: @@ -78,7 +84,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"id": "AGENT_ID", "name": "assistant"}' headers: Accept: - '*/*' @@ -109,7 +115,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 20:48:16 GMT + - Thu, 16 Jan 2025 22:00:58 GMT Server: - railway-edge X-Railway-Request-Id: @@ -118,7 +124,13 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"session": {"end_timestamp": "TIMESTAMP", "end_state": "Indeterminate", + "session_id": "SESSION_ID", "init_timestamp": "TIMESTAMP", "tags": [], "video": + null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps SDK Version": + "0.3.21"}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": + "", "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": + {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, "is_running": + false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": ""}}' headers: Accept: - '*/*' @@ -127,7 +139,7 @@ interactions: Connection: - keep-alive Content-Length: - - '11101' + - '11205' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -142,14 +154,14 @@ interactions: uri: https://api.agentops.ai/v2/update_session response: body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=170689f0-e281-487c-9317-9a1957d789bf","status":"success","token_cost":"0.00"}' + string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=558f1115-b332-40b2-b217-a51b4d8a4dac","status":"success","token_cost":"0.00"}' headers: Content-Length: - '138' Content-Type: - application/json Date: - - Thu, 16 Jan 2025 20:48:17 GMT + - Thu, 16 Jan 2025 22:00:59 GMT Server: - railway-edge X-Railway-Request-Id: From 53129be5e1d3728a0949de7139318b39ea4d1483 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 04:26:23 +0530 Subject: [PATCH 09/25] Add code to redact jwt in response body --- tests/fixtures/vcr.py | 88 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 8c46906ce..80f9120af 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -86,28 +86,82 @@ def vcr_config(): ("x-debug-trace-id", "REDACTED") ] + def redact_jwt_recursive(obj): + """Recursively redact JWT tokens from dict/list structures.""" + if obj is None: + return obj + + if isinstance(obj, dict): + for key, value in obj.items(): + if isinstance(key, str) and ('jwt' in key.lower()): + obj[key] = 'REDACTED' + elif isinstance(value, str) and 'eyJ' in value: # JWT tokens start with 'eyJ' + obj[key] = 'REDACTED_JWT' + else: + redact_jwt_recursive(value) + elif isinstance(obj, list): + for item in obj: + redact_jwt_recursive(item) + return obj + def filter_response_headers(response): - """Filter sensitive headers from response.""" - headers = response["headers"] - headers_lower = {k.lower(): k for k in headers} + """Filter sensitive headers and body content from response.""" + if not isinstance(response, dict): + raise ValueError("Response must be a dictionary") + + # Filter headers + headers = response.get("headers", {}) + if headers: + headers_lower = {k.lower(): k for k in headers} + + for header, replacement in sensitive_headers: + header_lower = header.lower() + if header_lower in headers_lower: + headers[headers_lower[header_lower]] = [replacement] - for header, replacement in sensitive_headers: - header_lower = header.lower() - if header_lower in headers_lower: - headers[headers_lower[header_lower]] = [replacement] + # Filter response body + if "body" in response and isinstance(response["body"], dict): + body_content = response["body"].get("string") + if body_content is not None: + try: + # Handle JSON response bodies + if isinstance(body_content, bytes): + body_str = body_content.decode('utf-8') + else: + body_str = str(body_content) + + try: + body = json.loads(body_str) + body = redact_jwt_recursive(body) + response["body"]["string"] = json.dumps(body).encode('utf-8') + except json.JSONDecodeError: + # If not JSON, handle as plain text + import re + jwt_pattern = r'eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+' + body_str = re.sub(jwt_pattern, 'REDACTED_JWT', body_str) + response["body"]["string"] = body_str.encode('utf-8') + except (AttributeError, UnicodeDecodeError) as e: + raise ValueError(f"Failed to process response body: {str(e)}") return response def scrub_request_body(request): """Scrub sensitive and dynamic data from request body.""" + if not request or not hasattr(request, 'body'): + raise ValueError("Invalid request object") + if request.body: try: body_dict = json.loads(request.body) + if not isinstance(body_dict, dict): + raise ValueError("Request body must be a JSON object") + + body_dict = redact_jwt_recursive(body_dict) # Handle session creation/update requests - if request.uri.endswith('/v2/create_session') or request.uri.endswith('/v2/update_session'): - if 'session' in body_dict: - session = body_dict['session'] + if request.uri and (request.uri.endswith('/v2/create_session') or request.uri.endswith('/v2/update_session')): + session = body_dict.get('session') + if session and isinstance(session, dict): # Standardize session fields session['session_id'] = 'SESSION_ID' session['init_timestamp'] = 'TIMESTAMP' @@ -115,13 +169,14 @@ def scrub_request_body(request): session['jwt'] = 'JWT_TOKEN' # Minimize host_env to essential fields only - if 'host_env' in session: + host_env = session.get('host_env') + if host_env and isinstance(host_env, dict): session['host_env'] = { 'SDK': { - 'AgentOps SDK Version': session['host_env']['SDK'].get('AgentOps SDK Version') + 'AgentOps SDK Version': host_env.get('SDK', {}).get('AgentOps SDK Version') }, 'OS': { - 'OS': session['host_env']['OS'].get('OS') + 'OS': host_env.get('OS', {}).get('OS') } } @@ -133,13 +188,14 @@ def scrub_request_body(request): session['is_running'] = False # Handle agent creation requests - if request.uri.endswith('/v2/create_agent'): + if request.uri and request.uri.endswith('/v2/create_agent'): if 'id' in body_dict: body_dict['id'] = 'AGENT_ID' request.body = json.dumps(body_dict).encode() - except (json.JSONDecodeError, AttributeError): - pass + except (json.JSONDecodeError, AttributeError, UnicodeDecodeError) as e: + raise ValueError(f"Failed to process request body: {str(e)}") + return request return { From f1e29325dd3999413e5658fd8c26d26652a625d8 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 04:26:32 +0530 Subject: [PATCH 10/25] re-record autogen cassette --- tests/fixtures/recordings/test_autogen.yaml | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/fixtures/recordings/test_autogen.yaml b/tests/fixtures/recordings/test_autogen.yaml index 114a1cf13..e95742157 100644 --- a/tests/fixtures/recordings/test_autogen.yaml +++ b/tests/fixtures/recordings/test_autogen.yaml @@ -3,8 +3,8 @@ interactions: body: '{"session": {"end_timestamp": "TIMESTAMP", "end_state": "Indeterminate", "session_id": "SESSION_ID", "init_timestamp": "TIMESTAMP", "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps SDK Version": - "0.3.21"}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": - "", "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": + null}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": "", + "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, "is_running": false}}' headers: @@ -15,7 +15,7 @@ interactions: Connection: - keep-alive Content-Length: - - '10906' + - '9451' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -28,14 +28,15 @@ interactions: uri: https://api.agentops.ai/v2/create_session response: body: - string: '{"jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uX2lkIjoiNTU4ZjExMTUtYjMzMi00MGIyLWIyMTctYTUxYjRkOGE0ZGFjIiwiZXhwIjoxNzM3MTUxMjU3LjI4MzI2OX0.auKxEgxG6x148MSNV3wgm2H5SZ7wtq7RfFxjr9NnkxI","session_url":"https://app.agentops.ai/drilldown?session_id=558f1115-b332-40b2-b217-a51b4d8a4dac","status":"Success"}' + string: '{"jwt": "REDACTED", "session_url": "https://app.agentops.ai/drilldown?session_id=30292ac3-e0bf-4880-a5b8-116aada31960", + "status": "Success"}' headers: Content-Length: - '311' Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:00:57 GMT + - Thu, 16 Jan 2025 22:54:16 GMT Server: - railway-edge X-Railway-Request-Id: @@ -75,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:00:58 GMT + - Thu, 16 Jan 2025 22:54:17 GMT Server: - railway-edge X-Railway-Request-Id: @@ -115,7 +116,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:00:58 GMT + - Thu, 16 Jan 2025 22:54:18 GMT Server: - railway-edge X-Railway-Request-Id: @@ -127,8 +128,8 @@ interactions: body: '{"session": {"end_timestamp": "TIMESTAMP", "end_state": "Indeterminate", "session_id": "SESSION_ID", "init_timestamp": "TIMESTAMP", "tags": [], "video": null, "end_state_reason": null, "host_env": {"SDK": {"AgentOps SDK Version": - "0.3.21"}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": - "", "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": + null}, "OS": {"OS": "Darwin"}}, "config": "", "jwt": "JWT_TOKEN", "_lock": "", + "_end_session_lock": "", "token_cost": "", "_session_url": "", "event_counts": {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0}, "is_running": false, "_tracer_provider": "", "_otel_tracer": "", "_otel_exporter": ""}}' headers: @@ -139,7 +140,7 @@ interactions: Connection: - keep-alive Content-Length: - - '11205' + - '9750' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -154,14 +155,15 @@ interactions: uri: https://api.agentops.ai/v2/update_session response: body: - string: '{"session_url":"https://app.agentops.ai/drilldown?session_id=558f1115-b332-40b2-b217-a51b4d8a4dac","status":"success","token_cost":"0.00"}' + string: '{"session_url": "https://app.agentops.ai/drilldown?session_id=30292ac3-e0bf-4880-a5b8-116aada31960", + "status": "success", "token_cost": "0.00"}' headers: Content-Length: - '138' Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:00:59 GMT + - Thu, 16 Jan 2025 22:54:18 GMT Server: - railway-edge X-Railway-Request-Id: From 4c81469cc10ed15a5340938a51cc75f18459bcfc Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 04:29:34 +0530 Subject: [PATCH 11/25] update vcr config to handle body response more robustly --- tests/fixtures/vcr.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 80f9120af..9a2d90376 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -162,30 +162,40 @@ def scrub_request_body(request): if request.uri and (request.uri.endswith('/v2/create_session') or request.uri.endswith('/v2/update_session')): session = body_dict.get('session') if session and isinstance(session, dict): - # Standardize session fields + # Standardize all dynamic fields + for key in session: + if key.startswith('_'): # Internal fields + session[key] = '' + elif isinstance(session[key], str): # String fields that might be dynamic + if key not in ['end_state', 'OS']: # Preserve specific fields + session[key] = '' + + # Standardize known fields session['session_id'] = 'SESSION_ID' session['init_timestamp'] = 'TIMESTAMP' session['end_timestamp'] = 'TIMESTAMP' session['jwt'] = 'JWT_TOKEN' + session['token_cost'] = '' + session['_session_url'] = '' - # Minimize host_env to essential fields only - host_env = session.get('host_env') - if host_env and isinstance(host_env, dict): + # Standardize host environment + if 'host_env' in session: session['host_env'] = { - 'SDK': { - 'AgentOps SDK Version': host_env.get('SDK', {}).get('AgentOps SDK Version') - }, - 'OS': { - 'OS': host_env.get('OS', {}).get('OS') - } + 'SDK': {'AgentOps SDK Version': None}, + 'OS': {'OS': session.get('host_env', {}).get('OS', {}).get('OS', 'Darwin')} } - - # Reset dynamic counts and states + + # Reset all counters and states session['event_counts'] = { 'llms': 0, 'tools': 0, 'actions': 0, 'errors': 0, 'apis': 0 } session['is_running'] = False + + # Clear any dynamic lists + session['tags'] = [] + session['video'] = None + session['end_state_reason'] = None # Handle agent creation requests if request.uri and request.uri.endswith('/v2/create_agent'): From b7f761e5dfaa5ea04525f972660488af65d74476 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Fri, 17 Jan 2025 04:29:45 +0530 Subject: [PATCH 12/25] re-record autogen cassette (again) --- tests/fixtures/recordings/test_autogen.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fixtures/recordings/test_autogen.yaml b/tests/fixtures/recordings/test_autogen.yaml index e95742157..da2a00d42 100644 --- a/tests/fixtures/recordings/test_autogen.yaml +++ b/tests/fixtures/recordings/test_autogen.yaml @@ -15,7 +15,7 @@ interactions: Connection: - keep-alive Content-Length: - - '9451' + - '12002' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -28,7 +28,7 @@ interactions: uri: https://api.agentops.ai/v2/create_session response: body: - string: '{"jwt": "REDACTED", "session_url": "https://app.agentops.ai/drilldown?session_id=30292ac3-e0bf-4880-a5b8-116aada31960", + string: '{"jwt": "REDACTED", "session_url": "https://app.agentops.ai/drilldown?session_id=2fc8be5b-2176-49e8-9969-49fb3c951700", "status": "Success"}' headers: Content-Length: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:54:16 GMT + - Thu, 16 Jan 2025 22:58:43 GMT Server: - railway-edge X-Railway-Request-Id: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:54:17 GMT + - Thu, 16 Jan 2025 22:58:44 GMT Server: - railway-edge X-Railway-Request-Id: @@ -116,7 +116,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:54:18 GMT + - Thu, 16 Jan 2025 22:58:45 GMT Server: - railway-edge X-Railway-Request-Id: @@ -140,7 +140,7 @@ interactions: Connection: - keep-alive Content-Length: - - '9750' + - '12301' Content-Type: - application/json; charset=UTF-8 Keep-Alive: @@ -155,7 +155,7 @@ interactions: uri: https://api.agentops.ai/v2/update_session response: body: - string: '{"session_url": "https://app.agentops.ai/drilldown?session_id=30292ac3-e0bf-4880-a5b8-116aada31960", + string: '{"session_url": "https://app.agentops.ai/drilldown?session_id=2fc8be5b-2176-49e8-9969-49fb3c951700", "status": "success", "token_cost": "0.00"}' headers: Content-Length: @@ -163,7 +163,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 16 Jan 2025 22:54:18 GMT + - Thu, 16 Jan 2025 22:58:46 GMT Server: - railway-edge X-Railway-Request-Id: From dd5ed08680de95561059de88d05f5bd3b7857c47 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 15:52:44 +0530 Subject: [PATCH 13/25] add taskweaver in provider integration tests and fix litellm integration test --- pyproject.toml | 1 + tests/fixtures/providers.py | 39 +- .../recordings/test_litellm_provider.yaml | 401 ++++++---- .../recordings/test_taskweaver_provider.yaml | 722 ++++++++++++++++++ tests/integration/test_llm_providers.py | 40 +- 5 files changed, 1055 insertions(+), 148 deletions(-) create mode 100644 tests/fixtures/recordings/test_taskweaver_provider.yaml diff --git a/pyproject.toml b/pyproject.toml index d3f09da22..36e5fb5cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ test = [ # "crewai-tools @ git+https://github.com/crewAIInc/crewAI-tools.git@a14091abb24527c97ccfcc8539d529c8b4559a0f; python_version>='3.10'", # ------------------------------------------------------------------------------------------------------------------------------------ # ;; + "taskweaver @ git+https://github.com/microsoft/TaskWeaver@v0.0.1; python_version>='3.10'", "autogen<0.4.0", "pytest-cov", "fastapi[standard]", diff --git a/tests/fixtures/providers.py b/tests/fixtures/providers.py index b199d5338..e5ab91677 100644 --- a/tests/fixtures/providers.py +++ b/tests/fixtures/providers.py @@ -1,7 +1,9 @@ import os +import json import pytest -from typing import Any, List import litellm +import tempfile +from pathlib import Path from openai import OpenAI from anthropic import Anthropic from ai21 import AI21Client, AsyncAI21Client @@ -10,6 +12,8 @@ from mistralai import Mistral from ai21.models.chat import ChatMessage from dotenv import load_dotenv +from taskweaver.app.app import TaskWeaverApp +from taskweaver.llm import LLMApi load_dotenv() @@ -90,10 +94,39 @@ def litellm_client(): openai_key = os.getenv("OPENAI_API_KEY", "test-api-key") anthropic_key = os.getenv("ANTHROPIC_API_KEY", "test-api-key") - openrouter_key = os.getenv("OPENROUTER_API_KEY", "test-api-key") litellm.openai_key = openai_key litellm.anthropic_key = anthropic_key - litellm.openrouter_key = openrouter_key return litellm + + +@pytest.fixture(scope="function") +def taskweaver_app(): + """Initialize TaskWeaver app with minimal config.""" + # Create a temporary directory for TaskWeaver project + with tempfile.TemporaryDirectory() as temp_dir: + app_dir = Path(temp_dir) + + # Create config file + config_file = app_dir / "taskweaver_config.json" + config = { + "llm.type": "openai", + "llm.api_type": "openai", + "llm.api_key": os.getenv("OPENAI_API_KEY", "test-api-key"), + "llm.api_base": "https://api.openai.com/v1", + "llm.model": "gpt-4o-mini", + } + + with open(config_file, "w") as f: + json.dump(config, f, indent=4) + + # Initialize TaskWeaver app + app = TaskWeaverApp(app_dir=str(app_dir)) + yield app + + +@pytest.fixture +def taskweaver_client(taskweaver_app): + """Get LLM interface from TaskWeaver app.""" + return taskweaver_app.app_injector.get(LLMApi) diff --git a/tests/fixtures/recordings/test_litellm_provider.yaml b/tests/fixtures/recordings/test_litellm_provider.yaml index 09531459f..73ae4b0fe 100644 --- a/tests/fixtures/recordings/test_litellm_provider.yaml +++ b/tests/fixtures/recordings/test_litellm_provider.yaml @@ -29,8 +29,6 @@ interactions: - REDACTED x-stainless-package-version: - 1.59.7 - x-stainless-raw-response: - - 'true' x-stainless-retry-count: - '0' x-stainless-runtime: @@ -41,35 +39,33 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ApjGiJn585luUEit6xN0jw5dKDo2h\",\n \"object\": - \"chat.completion\",\n \"created\": 1736892104,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"Hello! I hope you\u2019re having a - wonderful day. If there\u2019s anything you need or want to talk about, I\u2019m - here to help!\",\n \"refusal\": null\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 22,\n \"completion_tokens\": 30,\n \"total_tokens\": 52,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_72ed7ab54c\"\n}\n" + string: '{"id": "chatcmpl-AqTe330pv7SLEYXnCO181XaS3DkAG", "object": "chat.completion", + "created": 1737070375, "model": "gpt-4o-mini-2024-07-18", "choices": [{"index": + 0, "message": {"role": "assistant", "content": "Hello! I hope this message + finds you well. Wishing you a day filled with positivity and joy!", "refusal": + null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": + 22, "completion_tokens": 22, "total_tokens": 44, "prompt_tokens_details": + {"cached_tokens": 0, "audio_tokens": 0}, "completion_tokens_details": {"reasoning_tokens": + 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": + 0}}, "service_tier": "default", "system_fingerprint": "fp_72ed7ab54c"}' headers: CF-Cache-Status: - DYNAMIC - CF-RAY: REDACTED + CF-RAY: + - REDACTED Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 14 Jan 2025 22:01:46 GMT + - Thu, 16 Jan 2025 23:32:56 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=VZJx_faFj6770ez9UQRJPHiVOar8.rDZHHjgopTXIvI-1736892106-1.0.1.1-pXcK6sMQ1OET.xkYliaYrHl7oD0w1_4M94x_L1O6nolXXWj7vAEf4aQeHngF8o1GrAMIvsmIok3HkQ1tq6cJgA; - path=/; expires=Tue, 14-Jan-25 22:31:46 GMT; domain=.api.openai.com; HttpOnly; + - __cf_bm=lGaQhW4BjRDeXT.6zix6reiEXUeDd_aaNKE1IxS0MWg-1737070376-1.0.1.1-jeCbEYifseE1DCcX8tLSxc4zUrHSiGBqAdcibXJpWyxV3ds5hODd1hALWy4HjBes_upToyOphEl.rR6oGvEYWA; + path=/; expires=Fri, 17-Jan-25 00:02:56 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=i1qHe5Dq7I0tQx8N2yiSC49IpHCpAnBX.8W87TNF3Uk-1736892106225-0.0.1.1-604800000; + - _cfuvid=0cbbyNo9078pru7YpRA_NIGoOsI8oKHqut1xMbYedlY-1737070376012-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None Transfer-Encoding: - chunked @@ -80,230 +76,351 @@ interactions: alt-svc: - h3=":443"; ma=86400 content-length: - - '900' - openai-organization: REDACTED + - '872' + openai-organization: + - REDACTED openai-processing-ms: - - '1148' + - '501' openai-version: - '2020-10-01' strict-transport-security: - max-age=31536000; includeSubDomains; preload - x-ratelimit-limit-requests: REDACTED - x-ratelimit-limit-tokens: REDACTED - x-ratelimit-remaining-requests: REDACTED - x-ratelimit-remaining-tokens: REDACTED - x-ratelimit-reset-requests: REDACTED - x-ratelimit-reset-tokens: REDACTED - x-request-id: REDACTED + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED status: code: 200 message: OK - request: - body: '{"model": "claude-3-5-sonnet-latest", "messages": [{"role": "user", "content": - [{"type": "text", "text": "Write a short greeting."}]}], "system": [{"type": - "text", "text": "You are a helpful assistant."}], "max_tokens": 4096, "stream": - true}' + body: '{"messages": [{"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Write a short greeting."}], "model": "gpt-4o-mini", + "stream": true}' headers: accept: - application/json accept-encoding: - gzip, deflate - anthropic-version: + authorization: - REDACTED connection: - keep-alive content-length: - - '241' + - '173' content-type: - application/json + cookie: + - __cf_bm=lGaQhW4BjRDeXT.6zix6reiEXUeDd_aaNKE1IxS0MWg-1737070376-1.0.1.1-jeCbEYifseE1DCcX8tLSxc4zUrHSiGBqAdcibXJpWyxV3ds5hODd1hALWy4HjBes_upToyOphEl.rR6oGvEYWA; + _cfuvid=0cbbyNo9078pru7YpRA_NIGoOsI8oKHqut1xMbYedlY-1737070376012-0.0.1.1-604800000 host: - - api.anthropic.com + - api.openai.com user-agent: - - litellm/1.58.1 - x-api-key: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: - REDACTED method: POST - uri: https://api.anthropic.com/v1/messages + uri: https://api.openai.com/v1/chat/completions response: body: - string: 'event: message_start + string: 'data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + hope"},"logprobs":null,"finish_reason":null}]} - data: {"type":"message_start","message":{"id":"msg_01NHdXbMbxAY5St4JoFySmKD","type":"message","role":"assistant","model":"claude-3-5-sonnet-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":18,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":1}} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + this"},"logprobs":null,"finish_reason":null}]} - event: content_block_start - data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + message"},"logprobs":null,"finish_reason":null}]} - event: ping + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + finds"},"logprobs":null,"finish_reason":null}]} - data: {"type": "ping"} + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}]} - event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hi"} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + well"},"logprobs":null,"finish_reason":null}]} - event: content_block_delta + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" - there! I hope"} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + W"},"logprobs":null,"finish_reason":null}]} - event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" - you''re having a great day. How can I"} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"ishing"},"logprobs":null,"finish_reason":null}]} - event: content_block_delta + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}]} - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" - help you?"} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} - event: content_block_stop - data: {"type":"content_block_stop","index":0 } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + day"},"logprobs":null,"finish_reason":null}]} - event: message_delta + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + filled"},"logprobs":null,"finish_reason":null}]} - data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":21} } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + with"},"logprobs":null,"finish_reason":null}]} - event: message_stop - data: {"type":"message_stop" } + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + positivity"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + joy"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-AqTe4V9Qjvtq7jxBouSAsv1iI5Qr7","object":"chat.completion.chunk","created":1737070376,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + + + data: [DONE] ' headers: CF-Cache-Status: - DYNAMIC - CF-RAY: REDACTED - Cache-Control: - - no-cache + CF-RAY: + - REDACTED Connection: - keep-alive Content-Type: - text/event-stream; charset=utf-8 Date: - - Tue, 14 Jan 2025 22:01:47 GMT + - Thu, 16 Jan 2025 23:32:56 GMT Server: - cloudflare Transfer-Encoding: - chunked - X-Robots-Tag: - - none - anthropic-ratelimit-input-tokens-limit: - - '400000' - anthropic-ratelimit-input-tokens-remaining: - - '400000' - anthropic-ratelimit-input-tokens-reset: - - '2025-01-14T22:01:47Z' - anthropic-ratelimit-output-tokens-limit: - - '80000' - anthropic-ratelimit-output-tokens-remaining: - - '76000' - anthropic-ratelimit-output-tokens-reset: - - '2025-01-14T22:01:50Z' - anthropic-ratelimit-requests-limit: - - '4000' - anthropic-ratelimit-requests-remaining: - - '3999' - anthropic-ratelimit-requests-reset: - - '2025-01-14T22:01:47Z' - anthropic-ratelimit-tokens-limit: - - '480000' - anthropic-ratelimit-tokens-remaining: - - '476000' - anthropic-ratelimit-tokens-reset: - - '2025-01-14T22:01:47Z' - request-id: - - req_0152ZgzyVZ1evwa14rFvgbPc - via: - - 1.1 google + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + openai-organization: + - REDACTED + openai-processing-ms: + - '245' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED status: code: 200 message: OK - request: - body: '{"messages": [{"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Write a short greeting."}], "model": "deepseek/deepseek-chat"}' + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - identity + Connection: + - keep-alive + X-Amzn-Trace-Id: + - fffbe2d0-d7e0-4307-8af8-10590c47fb4c + authorization: + - REDACTED + user-agent: + - unknown/None; hf_hub/0.27.1; python/3.10.16 + method: HEAD + uri: https://huggingface.co/gpt-4o-mini/resolve/main/tokenizer.json + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - https://huggingface.co + Access-Control-Expose-Headers: + - X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Xet-Access-Token,X-Xet-Token-Expiration,X-Xet-Refresh-Route,X-Xet-Cas-Url,X-Xet-Hash + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - text/plain; charset=utf-8 + Date: + - Thu, 16 Jan 2025 23:32:57 GMT + ETag: + - W/"14-ZYI5tVOD2gG7mWSpjynndpu9W6Y" + Referrer-Policy: + - strict-origin-when-cross-origin + Vary: + - Origin + Via: + - 1.1 687fb42a3f5347130334b2a6a6bfd8ba.cloudfront.net (CloudFront) + X-Amz-Cf-Id: + - d1yMGLR1tCXPsLwQ4CtcN_5bBY8p322B9QSCSn9fOQFGTZ5jQx38Hg== + X-Amz-Cf-Pop: + - DEL54-P7 + X-Cache: + - Error from cloudfront + X-Error-Code: + - RepoNotFound + X-Error-Message: + - Repository not found + X-Powered-By: + - huggingface-moon + X-Request-Id: + - REDACTED + cross-origin-opener-policy: + - same-origin + status: + code: 404 + message: Not Found +- request: + body: '{"model": "claude-3-5-sonnet-latest", "messages": [{"role": "user", "content": + [{"type": "text", "text": "Write a short greeting."}]}], "system": "You are + a helpful assistant.", "max_tokens": 4096}' headers: accept: - application/json accept-encoding: - gzip, deflate - authorization: + anthropic-version: - REDACTED connection: - keep-alive content-length: - - '168' + - '197' content-type: - application/json host: - - openrouter.ai - http-referer: - - https://litellm.ai + - api.anthropic.com user-agent: - - AsyncOpenAI/Python 1.59.7 - x-stainless-arch: - - REDACTED - x-stainless-async: - - REDACTED - x-stainless-lang: - - REDACTED - x-stainless-os: - - REDACTED - x-stainless-package-version: - - 1.59.7 - x-stainless-raw-response: - - 'true' - x-stainless-retry-count: - - '0' - x-stainless-runtime: - - REDACTED - x-stainless-runtime-version: + - python-httpx/0.27.2 + x-api-key: - REDACTED - x-title: - - liteLLM method: POST - uri: https://openrouter.ai/api/v1/chat/completions + uri: https://api.anthropic.com/v1/messages response: body: - string: "\n \n\n \n\n \n\n \n\n \n\n - \ \n\n \n\n \n\n \n\n \n\n \n\n - \ \n\n \n\n \n\n \n{\"id\":\"gen-1736892109-Bw6T8Zz8t3IlUpRWImy8\",\"provider\":\"DeepSeek\",\"model\":\"deepseek/deepseek-chat\",\"object\":\"chat.completion\",\"created\":1736892109,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Hello! - How can I assist you today? \U0001F60A\",\"refusal\":\"\"}}],\"system_fingerprint\":\"fp_3a5770e1b4\",\"usage\":{\"prompt_tokens\":14,\"completion_tokens\":11,\"total_tokens\":25}}" + string: '{"id": "msg_01JuTFUiPmujJcBFg84hoPBB", "type": "message", "role": "assistant", + "model": "claude-3-5-sonnet-20241022", "content": [{"type": "text", "text": + "Hi there! Hope you''re having a great day! How can I help you today?"}], + "stop_reason": "end_turn", "stop_sequence": null, "usage": {"input_tokens": + 18, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0, "output_tokens": + 21}}' headers: - Access-Control-Allow-Origin: - - '*' - CF-RAY: REDACTED + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED Connection: - keep-alive Content-Type: - application/json Date: - - Tue, 14 Jan 2025 22:01:49 GMT + - Thu, 16 Jan 2025 23:32:58 GMT Server: - cloudflare Transfer-Encoding: - chunked - Vary: - - Accept-Encoding + X-Robots-Tag: + - none + anthropic-ratelimit-input-tokens-limit: + - '400000' + anthropic-ratelimit-input-tokens-remaining: + - '400000' + anthropic-ratelimit-input-tokens-reset: + - '2025-01-16T23:32:58Z' + anthropic-ratelimit-output-tokens-limit: + - '80000' + anthropic-ratelimit-output-tokens-remaining: + - '80000' + anthropic-ratelimit-output-tokens-reset: + - '2025-01-16T23:32:58Z' + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2025-01-16T23:32:58Z' + anthropic-ratelimit-tokens-limit: + - '480000' + anthropic-ratelimit-tokens-remaining: + - '480000' + anthropic-ratelimit-tokens-reset: + - '2025-01-16T23:32:58Z' content-length: - - '578' - x-clerk-auth-message: - - Invalid JWT form. A JWT consists of three parts separated by dots. (reason=token-invalid, - token-carrier=header) - x-clerk-auth-reason: - - token-invalid - x-clerk-auth-status: - - signed-out + - '368' + request-id: + - req_01AXEfBj7Nb6rLznqbQU9CLt + via: + - 1.1 google status: code: 200 message: OK diff --git a/tests/fixtures/recordings/test_taskweaver_provider.yaml b/tests/fixtures/recordings/test_taskweaver_provider.yaml new file mode 100644 index 000000000..9b3116143 --- /dev/null +++ b/tests/fixtures/recordings/test_taskweaver_provider.yaml @@ -0,0 +1,722 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You are a Python coding assistant."}, + {"role": "user", "content": "Write a function to calculate factorial. Answer + in the JSON format."}], "model": "gpt-4o-mini", "frequency_penalty": 0.0, "max_tokens": + 200, "presence_penalty": 0.0, "response_format": {"type": "json_object"}, "seed": + 123456, "stop": [""], "stream": true, "temperature": 0, "top_p": 1.0}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '404' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"{\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"function"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + {\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"name"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"factor"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"ial"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\",\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"description"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"Calcul"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"ates"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + factorial"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + of"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + non"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"-negative"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":".\",\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"parameters"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + {\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + {\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"type"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\",\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"description"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"A"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + non"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"-negative"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + which"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + factorial"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + is"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + be"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + calculated"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":".\"\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + }\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + },\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"returns"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + {\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"type"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\",\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"description"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + factorial"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + of"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + input"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":".\"\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + },\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"code"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\":"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + \""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"def"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + factorial"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"(n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"):"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + if"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + <"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"0"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":":\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + raise"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + Value"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"Error"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"(''"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"Input"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + must"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + be"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + non"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"-negative"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + integer"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":".'')"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + elif"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + =="},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"0"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":":\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + return"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + else"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":":\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + result"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + ="},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + i"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + in"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + range"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"("},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + +"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"):"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + result"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + *="},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + i"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + return"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + result"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"\"\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + "},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":" + }\n"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{"content":"}"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-ArMeBiTppL5p2ngIGKQIpFjKGImfm","object":"chat.completion.chunk","created":1737281803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_72ed7ab54c","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Sun, 19 Jan 2025 10:16:43 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=TQTdk3ym87xBylAszHGJArpJMamM0fEhvVFPKszmWEY-1737281803-1.0.1.1-4nJ9Ci_1WgQd89Go2LCSgMgFkumNz.1H9VMyc6vGvOZ7.3GgI77tR4CwpBT3t0BdCUuFpHUcYsFxR1JPPyzdLQ; + path=/; expires=Sun, 19-Jan-25 10:46:43 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=j6zmX6oy_MlFtVDL9PojQlJ0wMQH9Chv5bAqdcWzav8-1737281803873-0.0.1.1-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + openai-organization: + - REDACTED + openai-processing-ms: + - '206' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +version: 1 diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index bf9afc668..214835e89 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -1,6 +1,6 @@ import asyncio -from asyncio import TimeoutError from typing import Any, Dict, List +import json import pytest @@ -261,7 +261,7 @@ def test_litellm_provider(litellm_client, test_messages: List[Dict[str, Any]]): # Stream completion stream_response = litellm_client.completion( - model="anthropic/claude-3-5-sonnet-latest", + model="openai/gpt-4o-mini", messages=test_messages, stream=True, ) @@ -271,7 +271,7 @@ def test_litellm_provider(litellm_client, test_messages: List[Dict[str, Any]]): # Async completion async def async_test(): async_response = await litellm_client.acompletion( - model="openrouter/deepseek/deepseek-chat", + model="anthropic/claude-3-5-sonnet-latest", messages=test_messages, ) return async_response @@ -314,3 +314,37 @@ async def async_test(): async_response = asyncio.run(async_test()) assert async_response["message"]["content"] + + +# TaskWeaver Tests +@pytest.mark.vcr() +def test_taskweaver_provider(taskweaver_client, test_messages): + """Test TaskWeaver provider integration.""" + # Test with code execution messages + code_messages = [ + {"role": "system", "content": "You are a Python coding assistant."}, + {"role": "user", "content": "Write a function to calculate factorial. Answer in the JSON format."} + ] + + response = taskweaver_client.chat_completion( + messages=code_messages, + temperature=0, + max_tokens=200, + top_p=1.0, + ) + + assert isinstance(response, dict) + assert "content" in response + + # Convert 'content' from string to dictionary + content = json.loads(response["content"]) + + assert "function" in content + + assert "name" in content["function"] + assert "description" in content["function"] + assert "parameters" in content["function"] + assert "returns" in content["function"] + assert "code" in content["function"] + + assert "def factorial" in content["function"]["code"] From b5fc7cc000f08a29ec48a595eb1e6748ddbf69b6 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 15:54:20 +0530 Subject: [PATCH 14/25] add taskweaver fixture to conftest --- tests/integration/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index b11d59573..72997fe0c 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -11,6 +11,8 @@ litellm_client, mistral_client, openai_client, + taskweaver_app, + taskweaver_client, test_messages, ) from tests.fixtures.partners import ( From 86d5c6e566ba737cc6175a4fcb1963ca6ada7f74 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 17:41:40 +0530 Subject: [PATCH 15/25] fix `ai21` version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 36e5fb5cd..6adc81867 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ test = [ "anthropic", "cohere", "litellm", - "ai21>=3.0.0", + "ai21>=2.0.0, <3.0.0", "groq", "ollama", "mistralai", From ef3a4d39328b037fc01c92ad65a3807b70d9a839 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 17:52:00 +0530 Subject: [PATCH 16/25] ignore host huggingface.co --- tests/fixtures/vcr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 9a2d90376..e9fb7aa26 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -222,6 +222,7 @@ def scrub_request_body(request): "localhost:4318", # Default OTLP HTTP endpoint "127.0.0.1:4317", "127.0.0.1:4318", + "huggingface.co" ], # Header filtering for requests and responses "filter_headers": sensitive_headers, From 42d90877098cc85487d3544342657e98610182ff Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 18:02:09 +0530 Subject: [PATCH 17/25] add gemini provider integration test --- tests/fixtures/providers.py | 10 ++++++++ tests/fixtures/vcr.py | 2 ++ tests/integration/conftest.py | 1 + tests/integration/test_llm_providers.py | 33 +++++++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/tests/fixtures/providers.py b/tests/fixtures/providers.py index e5ab91677..fe3f80833 100644 --- a/tests/fixtures/providers.py +++ b/tests/fixtures/providers.py @@ -87,6 +87,16 @@ def mistral_client(): api_key = os.getenv("MISTRAL_API_KEY", "test-api-key") return Mistral(api_key=api_key) +@pytest.fixture +def gemini_client(): + """Initialize Google's Gemini client.""" + import google.generativeai as genai + + api_key = os.getenv("GEMINI_API_KEY", "test-api-key") + genai.configure(api_key=api_key) + + return genai.GenerativeModel('gemini-1.5-flash') + @pytest.fixture def litellm_client(): diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index e9fb7aa26..00d143ec5 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -36,6 +36,8 @@ def vcr_config(): ("replicate-api-token", "REDACTED"), ("huggingface-api-key", "REDACTED"), ("x-huggingface-api-key", "REDACTED"), + ("gemini-api-key", "REDACTED"), + ("x-gemini-api-key", "REDACTED"), ("claude-api-key", "REDACTED"), ("x-claude-api-key", "REDACTED"), ("x-railway-request-id", "REDACTED"), diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 72997fe0c..e288c5efc 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -7,6 +7,7 @@ ai21_test_messages, anthropic_client, cohere_client, + gemini_client, groq_client, litellm_client, mistral_client, diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 214835e89..c18b321cc 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -15,6 +15,7 @@ def collect_stream_content(stream_response: Any, provider: str) -> List[str]: "cohere": lambda event: event.text if event.event_type == "text-generation" else None, "ai21": lambda chunk: chunk.choices[0].delta.content, "groq": lambda chunk: chunk.choices[0].delta.content, + "gemini": lambda chunk: chunk.text if hasattr(chunk, "text") else None, "mistral": lambda event: event.data.choices[0].delta.content if hasattr(event.data.choices[0].delta, "content") else None, @@ -196,6 +197,38 @@ def test_cohere_provider(cohere_client): assert len(content) > 0 +# Gemini Tests +@pytest.mark.vcr() +def test_gemini_provider(gemini_client, test_messages): + """Test Gemini provider integration.""" + # Convert messages to Gemini format + gemini_messages = [] + for msg in test_messages: + if msg["role"] != "system": # Gemini doesn't support system messages directly + gemini_messages.append(msg["content"]) + + # Sync completion + response = gemini_client.generate_content(gemini_messages) + assert response.text + + # Stream completion + stream = gemini_client.generate_content( + gemini_messages, + stream=True + ) + + content = collect_stream_content(stream, "gemini") + assert len(content) > 0 + + # Test async completion + async def async_test(): + response = await gemini_client.generate_content_async(gemini_messages) + return response + + async_response = asyncio.run(async_test()) + assert async_response.text + + # Groq Tests @pytest.mark.vcr() def test_groq_provider(groq_client, test_messages: List[Dict[str, Any]]): From 7e8aecd629d44f850d2a3194b62b1e7eacb3f074 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 18:28:36 +0530 Subject: [PATCH 18/25] modify model in groq provider integration test --- tests/integration/test_llm_providers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index c18b321cc..24c6a1892 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -235,14 +235,14 @@ def test_groq_provider(groq_client, test_messages: List[Dict[str, Any]]): """Test Groq provider integration.""" # Sync completion response = groq_client.chat.completions.create( - model="llama3-70b-8192", + model="llama-3.3-70b-versatile", messages=test_messages, ) assert response.choices[0].message.content # Stream completion stream = groq_client.chat.completions.create( - model="llama3-70b-8192", + model="llama-3.3-70b-versatile", messages=test_messages, stream=True, ) From 1c5f06aa0366b26b3cf19f23006b05b29a307306 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Sun, 19 Jan 2025 19:07:48 +0530 Subject: [PATCH 19/25] re-record groq cassette --- .../recordings/test_groq_provider.yaml | 311 ++++++++++++++++-- 1 file changed, 290 insertions(+), 21 deletions(-) diff --git a/tests/fixtures/recordings/test_groq_provider.yaml b/tests/fixtures/recordings/test_groq_provider.yaml index 6b1abd7f1..fbbd1f76f 100644 --- a/tests/fixtures/recordings/test_groq_provider.yaml +++ b/tests/fixtures/recordings/test_groq_provider.yaml @@ -39,15 +39,19 @@ interactions: uri: https://api.groq.com/openai/v1/chat/completions response: body: - string: '{"id":"chatcmpl-2af4c427-2bd9-4cd3-96f6-b606fdbb3861","object":"chat.completion","created":1736892098,"model":"llama3-70b-8192","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! - It''s nice to meet you. I''m here to help with any questions or tasks you - may have. How can I assist you today?"},"logprobs":null,"finish_reason":"stop"}],"usage":{"queue_time":0.01813716,"prompt_tokens":26,"prompt_time":0.006384788,"completion_tokens":31,"completion_time":0.088571429,"total_tokens":57,"total_time":0.094956217},"system_fingerprint":"fp_7ab5f7e105","x_groq":{"id":"req_01jhkdc9s1fkms5t70nkenz0cd"}} - - ' + string: '{"id": "chatcmpl-2af4c427-2bd9-4cd3-96f6-b606fdbb3861", "object": "chat.completion", + "created": 1736892098, "model": "llama3-70b-8192", "choices": [{"index": 0, + "message": {"role": "assistant", "content": "Hello! It''s nice to meet you. + I''m here to help with any questions or tasks you may have. How can I assist + you today?"}, "logprobs": null, "finish_reason": "stop"}], "usage": {"queue_time": + 0.01813716, "prompt_tokens": 26, "prompt_time": 0.006384788, "completion_tokens": + 31, "completion_time": 0.088571429, "total_tokens": 57, "total_time": 0.094956217}, + "system_fingerprint": "fp_7ab5f7e105", "x_groq": {"id": "req_01jhkdc9s1fkms5t70nkenz0cd"}}' headers: CF-Cache-Status: - DYNAMIC - CF-Ray: REDACTED + CF-Ray: + - REDACTED Cache-Control: - private, max-age=0, no-store, no-cache, must-revalidate Connection: @@ -74,13 +78,20 @@ interactions: - '613' x-groq-region: - us-west-1 - x-ratelimit-limit-requests: REDACTED - x-ratelimit-limit-tokens: REDACTED - x-ratelimit-remaining-requests: REDACTED - x-ratelimit-remaining-tokens: REDACTED - x-ratelimit-reset-requests: REDACTED - x-ratelimit-reset-tokens: REDACTED - x-request-id: REDACTED + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED status: code: 200 message: OK @@ -291,7 +302,8 @@ interactions: headers: CF-Cache-Status: - DYNAMIC - CF-Ray: REDACTED + CF-Ray: + - REDACTED Cache-Control: - no-cache Connection: @@ -312,13 +324,270 @@ interactions: - h3=":443"; ma=86400 x-groq-region: - us-west-1 - x-ratelimit-limit-requests: REDACTED - x-ratelimit-limit-tokens: REDACTED - x-ratelimit-remaining-requests: REDACTED - x-ratelimit-remaining-tokens: REDACTED - x-ratelimit-reset-requests: REDACTED - x-ratelimit-reset-tokens: REDACTED - x-request-id: REDACTED + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Write a short greeting."}], "model": "llama-3.3-70b-versatile"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '169' + content-type: + - application/json + host: + - api.groq.com + user-agent: + - Groq/Python 0.15.0 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 0.15.0 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.groq.com/openai/v1/chat/completions + response: + body: + string: '{"id": "chatcmpl-6cf0d6fe-87a0-4e9a-b445-79b2eed47bbc", "object": "chat.completion", + "created": 1737293844, "model": "llama-3.3-70b-versatile", "choices": [{"index": + 0, "message": {"role": "assistant", "content": "Hello, it''s nice to meet + you. Is there something I can help you with today?"}, "logprobs": null, "finish_reason": + "stop"}], "usage": {"queue_time": 0.526516886, "prompt_tokens": 46, "prompt_time": + 0.012112661, "completion_tokens": 20, "completion_time": 0.100698985, "total_tokens": + 66, "total_time": 0.112811646}, "system_fingerprint": "fp_c0cfa69934", "x_groq": + {"id": "req_01jhzcgk0yfc5bbjfyrtt6rsqp"}}' + headers: + CF-Cache-Status: + - DYNAMIC + CF-Ray: + - REDACTED + Cache-Control: + - private, max-age=0, no-store, no-cache, must-revalidate + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sun, 19 Jan 2025 13:37:24 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=qFaVUB5iW1LI..EnEOZABv479cX2NKcnIO9XbHXxzx8-1737293844-1.0.1.1-wjdzMztTACMALQj8o4mZD5Glv6DuRVy4t49YkQqRqrovVwQ5NReNwNn6AMlcKxZGrGc3fOpPRqjizC4SxKHJbQ; + path=/; expires=Sun, 19-Jan-25 14:07:24 GMT; domain=.groq.com; HttpOnly; Secure; + SameSite=None + Transfer-Encoding: + - chunked + Vary: + - Origin, Accept-Encoding + Via: + - 1.1 google + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '581' + x-groq-region: + - us-west-1 + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Write a short greeting."}], "model": "llama-3.3-70b-versatile", + "stream": true}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '185' + content-type: + - application/json + cookie: + - __cf_bm=qFaVUB5iW1LI..EnEOZABv479cX2NKcnIO9XbHXxzx8-1737293844-1.0.1.1-wjdzMztTACMALQj8o4mZD5Glv6DuRVy4t49YkQqRqrovVwQ5NReNwNn6AMlcKxZGrGc3fOpPRqjizC4SxKHJbQ + host: + - api.groq.com + user-agent: + - Groq/Python 0.15.0 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 0.15.0 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.groq.com/openai/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"x_groq":{"id":"req_01jhzcgkx2et2awe1fvd3y4dpw"}} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + it"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":"''s"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + nice"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + meet"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + How"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + can"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + assist"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":" + today"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{"content":"?"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-5cd656da-4c2b-4095-bce3-031986a23761","object":"chat.completion.chunk","created":1737293844,"model":"llama-3.3-70b-versatile","system_fingerprint":"fp_fcc3b74982","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"x_groq":{"id":"req_01jhzcgkx2et2awe1fvd3y4dpw","usage":{"queue_time":0.50562272,"prompt_tokens":46,"prompt_time":0.008745809,"completion_tokens":17,"completion_time":0.061818182,"total_tokens":63,"total_time":0.070563991}}} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-Ray: + - REDACTED + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/event-stream + Date: + - Sun, 19 Jan 2025 13:37:25 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + Vary: + - Origin, Accept-Encoding + Via: + - 1.1 google + alt-svc: + - h3=":443"; ma=86400 + x-groq-region: + - us-west-1 + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED status: code: 200 message: OK From 8fad06d19adeb752864dd1fd0ff0f6adcb5a786c Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 13:56:59 +0530 Subject: [PATCH 20/25] ruff --- agentops/host_env.py | 6 +- agentops/llms/providers/ollama.py | 4 +- tests/fixtures/partners.py | 46 +++++----- tests/fixtures/providers.py | 13 +-- tests/fixtures/vcr.py | 106 ++++++++++++------------ tests/integration/test_llm_providers.py | 21 ++--- tests/integration/test_partners.py | 15 ++-- 7 files changed, 102 insertions(+), 109 deletions(-) diff --git a/agentops/host_env.py b/agentops/host_env.py index 5307dec4a..d3f798b72 100644 --- a/agentops/host_env.py +++ b/agentops/host_env.py @@ -100,9 +100,9 @@ def get_ram_details(): try: ram_info = psutil.virtual_memory() return { - "Total": f"{ram_info.total / (1024 ** 3):.2f} GB", - "Available": f"{ram_info.available / (1024 ** 3):.2f} GB", - "Used": f"{ram_info.used / (1024 ** 3):.2f} GB", + "Total": f"{ram_info.total / (1024**3):.2f} GB", + "Available": f"{ram_info.available / (1024**3):.2f} GB", + "Used": f"{ram_info.used / (1024**3):.2f} GB", "Percentage": f"{ram_info.percent}%", } except: diff --git a/agentops/llms/providers/ollama.py b/agentops/llms/providers/ollama.py index c83a85bc9..ce2a7fc8b 100644 --- a/agentops/llms/providers/ollama.py +++ b/agentops/llms/providers/ollama.py @@ -26,7 +26,7 @@ def handle_stream_chunk(chunk: dict): if chunk.get("done"): llm_event.end_timestamp = get_ISO_time() - llm_event.model = f'ollama/{chunk.get("model")}' + llm_event.model = f"ollama/{chunk.get('model')}" llm_event.returns = chunk llm_event.returns["message"] = llm_event.completion llm_event.prompt = kwargs["messages"] @@ -53,7 +53,7 @@ def generator(): return generator() llm_event.end_timestamp = get_ISO_time() - llm_event.model = f'ollama/{response["model"]}' + llm_event.model = f"ollama/{response['model']}" llm_event.returns = response llm_event.agent_id = check_call_stack_for_agent_id() llm_event.prompt = kwargs["messages"] diff --git a/tests/fixtures/partners.py b/tests/fixtures/partners.py index 83a3dae0e..7dcf8fcac 100644 --- a/tests/fixtures/partners.py +++ b/tests/fixtures/partners.py @@ -3,6 +3,7 @@ from autogen import UserProxyAgent, AssistantAgent, register_function import agentops + @pytest.fixture def autogen_logger(agentops_session): """Fixture for AutogenLogger with auto start/stop.""" @@ -11,12 +12,13 @@ def autogen_logger(agentops_session): yield logger logger.stop() + @pytest.fixture def math_agents(openai_client, autogen_logger): """Math agent group with calculator tool and all configurations.""" # Initialize AgentOps agentops.init() - + # Base configuration for all agents base_config = { "max_consecutive_auto_reply": 0, # Disable auto-reply @@ -26,11 +28,13 @@ def math_agents(openai_client, autogen_logger): # LLM configuration for math assistant llm_config = { - "config_list": [{ - "model": "gpt-4", - "api_key": openai_client.api_key, - "timeout": 10, - }], + "config_list": [ + { + "model": "gpt-4", + "api_key": openai_client.api_key, + "timeout": 10, + } + ], "timeout": 10, "temperature": 0, # Deterministic for testing } @@ -39,17 +43,16 @@ def math_agents(openai_client, autogen_logger): user_proxy = UserProxyAgent( name="user_proxy", human_input_mode="NEVER", - is_termination_msg=lambda x: "TERMINATE" in x.get("content", "") - or x.get("content", "") == "", - **base_config + is_termination_msg=lambda x: "TERMINATE" in x.get("content", "") or x.get("content", "") == "", + **base_config, ) - + # Create assistant agent assistant = AssistantAgent( name="assistant", system_message="You are a math assistant. Use the calculator tool when needed. Return TERMINATE when done.", llm_config=llm_config, - max_consecutive_auto_reply=1 + max_consecutive_auto_reply=1, ) # Register agents with logger @@ -70,22 +73,13 @@ def calculator(a: int, b: int, operator: str) -> int: raise ValueError("Invalid operator") # Register calculator with both agents - assistant.register_for_llm( - name="calculator", - description="A simple calculator" - )(calculator) - - user_proxy.register_for_execution( - name="calculator" - )(calculator) + assistant.register_for_llm(name="calculator", description="A simple calculator")(calculator) + + user_proxy.register_for_execution(name="calculator")(calculator) # Register function between agents register_function( - calculator, - caller=assistant, - executor=user_proxy, - name="calculator", - description="A simple calculator" + calculator, caller=assistant, executor=user_proxy, name="calculator", description="A simple calculator" ) - - return user_proxy, assistant \ No newline at end of file + + return user_proxy, assistant diff --git a/tests/fixtures/providers.py b/tests/fixtures/providers.py index fe3f80833..f5eb4460b 100644 --- a/tests/fixtures/providers.py +++ b/tests/fixtures/providers.py @@ -87,15 +87,16 @@ def mistral_client(): api_key = os.getenv("MISTRAL_API_KEY", "test-api-key") return Mistral(api_key=api_key) + @pytest.fixture def gemini_client(): """Initialize Google's Gemini client.""" import google.generativeai as genai - + api_key = os.getenv("GEMINI_API_KEY", "test-api-key") genai.configure(api_key=api_key) - - return genai.GenerativeModel('gemini-1.5-flash') + + return genai.GenerativeModel("gemini-1.5-flash") @pytest.fixture @@ -117,7 +118,7 @@ def taskweaver_app(): # Create a temporary directory for TaskWeaver project with tempfile.TemporaryDirectory() as temp_dir: app_dir = Path(temp_dir) - + # Create config file config_file = app_dir / "taskweaver_config.json" config = { @@ -127,10 +128,10 @@ def taskweaver_app(): "llm.api_base": "https://api.openai.com/v1", "llm.model": "gpt-4o-mini", } - + with open(config_file, "w") as f: json.dump(config, f, indent=4) - + # Initialize TaskWeaver app app = TaskWeaverApp(app_dir=str(app_dir)) yield app diff --git a/tests/fixtures/vcr.py b/tests/fixtures/vcr.py index 00d143ec5..4258fbb76 100644 --- a/tests/fixtures/vcr.py +++ b/tests/fixtures/vcr.py @@ -82,23 +82,23 @@ def vcr_config(): # Add JWT-related headers ("x-railway-request-id", "REDACTED"), ("x-request-id", "REDACTED"), - ("x-ratelimit-remaining-tokens", "REDACTED"), + ("x-ratelimit-remaining-tokens", "REDACTED"), ("x-ratelimit-reset-requests", "REDACTED"), ("x-ratelimit-reset-tokens", "REDACTED"), - ("x-debug-trace-id", "REDACTED") + ("x-debug-trace-id", "REDACTED"), ] def redact_jwt_recursive(obj): """Recursively redact JWT tokens from dict/list structures.""" if obj is None: return obj - + if isinstance(obj, dict): for key, value in obj.items(): - if isinstance(key, str) and ('jwt' in key.lower()): - obj[key] = 'REDACTED' - elif isinstance(value, str) and 'eyJ' in value: # JWT tokens start with 'eyJ' - obj[key] = 'REDACTED_JWT' + if isinstance(key, str) and ("jwt" in key.lower()): + obj[key] = "REDACTED" + elif isinstance(value, str) and "eyJ" in value: # JWT tokens start with 'eyJ' + obj[key] = "REDACTED_JWT" else: redact_jwt_recursive(value) elif isinstance(obj, list): @@ -110,7 +110,7 @@ def filter_response_headers(response): """Filter sensitive headers and body content from response.""" if not isinstance(response, dict): raise ValueError("Response must be a dictionary") - + # Filter headers headers = response.get("headers", {}) if headers: @@ -128,20 +128,21 @@ def filter_response_headers(response): try: # Handle JSON response bodies if isinstance(body_content, bytes): - body_str = body_content.decode('utf-8') + body_str = body_content.decode("utf-8") else: body_str = str(body_content) - + try: body = json.loads(body_str) body = redact_jwt_recursive(body) - response["body"]["string"] = json.dumps(body).encode('utf-8') + response["body"]["string"] = json.dumps(body).encode("utf-8") except json.JSONDecodeError: # If not JSON, handle as plain text import re - jwt_pattern = r'eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+' - body_str = re.sub(jwt_pattern, 'REDACTED_JWT', body_str) - response["body"]["string"] = body_str.encode('utf-8') + + jwt_pattern = r"eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+" + body_str = re.sub(jwt_pattern, "REDACTED_JWT", body_str) + response["body"]["string"] = body_str.encode("utf-8") except (AttributeError, UnicodeDecodeError) as e: raise ValueError(f"Failed to process response body: {str(e)}") @@ -149,65 +150,64 @@ def filter_response_headers(response): def scrub_request_body(request): """Scrub sensitive and dynamic data from request body.""" - if not request or not hasattr(request, 'body'): + if not request or not hasattr(request, "body"): raise ValueError("Invalid request object") - + if request.body: try: body_dict = json.loads(request.body) if not isinstance(body_dict, dict): raise ValueError("Request body must be a JSON object") - + body_dict = redact_jwt_recursive(body_dict) - + # Handle session creation/update requests - if request.uri and (request.uri.endswith('/v2/create_session') or request.uri.endswith('/v2/update_session')): - session = body_dict.get('session') + if request.uri and ( + request.uri.endswith("/v2/create_session") or request.uri.endswith("/v2/update_session") + ): + session = body_dict.get("session") if session and isinstance(session, dict): # Standardize all dynamic fields for key in session: - if key.startswith('_'): # Internal fields - session[key] = '' + if key.startswith("_"): # Internal fields + session[key] = "" elif isinstance(session[key], str): # String fields that might be dynamic - if key not in ['end_state', 'OS']: # Preserve specific fields - session[key] = '' - + if key not in ["end_state", "OS"]: # Preserve specific fields + session[key] = "" + # Standardize known fields - session['session_id'] = 'SESSION_ID' - session['init_timestamp'] = 'TIMESTAMP' - session['end_timestamp'] = 'TIMESTAMP' - session['jwt'] = 'JWT_TOKEN' - session['token_cost'] = '' - session['_session_url'] = '' - + session["session_id"] = "SESSION_ID" + session["init_timestamp"] = "TIMESTAMP" + session["end_timestamp"] = "TIMESTAMP" + session["jwt"] = "JWT_TOKEN" + session["token_cost"] = "" + session["_session_url"] = "" + # Standardize host environment - if 'host_env' in session: - session['host_env'] = { - 'SDK': {'AgentOps SDK Version': None}, - 'OS': {'OS': session.get('host_env', {}).get('OS', {}).get('OS', 'Darwin')} + if "host_env" in session: + session["host_env"] = { + "SDK": {"AgentOps SDK Version": None}, + "OS": {"OS": session.get("host_env", {}).get("OS", {}).get("OS", "Darwin")}, } - + # Reset all counters and states - session['event_counts'] = { - 'llms': 0, 'tools': 0, 'actions': 0, - 'errors': 0, 'apis': 0 - } - session['is_running'] = False - + session["event_counts"] = {"llms": 0, "tools": 0, "actions": 0, "errors": 0, "apis": 0} + session["is_running"] = False + # Clear any dynamic lists - session['tags'] = [] - session['video'] = None - session['end_state_reason'] = None - + session["tags"] = [] + session["video"] = None + session["end_state_reason"] = None + # Handle agent creation requests - if request.uri and request.uri.endswith('/v2/create_agent'): - if 'id' in body_dict: - body_dict['id'] = 'AGENT_ID' - + if request.uri and request.uri.endswith("/v2/create_agent"): + if "id" in body_dict: + body_dict["id"] = "AGENT_ID" + request.body = json.dumps(body_dict).encode() except (json.JSONDecodeError, AttributeError, UnicodeDecodeError) as e: raise ValueError(f"Failed to process request body: {str(e)}") - + return request return { @@ -224,7 +224,7 @@ def scrub_request_body(request): "localhost:4318", # Default OTLP HTTP endpoint "127.0.0.1:4317", "127.0.0.1:4318", - "huggingface.co" + "huggingface.co", ], # Header filtering for requests and responses "filter_headers": sensitive_headers, diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 24c6a1892..70527e2ad 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -206,25 +206,22 @@ def test_gemini_provider(gemini_client, test_messages): for msg in test_messages: if msg["role"] != "system": # Gemini doesn't support system messages directly gemini_messages.append(msg["content"]) - + # Sync completion response = gemini_client.generate_content(gemini_messages) assert response.text - + # Stream completion - stream = gemini_client.generate_content( - gemini_messages, - stream=True - ) - + stream = gemini_client.generate_content(gemini_messages, stream=True) + content = collect_stream_content(stream, "gemini") assert len(content) > 0 - + # Test async completion async def async_test(): response = await gemini_client.generate_content_async(gemini_messages) return response - + async_response = asyncio.run(async_test()) assert async_response.text @@ -356,9 +353,9 @@ def test_taskweaver_provider(taskweaver_client, test_messages): # Test with code execution messages code_messages = [ {"role": "system", "content": "You are a Python coding assistant."}, - {"role": "user", "content": "Write a function to calculate factorial. Answer in the JSON format."} + {"role": "user", "content": "Write a function to calculate factorial. Answer in the JSON format."}, ] - + response = taskweaver_client.chat_completion( messages=code_messages, temperature=0, @@ -368,7 +365,7 @@ def test_taskweaver_provider(taskweaver_client, test_messages): assert isinstance(response, dict) assert "content" in response - + # Convert 'content' from string to dictionary content = json.loads(response["content"]) diff --git a/tests/integration/test_partners.py b/tests/integration/test_partners.py index b6aaf5798..7c706b608 100644 --- a/tests/integration/test_partners.py +++ b/tests/integration/test_partners.py @@ -1,15 +1,16 @@ import pytest from agentops.partners.autogen_logger import AutogenLogger + @pytest.mark.usefixtures("agentops_session") @pytest.mark.vcr def test_autogen(autogen_logger, math_agents): """Test complete AutogenLogger integration with math agents""" # 1. Verify logger initialization assert isinstance(autogen_logger, AutogenLogger) - assert hasattr(autogen_logger, 'start') - assert hasattr(autogen_logger, 'stop') - assert hasattr(autogen_logger, 'get_connection') + assert hasattr(autogen_logger, "start") + assert hasattr(autogen_logger, "stop") + assert hasattr(autogen_logger, "get_connection") user_proxy, assistant = math_agents @@ -18,7 +19,7 @@ def test_autogen(autogen_logger, math_agents): assistant, message="What is 2 + 2?", ) - + # Verify agent registration assert len(autogen_logger.agent_store) > 0 assert any(agent["autogen_id"] == str(id(user_proxy)) for agent in autogen_logger.agent_store) @@ -29,7 +30,7 @@ def test_autogen(autogen_logger, math_agents): assistant, message="What is (1423 - 123) / 3 + (32 + 23) * 5?", ) - + # Verify tool usage logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) @@ -38,7 +39,7 @@ def test_autogen(autogen_logger, math_agents): assistant, message="What is 123 @ 456?", ) - + # Verify error logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) @@ -47,6 +48,6 @@ def test_autogen(autogen_logger, math_agents): assistant, message="What is 1 + 1? Return TERMINATE when done.", ) - + # Verify termination logging assert any(agent["autogen_id"] == str(id(assistant)) for agent in autogen_logger.agent_store) From 6c7a261032314dadb228bbcfdc32a15c5b01a076 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 14:09:52 +0530 Subject: [PATCH 21/25] remove python files from examples --- .../anthropic-example-sync.py | 167 ------------------ .../openai_examples/openai_example_sync.py | 107 ----------- 2 files changed, 274 deletions(-) delete mode 100644 examples/anthropic_examples/anthropic-example-sync.py delete mode 100644 examples/openai_examples/openai_example_sync.py diff --git a/examples/anthropic_examples/anthropic-example-sync.py b/examples/anthropic_examples/anthropic-example-sync.py deleted file mode 100644 index b4060293c..000000000 --- a/examples/anthropic_examples/anthropic-example-sync.py +++ /dev/null @@ -1,167 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 - -# # Anthropic Sync Example -# -# We are going to create a program called "Nier Storyteller". In short, it uses a message system similar to Nier Automata's to generate a one sentence summary before creating a short story. -# -# Example: -# -# {A foolish doll} {died in a world} {of ended dreams.} turns into "In a forgotten land where sunlight barely touched the ground, a little doll wandered through the remains of shattered dreams. Its porcelain face, cracked and wea..." - -# First, we start by importing Agentops and Anthropic - -# In[ ]: - - -get_ipython().run_line_magic('pip', 'install agentops') -get_ipython().run_line_magic('pip', 'install anthropic') - - -# Setup our generic default statements - -# In[4]: - - -from anthropic import Anthropic, AsyncAnthropic -import agentops -from dotenv import load_dotenv -import os -import random - - -# And set our API keys. - -# In[6]: - - -load_dotenv() -ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY") or "ANTHROPIC KEY HERE" -AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY") or "AGENTOPS KEY HERE" - - -# Now let's set the client as Anthropic and an AgentOps session! - -# In[7]: - - -client = Anthropic(api_key=ANTHROPIC_API_KEY) - - -# In[ ]: - - -agentops.init(AGENTOPS_API_KEY, default_tags=["anthropic-example"]) - -# Remember that story we made earlier? As of writing, claude-3-5-sonnet-20240620 (the version we will be using) has a 150k word, 680k character length. We also get an 8192 context length. This is great because we can actually set an example for the script! -# -# Let's assume we have user (the person speaking), assistant (the AI itself) for now and computer (the way the LLM gets references from). -# Let's set a default story as a script! - -# In[10]: - - -defaultstory = "In a forgotten land where sunlight barely touched the ground, a little doll wandered through the remains of shattered dreams. Its porcelain face, cracked and weathered, reflected the emptiness that hung in the air like a lingering fog. The doll's painted eyes, now chipped and dull, stared into the distance, searching for something—anything—that still held life. It had once belonged to a child who dreamt of endless adventures, of castles in the clouds and whispered secrets under starry skies. But those dreams had long since crumbled to dust, leaving behind nothing but a hollow world where even hope dared not tread. The doll, a relic of a life that had faded, trudged through the darkness, its tiny feet stumbling over broken wishes and forgotten stories. Each step took more effort than the last, as if the world itself pulled at the doll's limbs, weary and bitter. It reached a place where the ground fell away into an abyss of despair, the edge crumbling under its weight. The doll paused, teetering on the brink. It reached out, as though to catch a fading dream, but there was nothing left to hold onto. With a faint crack, its brittle body gave way, and the doll tumbled silently into the void. And so, in a world where dreams had died, the foolish little doll met its end. There were no tears, no mourning. Only the soft, empty echo of its fall, fading into the darkness, as the land of ended dreams swallowed the last trace of what once was." - - -# We are almost done! Let's generate a one sentence story summary by taking 3 random sentence fragments and connecting them! - -# In[11]: - - -# Define the lists -first = [ - "A unremarkable soldier", - "A lone swordsman", - "A lone lancer", - "A lone pugilist", - "A dual-wielder", - "A weaponless soldier", - "A beautiful android", - "A small android", - "A double-crossing android", - "A weapon carrying android", -] - -second = [ - "felt despair at this cold world", - "held nothing back", - "gave it all", - "could not get up again", - "grimaced in anger", - "missed the chance of a lifetime", - "couldn't find a weakpoint", - "was overwhelmed", - "was totally outmatched", - "was distracted by a flower", - "hesitated to land the killing blow", - "was attacked from behind", - "fell to the ground", -] - -third = [ - "in a dark hole beneath a city", - "underground", - "at the enemy's lair", - "inside an empty ship", - "at a tower built by the gods", - "on a tower smiled upon by angels", - "inside a tall tower", - "at a peace-loving village", - "at a village of refugees", - "in the free skies", - "below dark skies", - "in a blood-soaked battlefield", -] - -# Generate a random sentence -generatedsentence = ( - f"{random.choice(first)} {random.choice(second)} {random.choice(third)}." -) - - -# And now to construct a stream/message! We set an example for the assistant now! - -# In[ ]: - - -stream = client.messages.create( - max_tokens=2400, - model="claude-3-5-sonnet-20240620", # Comma added here - messages=[ - { - "role": "user", - "content": "Create a story based on the three sentence fragments given to you, it has been combined into one below.", - }, - { - "role": "assistant", - "content": "{A foolish doll} {died in a world} {of ended dreams.}", - }, - {"role": "assistant", "content": defaultstory}, - { - "role": "user", - "content": "Create a story based on the three sentence fragments given to you, it has been combined into one below.", - }, - {"role": "assistant", "content": generatedsentence}, - ], - stream=True, -) - -response = "" -for event in stream: - if event.type == "content_block_delta": - response += event.delta.text - elif event.type == "message_stop": - print(generatedsentence) - print(response) - - -# We can observe the session in the AgentOps dashboard by going to the session URL provided above. -# -# Now we will end the session with a success message. We can also end the session with a failure or intdeterminate status. By default, the session will be marked as indeterminate. - -# In[ ]: - - -agentops.end_session("Success") - diff --git a/examples/openai_examples/openai_example_sync.py b/examples/openai_examples/openai_example_sync.py deleted file mode 100644 index c1a64227c..000000000 --- a/examples/openai_examples/openai_example_sync.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 - -# # OpenAI Sync Example -# -# We are going to create a simple chatbot that creates stories based on a prompt. The chatbot will use the gpt-4o-mini LLM to generate the story using a user prompt. -# -# We will track the chatbot with AgentOps and see how it performs! - -# First let's install the required packages - -# In[ ]: - - -get_ipython().run_line_magic('pip', 'install -U openai') -get_ipython().run_line_magic('pip', 'install -U agentops') - - -from openai import OpenAI -import agentops -import os -from dotenv import load_dotenv - -# Then continue with the example - - -# Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables - -# In[2]: - - -load_dotenv() -OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") or "" -AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY") or "" - - -# Next we initialize the AgentOps client. - -# In[ ]: - - -agentops.init(AGENTOPS_API_KEY, default_tags=["openai-sync-example"]) - - -# And we are all set! Note the seesion url above. We will use it to track the chatbot. -# -# Let's create a simple chatbot that generates stories. - -# In[4]: - - -client = OpenAI(api_key=OPENAI_API_KEY) - -system_prompt = """ -You are a master storyteller, with the ability to create vivid and engaging stories. -You have experience in writing for children and adults alike. -You are given a prompt and you need to generate a story based on the prompt. -""" - -user_prompt = "Write a story about a cyber-warrior trapped in the imperial time period." - -messages = [ - {"role": "system", "content": system_prompt}, - {"role": "user", "content": user_prompt}, -] - - -# In[ ]: - - -response = client.chat.completions.create( - model="gpt-4o-mini", - messages=messages, -) - -print(response.choices[0].message.content) - - -# The response is a string that contains the story. We can track this with AgentOps by navigating to the session url and viewing the run. - -# ## Streaming Version -# We will demonstrate the streaming version of the API. - -# In[ ]: - - -stream = client.chat.completions.create( - model="gpt-4o-mini", - messages=messages, - stream=True, -) - -for chunk in stream: - print(chunk.choices[0].delta.content or "", end="") - - -# Note that the response is a generator that yields chunks of the story. We can track this with AgentOps by navigating to the session url and viewing the run. - -# In[ ]: - - -agentops.end_session(end_state="Success", end_state_reason="The story was generated successfully.") - - -# We end the session with a success state and a success reason. This is useful if you want to track the success or failure of the chatbot. In that case you can set the end state to failure and provide a reason. By default the session will have an indeterminate end state. -# -# All done! From 9e1b1658397b3315063921589ba41d82c4a558df Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 14:10:14 +0530 Subject: [PATCH 22/25] remove use of agentops fixture --- tests/fixtures/partners.py | 5 +---- tests/integration/test_partners.py | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/fixtures/partners.py b/tests/fixtures/partners.py index 7dcf8fcac..64e8ccc1b 100644 --- a/tests/fixtures/partners.py +++ b/tests/fixtures/partners.py @@ -5,7 +5,7 @@ @pytest.fixture -def autogen_logger(agentops_session): +def autogen_logger(): """Fixture for AutogenLogger with auto start/stop.""" logger = AutogenLogger() logger.start() @@ -16,9 +16,6 @@ def autogen_logger(agentops_session): @pytest.fixture def math_agents(openai_client, autogen_logger): """Math agent group with calculator tool and all configurations.""" - # Initialize AgentOps - agentops.init() - # Base configuration for all agents base_config = { "max_consecutive_auto_reply": 0, # Disable auto-reply diff --git a/tests/integration/test_partners.py b/tests/integration/test_partners.py index 7c706b608..a2182c706 100644 --- a/tests/integration/test_partners.py +++ b/tests/integration/test_partners.py @@ -1,8 +1,6 @@ import pytest from agentops.partners.autogen_logger import AutogenLogger - -@pytest.mark.usefixtures("agentops_session") @pytest.mark.vcr def test_autogen(autogen_logger, math_agents): """Test complete AutogenLogger integration with math agents""" From e520cc3927e51a06e34dd8a45c57cfccd1ffd472 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 14:10:28 +0530 Subject: [PATCH 23/25] re-record autogen cassette --- tests/fixtures/recordings/test_autogen.yaml | 431 ++++++++++++++++++++ 1 file changed, 431 insertions(+) diff --git a/tests/fixtures/recordings/test_autogen.yaml b/tests/fixtures/recordings/test_autogen.yaml index da2a00d42..8c1350418 100644 --- a/tests/fixtures/recordings/test_autogen.yaml +++ b/tests/fixtures/recordings/test_autogen.yaml @@ -171,4 +171,435 @@ interactions: status: code: 200 message: OK +- request: + body: '{"messages": [{"content": "You are a math assistant. Use the calculator + tool when needed. Return TERMINATE when done.", "role": "system"}, {"content": + "What is 2 + 2?", "role": "user", "name": "user_proxy"}], "model": "gpt-4", + "stream": false, "temperature": 0, "tools": [{"type": "function", "function": + {"description": "A simple calculator", "name": "calculator", "parameters": {"type": + "object", "properties": {"a": {"type": "integer", "description": "a"}, "b": + {"type": "integer", "description": "b"}, "operator": {"type": "string", "description": + "operator"}}, "required": ["a", "b", "operator"]}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '605' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: '{"id": "chatcmpl-As42h2K3sm413SuT40cPyKvF7idIT", "object": "chat.completion", + "created": 1737448615, "model": "gpt-4-0613", "choices": [{"index": 0, "message": + {"role": "assistant", "content": null, "tool_calls": [{"id": "call_ecFDWTNlhpZtB7wrVlHztvei", + "type": "function", "function": {"name": "calculator", "arguments": "{\n \"a\": + 2,\n \"b\": 2,\n \"operator\": \"+\"\n}"}}], "refusal": null}, "logprobs": + null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 88, "completion_tokens": + 29, "total_tokens": 117, "prompt_tokens_details": {"cached_tokens": 0, "audio_tokens": + 0}, "completion_tokens_details": {"reasoning_tokens": 0, "audio_tokens": 0, + "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0}}, "service_tier": + "default", "system_fingerprint": null}' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Tue, 21 Jan 2025 08:36:56 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=PpEXg6vgyNAN7WUSBQpH1tvgVwtO37K0ew9GlnCz_FU-1737448616-1.0.1.1-XCgG8UzjKFsmpTX8qKp1TSl0k2o_7CTLCTbAOWOPqMVgZCkvEzK9lFLTmLHhCfKCy_IXwKvdFj4z4wdto39qnQ; + path=/; expires=Tue, 21-Jan-25 09:06:56 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=P761hOcApVI5tb3gVbbSj.Z0rBbOd6VbCC5PkHbBYuA-1737448616634-0.0.1.1-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1067' + openai-organization: + - REDACTED + openai-processing-ms: + - '1552' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"content": "You are a math assistant. Use the calculator + tool when needed. Return TERMINATE when done.", "role": "system"}, {"content": + "What is (1423 - 123) / 3 + (32 + 23) * 5?", "role": "user", "name": "user_proxy"}], + "model": "gpt-4", "stream": false, "temperature": 0, "tools": [{"type": "function", + "function": {"description": "A simple calculator", "name": "calculator", "parameters": + {"type": "object", "properties": {"a": {"type": "integer", "description": "a"}, + "b": {"type": "integer", "description": "b"}, "operator": {"type": "string", + "description": "operator"}}, "required": ["a", "b", "operator"]}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '632' + content-type: + - application/json + cookie: + - __cf_bm=PpEXg6vgyNAN7WUSBQpH1tvgVwtO37K0ew9GlnCz_FU-1737448616-1.0.1.1-XCgG8UzjKFsmpTX8qKp1TSl0k2o_7CTLCTbAOWOPqMVgZCkvEzK9lFLTmLHhCfKCy_IXwKvdFj4z4wdto39qnQ; + _cfuvid=P761hOcApVI5tb3gVbbSj.Z0rBbOd6VbCC5PkHbBYuA-1737448616634-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: '{"id": "chatcmpl-As42idz8FBIAfECwBtgeGXpHu82yf", "object": "chat.completion", + "created": 1737448616, "model": "gpt-4-0613", "choices": [{"index": 0, "message": + {"role": "assistant", "content": null, "tool_calls": [{"id": "call_TLoj935HTL4mPERqNBdr5Xy8", + "type": "function", "function": {"name": "calculator", "arguments": "{\n \"a\": + 1423,\n \"b\": 123,\n \"operator\": \"-\"\n}"}}], "refusal": null}, "logprobs": + null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 103, "completion_tokens": + 29, "total_tokens": 132, "prompt_tokens_details": {"cached_tokens": 0, "audio_tokens": + 0}, "completion_tokens_details": {"reasoning_tokens": 0, "audio_tokens": 0, + "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0}}, "service_tier": + "default", "system_fingerprint": null}' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Tue, 21 Jan 2025 08:36:58 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1073' + openai-organization: + - REDACTED + openai-processing-ms: + - '1695' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"content": "You are a math assistant. Use the calculator + tool when needed. Return TERMINATE when done.", "role": "system"}, {"content": + "What is 123 @ 456?", "role": "user", "name": "user_proxy"}], "model": "gpt-4", + "stream": false, "temperature": 0, "tools": [{"type": "function", "function": + {"description": "A simple calculator", "name": "calculator", "parameters": {"type": + "object", "properties": {"a": {"type": "integer", "description": "a"}, "b": + {"type": "integer", "description": "b"}, "operator": {"type": "string", "description": + "operator"}}, "required": ["a", "b", "operator"]}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '609' + content-type: + - application/json + cookie: + - __cf_bm=PpEXg6vgyNAN7WUSBQpH1tvgVwtO37K0ew9GlnCz_FU-1737448616-1.0.1.1-XCgG8UzjKFsmpTX8qKp1TSl0k2o_7CTLCTbAOWOPqMVgZCkvEzK9lFLTmLHhCfKCy_IXwKvdFj4z4wdto39qnQ; + _cfuvid=P761hOcApVI5tb3gVbbSj.Z0rBbOd6VbCC5PkHbBYuA-1737448616634-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: '{"id": "chatcmpl-As42m7LjODdR82aaM6v7pEd6vHPgF", "object": "chat.completion", + "created": 1737448620, "model": "gpt-4-0613", "choices": [{"index": 0, "message": + {"role": "assistant", "content": "I''m sorry, but I didn''t understand the + operation you want to perform with the numbers 123 and 456. Could you please + specify if you want to add, subtract, multiply, or divide these numbers?", + "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": + 88, "completion_tokens": 45, "total_tokens": 133, "prompt_tokens_details": + {"cached_tokens": 0, "audio_tokens": 0}, "completion_tokens_details": {"reasoning_tokens": + 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": + 0}}, "service_tier": "default", "system_fingerprint": null}' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Tue, 21 Jan 2025 08:37:02 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '946' + openai-organization: + - REDACTED + openai-processing-ms: + - '2069' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK +- request: + body: '{"messages": [{"content": "You are a math assistant. Use the calculator + tool when needed. Return TERMINATE when done.", "role": "system"}, {"content": + "What is 1 + 1? Return TERMINATE when done.", "role": "user", "name": "user_proxy"}], + "model": "gpt-4", "stream": false, "temperature": 0, "tools": [{"type": "function", + "function": {"description": "A simple calculator", "name": "calculator", "parameters": + {"type": "object", "properties": {"a": {"type": "integer", "description": "a"}, + "b": {"type": "integer", "description": "b"}, "operator": {"type": "string", + "description": "operator"}}, "required": ["a", "b", "operator"]}}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - REDACTED + connection: + - keep-alive + content-length: + - '633' + content-type: + - application/json + cookie: + - __cf_bm=PpEXg6vgyNAN7WUSBQpH1tvgVwtO37K0ew9GlnCz_FU-1737448616-1.0.1.1-XCgG8UzjKFsmpTX8qKp1TSl0k2o_7CTLCTbAOWOPqMVgZCkvEzK9lFLTmLHhCfKCy_IXwKvdFj4z4wdto39qnQ; + _cfuvid=P761hOcApVI5tb3gVbbSj.Z0rBbOd6VbCC5PkHbBYuA-1737448616634-0.0.1.1-604800000 + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.59.7 + x-stainless-arch: + - REDACTED + x-stainless-async: + - REDACTED + x-stainless-lang: + - REDACTED + x-stainless-os: + - REDACTED + x-stainless-package-version: + - 1.59.7 + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - REDACTED + x-stainless-runtime-version: + - REDACTED + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: '{"id": "chatcmpl-As42oDi4Xfs27rO1Wfdd2iavShg94", "object": "chat.completion", + "created": 1737448622, "model": "gpt-4-0613", "choices": [{"index": 0, "message": + {"role": "assistant", "content": null, "tool_calls": [{"id": "call_MeYwJ6b4ncFqOfzrM4kVcyxu", + "type": "function", "function": {"name": "calculator", "arguments": "{\n \"a\": + 1,\n \"b\": 1,\n \"operator\": \"+\"\n}"}}], "refusal": null}, "logprobs": + null, "finish_reason": "tool_calls"}], "usage": {"prompt_tokens": 94, "completion_tokens": + 29, "total_tokens": 123, "prompt_tokens_details": {"cached_tokens": 0, "audio_tokens": + 0}, "completion_tokens_details": {"reasoning_tokens": 0, "audio_tokens": 0, + "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0}}, "service_tier": + "default", "system_fingerprint": null}' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - REDACTED + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Tue, 21 Jan 2025 08:37:04 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + content-length: + - '1067' + openai-organization: + - REDACTED + openai-processing-ms: + - '1647' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-ratelimit-limit-requests: + - REDACTED + x-ratelimit-limit-tokens: + - REDACTED + x-ratelimit-remaining-requests: + - REDACTED + x-ratelimit-remaining-tokens: + - REDACTED + x-ratelimit-reset-requests: + - REDACTED + x-ratelimit-reset-tokens: + - REDACTED + x-request-id: + - REDACTED + status: + code: 200 + message: OK version: 1 From d22028ee2b4c39d7f67afc7375e59ab15b128bfd Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 14:16:39 +0530 Subject: [PATCH 24/25] ruff --- tests/integration/test_partners.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/test_partners.py b/tests/integration/test_partners.py index a2182c706..7fadcc0d0 100644 --- a/tests/integration/test_partners.py +++ b/tests/integration/test_partners.py @@ -1,6 +1,7 @@ import pytest from agentops.partners.autogen_logger import AutogenLogger + @pytest.mark.vcr def test_autogen(autogen_logger, math_agents): """Test complete AutogenLogger integration with math agents""" From 54b2e1f936b35216aa222d700ded5f2b9cacb620 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Tue, 21 Jan 2025 15:29:11 +0530 Subject: [PATCH 25/25] skip gemini tests --- tests/integration/test_llm_providers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_llm_providers.py b/tests/integration/test_llm_providers.py index 70527e2ad..fa655d228 100644 --- a/tests/integration/test_llm_providers.py +++ b/tests/integration/test_llm_providers.py @@ -198,7 +198,8 @@ def test_cohere_provider(cohere_client): # Gemini Tests -@pytest.mark.vcr() +# @pytest.mark.vcr() +@pytest.mark.skip(reason="Gemini tests require gRPC transport not supported by VCR") def test_gemini_provider(gemini_client, test_messages): """Test Gemini provider integration.""" # Convert messages to Gemini format