From ff5df30317ffb4f7410830a7d038172bd4782c87 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Mon, 16 Dec 2024 19:51:51 +0530 Subject: [PATCH] restructure voyage examples and move test file to tests directory --- examples/voyage/voyage_example.ipynb | 1221 ----------------- .../providers/voyage_canary.py | 0 2 files changed, 1221 deletions(-) delete mode 100644 examples/voyage/voyage_example.ipynb rename examples/voyage/test_voyage.py => tests/core_manual_tests/providers/voyage_canary.py (100%) diff --git a/examples/voyage/voyage_example.ipynb b/examples/voyage/voyage_example.ipynb deleted file mode 100644 index 2b1a1d2f..00000000 --- a/examples/voyage/voyage_example.ipynb +++ /dev/null @@ -1,1221 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Voyage AI Integration Example with AgentOps\n", - "\n", - "This notebook demonstrates how to use the Voyage AI provider with AgentOps for embedding operations using a mock client for demonstration purposes." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "execution": { - "iopub.execute_input": "2024-12-14T05:37:41.836245Z", - "iopub.status.busy": "2024-12-14T05:37:41.836054Z", - "iopub.status.idle": "2024-12-14T05:37:44.309792Z", - "shell.execute_reply": "2024-12-14T05:37:44.308935Z" - } - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=6bbc00bd-f1bc-41c8-b1c1-868aef6a269d\u001b[0m\u001b[0m\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "AgentOps Session URL: https://app.agentops.ai/drilldown?session_id=6bbc00bd-f1bc-41c8-b1c1-868aef6a269d\n", - "\n" - ] - } - ], - "source": [ - "import os\n", - "import voyageai\n", - "import agentops\n", - "from agentops.llms.providers.voyage import VoyageProvider\n", - "\n", - "# Set up mock Voyage client\n", - "class MockVoyageClient(voyageai.Client):\n", - " def __init__(self, *args, **kwargs):\n", - " pass\n", - "\n", - " def embed(self, texts, **kwargs):\n", - " return {\n", - " \"data\": [{\n", - " \"embedding\": [0.1] * 1024,\n", - " \"index\": 0,\n", - " \"object\": \"embedding\"\n", - " }],\n", - " \"model\": \"voyage-01\",\n", - " \"object\": \"list\",\n", - " \"usage\": {\"prompt_tokens\": 10}\n", - " }\n", - " \n", - " async def aembed(self, texts, **kwargs):\n", - " return self.embed(texts, **kwargs)\n", - "\n", - "# Initialize AgentOps client\n", - "os.environ[\"AGENTOPS_API_KEY\"] = \"8b95388c-ee56-499d-a940-c1d6a2ba7f0c\"\n", - "ao_client = agentops.Client()\n", - "\n", - "# Initialize session\n", - "session = ao_client.initialize()\n", - "print(f\"\\nAgentOps Session URL: {session.session_url}\\n\")\n", - "\n", - "# Set up Voyage provider with mock client\n", - "mock_client = MockVoyageClient()\n", - "provider = VoyageProvider(client=mock_client)\n", - "provider.override()" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "execution": { - "iopub.execute_input": "2024-12-14T05:37:44.333599Z", - "iopub.status.busy": "2024-12-14T05:37:44.333085Z", - "iopub.status.idle": "2024-12-14T05:37:44.479500Z", - "shell.execute_reply": "2024-12-14T05:37:44.478739Z" - } - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: Unable to parse Voyage AI embedding response. Skipping upload to AgentOps\n", - "response:\n", - " {'data': [{'embedding': [0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1,\n", - " 0.1],\n", - " 'index': 0,\n", - " 'object': 'embedding'}],\n", - " 'model': 'voyage-01',\n", - " 'object': 'list',\n", - " 'usage': {'prompt_tokens': 10}}\n", - "kwargs:\n", - " {}\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Embedding dimension: 1024\n", - "Token usage: {'prompt_tokens': 10}\n" - ] - } - ], - "source": [ - "# Example text for embedding\n", - "text = \"The quick brown fox jumps over the lazy dog.\"\n", - "\n", - "try:\n", - " # Generate embeddings with session tracking\n", - " result = provider.embed(text, session=session)\n", - " print(f\"Embedding dimension: {len(result['data'][0]['embedding'])}\")\n", - " print(f\"Token usage: {result['usage']}\")\n", - "except Exception as e:\n", - " print(f\"Failed to generate embeddings: {e}\")\n", - " raise" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "execution": { - "iopub.execute_input": "2024-12-14T05:37:44.481800Z", - "iopub.status.busy": "2024-12-14T05:37:44.481546Z", - "iopub.status.idle": "2024-12-14T05:37:44.996062Z", - "shell.execute_reply": "2024-12-14T05:37:44.995227Z" - } - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: Session Stats - \u001b[1mDuration:\u001b[0m 2.0s | \u001b[1mCost:\u001b[0m $0.00 | \u001b[1mLLMs:\u001b[0m 0 | \u001b[1mTools:\u001b[0m 0 | \u001b[1mActions:\u001b[0m 0 | \u001b[1mErrors:\u001b[0m 1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "🖇 AgentOps: \u001b[34m\u001b[34mSession Replay: https://app.agentops.ai/drilldown?session_id=6bbc00bd-f1bc-41c8-b1c1-868aef6a269d\u001b[0m\u001b[0m\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Session completed successfully!\n", - "View session at: https://app.agentops.ai/drilldown?session_id=6bbc00bd-f1bc-41c8-b1c1-868aef6a269d\n" - ] - } - ], - "source": [ - "# End the session\n", - "ao_client.end_session(\"Success\", \"Example notebook completed successfully\")\n", - "print(\"\\nSession completed successfully!\")\n", - "print(f\"View session at: {session.session_url}\")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.7" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/examples/voyage/test_voyage.py b/tests/core_manual_tests/providers/voyage_canary.py similarity index 100% rename from examples/voyage/test_voyage.py rename to tests/core_manual_tests/providers/voyage_canary.py