-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_LiteLLM.py
27 lines (21 loc) · 880 Bytes
/
test_LiteLLM.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# test_litellm_integration.py
import os
import json
from tools.llm_handler import communicate_with_llm # Import from the proper module
def test_integration():
"""Test the LiteLLM integration with your existing system"""
prompt = "Hello, please summarize this small test in one sentence."
print("Testing LiteLLM integration...")
# Test the communicate_with_llm function
response = communicate_with_llm(prompt)
print(f"Response: {response}")
print(f"Response length: {len(response)}")
# Check if the response is reasonable
if len(response) > 0 and not response.startswith("ERROR:"):
print("✅ Test passed: LiteLLM integration is working")
return True
else:
print("❌ Test failed: LiteLLM integration not working properly")
return False
if __name__ == "__main__":
test_integration()