mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
better testing
This commit is contained in:
parent
d4ffd11ad3
commit
480dd63f88
1 changed files with 9 additions and 6 deletions
|
@ -9,17 +9,20 @@ import traceback
|
|||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# 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
|
||||
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?"
|
||||
messages = [{ "content": user_message,"role": "user"}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue