File size: 1,005 Bytes
1f7ead8 | 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 28 29 30 31 32 |
import sys
import os
import time
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
from backend.app.reasoning import reasoning_engine
def test_heavy_load():
print("Testing Audio Script Generation with Heavy Load...")
# Simulate heavy context ~5000 words
context = ["Artificial Intelligence (AI) in healthcare is a rapidly evolving field... " * 500]
start_time = time.time()
try:
script = reasoning_engine.generate_content("audio", context)
end_time = time.time()
print(f"Time taken: {end_time - start_time:.2f} seconds")
if "Error" in script:
print("FAILED: Logic returned error message")
print(script)
else:
print("SUCCESS: Script generated")
print(f"Script Length: {len(script)} chars")
except Exception as e:
print(f"EXCEPTION: {e}")
if __name__ == "__main__":
test_heavy_load()
|