mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(test) dd test
This commit is contained in:
parent
447bddc7f8
commit
c1800354e9
1 changed files with 27 additions and 0 deletions
27
litellm/tests/test_datadog.py
Normal file
27
litellm/tests/test_datadog.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import io
|
||||||
|
|
||||||
|
sys.path.insert(0, os.path.abspath("../.."))
|
||||||
|
|
||||||
|
from litellm import completion
|
||||||
|
import litellm
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="beta test - this is a new feature")
|
||||||
|
def test_datadog_logging():
|
||||||
|
try:
|
||||||
|
litellm.success_callback = ["datadog"]
|
||||||
|
litellm.set_verbose = True
|
||||||
|
response = completion(
|
||||||
|
model="gpt-3.5-turbo",
|
||||||
|
messages=[{"role": "user", "content": "what llm are u"}],
|
||||||
|
max_tokens=10,
|
||||||
|
temperature=0.2,
|
||||||
|
)
|
||||||
|
print(response)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
Loading…
Add table
Add a link
Reference in a new issue