mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
add integration files
This commit is contained in:
parent
9e9b1f1504
commit
b1fb75af1b
3 changed files with 96 additions and 10 deletions
28
litellm/tests/test_llmonitor_integration.py
Normal file
28
litellm/tests/test_llmonitor_integration.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#### What this tests ####
|
||||
# This tests if logging to the helicone integration actually works
|
||||
|
||||
from litellm import embedding, completion
|
||||
import litellm
|
||||
import sys
|
||||
import os
|
||||
import traceback
|
||||
import pytest
|
||||
|
||||
# Adds the parent directory to the system path
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
|
||||
litellm.success_callback = ["llmonitor"]
|
||||
|
||||
litellm.set_verbose = True
|
||||
|
||||
user_message = "Hello, how are you?"
|
||||
messages = [{"content": user_message, "role": "user"}]
|
||||
|
||||
|
||||
# openai call
|
||||
response = completion(model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
|
||||
|
||||
# cohere call
|
||||
# response = completion(model="command-nightly",
|
||||
# messages=[{"role": "user", "content": "Hi 👋 - i'm cohere"}])
|
Loading…
Add table
Add a link
Reference in a new issue