customeragent-api / server /tests /verify_e2e_medical.py
anasraza526's picture
Clean deploy to Hugging Face
ac90985
import asyncio
import os
import logging
from app.services.ai_engine import AIEngine
async def test_live_healthcare():
logging.basicConfig(level=logging.INFO)
engine = AIEngine()
test_queries = [
"What is diabetes?",
"What diseases are associated with fever?",
"I have a mild fever—should I rest or see a doctor?",
]
print("\n--- Live Healthcare E2E Verification ---")
for query in test_queries:
print(f"\nQuery: {query}")
# industry='healthcare' is passed in the request usually
response, confidence, needs_review = await engine.generate_response(
query=query,
context=[], # No website context, force industry lookup
industry='healthcare'
)
print(f"Confidence: {confidence}")
print(f"Response: {response[:200]}...")
print("\n-----------------------------------------")
if __name__ == "__main__":
asyncio.run(test_live_healthcare())