Spaces:
Configuration error
Configuration error
File size: 1,043 Bytes
447ebeb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
import io
import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
import asyncio
import gzip
import json
import logging
import time
from unittest.mock import AsyncMock, patch
import pytest
import litellm
from litellm import completion
from litellm._logging import verbose_logger
from litellm.integrations.datadog.datadog import *
from datetime import datetime, timedelta
from litellm.types.utils import (
StandardLoggingPayload,
StandardLoggingModelInformation,
StandardLoggingMetadata,
StandardLoggingHiddenParams,
)
from litellm.integrations.azure_storage.azure_storage import AzureBlobStorageLogger
verbose_logger.setLevel(logging.DEBUG)
@pytest.mark.asyncio
async def test_azure_blob_storage():
azure_storage_logger = AzureBlobStorageLogger(flush_interval=1)
litellm.callbacks = [azure_storage_logger]
response = await litellm.acompletion(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello, world!"}],
)
print(response)
await asyncio.sleep(3)
pass
|