better testing

This commit is contained in:
ishaan-jaff 2023-07-31 18:47:50 -07:00
parent a592d01fa3
commit dcf7f03ac7

View file

@ -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"}]