Agent / start_enhanced_server.py
AMD8's picture
Update start_enhanced_server.py
7f07cc3 verified
Raw History Blame Contribute Delete
1.18 kB
#!/usr/bin/env python3
"""
Start the Enhanced LinkedIn Sourcing Agent FastAPI server with Groq/Llama integration
"""
import sys
import os
from app.enhanced_main import app # πŸ‘ˆ This line makes `app` available globally
# This part runs only when executing the file directly
if __name__ == "__main__":
import uvicorn
print("πŸš€ Starting Enhanced LinkedIn Sourcing Agent API Server...")
print("πŸ€– Powered by Groq API + Llama models")
print("πŸ“‘ API will be available at: http://localhost:8000")
print("🌐 Frontend will be available at: http://localhost:8000/frontend")
print("πŸ“š API documentation at: http://localhost:8000/docs")
print("πŸ’š Health check at: http://localhost:8000/health")
print("\nPress Ctrl+C to stop the server")
try:
uvicorn.run(
"start_enhanced_server:app", # πŸ‘ˆ points to this file's app object
host="0.0.0.0",
port=8000,
reload=True,
log_level="info"
)
except KeyboardInterrupt:
print("\nπŸ‘‹ Server stopped by user")
except Exception as e:
print(f"❌ Error starting server: {e}")
sys.exit(1)