sksameermujahid commited on
Commit
eae740d
·
verified ·
1 Parent(s): 57b001c

Upload config.py

Browse files
Files changed (1) hide show
  1. config.py +71 -0
config.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Centralized Configuration for Lead Qualification System
3
+ All backend URLs and API endpoints are managed from here
4
+ """
5
+
6
+ # Backend Configuration
7
+ BACKEND_URL = "https://0f9dfdaf65e6.ngrok-free.app"
8
+
9
+ # API Headers for ngrok
10
+ NGROK_HEADERS = {
11
+ 'ngrok-skip-browser-warning': 'true',
12
+ 'Content-Type': 'application/json',
13
+ 'Accept': 'application/json',
14
+ 'User-Agent': 'LeadQualification-API/1.0'
15
+ }
16
+
17
+ # API Endpoints
18
+ API_ENDPOINTS = {
19
+ 'lead_qualification': f"{BACKEND_URL}/api/PropertyLeadQualification/customer",
20
+ 'properties': f"{BACKEND_URL}/api/Property/allPropertieswithfulldetails",
21
+ 'email_send': f"{BACKEND_URL}/api/Email/sendPlainText",
22
+ 'debt_financing': f"{BACKEND_URL}/api/DebtFinancing"
23
+ }
24
+
25
+ # Application Configuration
26
+ APP_CONFIG = {
27
+ 'host': '0.0.0.0',
28
+ 'port': 7860,
29
+ 'debug': True,
30
+ 'api_timeout': None, # NO TIMEOUT - allow unlimited time for API calls
31
+ 'cache_duration': 0, # DISABLED: No caching for real-time data
32
+ 'max_retries': 3,
33
+ 'retry_delay': 1
34
+ }
35
+
36
+ # Email Configuration
37
+ EMAIL_CONFIG = {
38
+ 'sendgrid_api_key': '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',
39
+ 'sender_email': '[email protected]',
40
+ 'test_email': '[email protected]'
41
+ }
42
+
43
+ # Database Configuration
44
+ DATABASE_CONFIG = {
45
+ 'path': 'ai_lead_system.db',
46
+ 'chromadb_persist_directory': './chromadb'
47
+ }
48
+
49
+ def get_backend_url():
50
+ """Get the centralized backend URL"""
51
+ return BACKEND_URL
52
+
53
+ def get_ngrok_headers():
54
+ """Get the ngrok headers"""
55
+ return NGROK_HEADERS.copy()
56
+
57
+ def get_api_endpoint(endpoint_name):
58
+ """Get a specific API endpoint"""
59
+ return API_ENDPOINTS.get(endpoint_name, f"{BACKEND_URL}/api/{endpoint_name}")
60
+
61
+ def get_app_config():
62
+ """Get application configuration"""
63
+ return APP_CONFIG.copy()
64
+
65
+ def get_email_config():
66
+ """Get email configuration"""
67
+ return EMAIL_CONFIG.copy()
68
+
69
+ def get_database_config():
70
+ """Get database configuration"""
71
+ return DATABASE_CONFIG.copy()