mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test langsmith
This commit is contained in:
parent
5f04f7b7c1
commit
f21a92cadc
1 changed files with 7 additions and 0 deletions
|
|
@ -5,13 +5,17 @@ import sys
|
|||
sys.path.insert(0, os.path.abspath("../.."))
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
|
||||
import litellm
|
||||
from litellm import completion
|
||||
from litellm._logging import verbose_logger
|
||||
from litellm.integrations.langsmith import LangsmithLogger
|
||||
|
||||
verbose_logger.setLevel(logging.DEBUG)
|
||||
|
||||
litellm.set_verbose = True
|
||||
import time
|
||||
|
||||
|
|
@ -83,6 +87,7 @@ async def test_langsmith_logging():
|
|||
def test_langsmith_logging_with_metadata():
|
||||
try:
|
||||
litellm.success_callback = ["langsmith"]
|
||||
litellm.set_verbose = True
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "what llm are u"}],
|
||||
|
|
@ -91,6 +96,7 @@ def test_langsmith_logging_with_metadata():
|
|||
)
|
||||
print(response)
|
||||
time.sleep(3)
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
|
@ -98,6 +104,7 @@ def test_langsmith_logging_with_metadata():
|
|||
def test_langsmith_logging_with_streaming_and_metadata():
|
||||
try:
|
||||
litellm.success_callback = ["langsmith"]
|
||||
litellm.set_verbose = True
|
||||
response = completion(
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "what llm are u"}],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue