mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
better testing
This commit is contained in:
parent
a592d01fa3
commit
dcf7f03ac7
1 changed files with 9 additions and 6 deletions
|
@ -9,17 +9,20 @@ import traceback
|
||||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# Get the parent directory by joining the current directory with '..'
|
# Get the parent directory by joining the current directory with '..'
|
||||||
parent_dir = os.path.join(current_dir, '..')
|
parent_dir = os.path.join(current_dir, '../..')
|
||||||
|
|
||||||
# Add the parent directory to the system path
|
# Add the parent directory to the system path
|
||||||
sys.path.append(parent_dir)
|
sys.path.append(parent_dir)
|
||||||
|
|
||||||
import main
|
|
||||||
from main import embedding, completion, set_verbose
|
|
||||||
main.success_callback = ["posthog"]
|
|
||||||
main.failure_callback = ["slack", "sentry", "posthog"]
|
|
||||||
|
|
||||||
set_verbose(True)
|
import litellm
|
||||||
|
from litellm import embedding, completion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
litellm.success_callback = ["posthog"]
|
||||||
|
litellm.failure_callback = ["slack", "sentry", "posthog"]
|
||||||
|
|
||||||
|
|
||||||
user_message = "Hello, how are you?"
|
user_message = "Hello, how are you?"
|
||||||
messages = [{ "content": user_message,"role": "user"}]
|
messages = [{ "content": user_message,"role": "user"}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue