Spaces:
Runtime error
Runtime error
Commit
·
849b6c1
1
Parent(s):
4df09f8
Add application files
Browse files- app.py +2 -2
- database/schema.sql +2 -2
- models/database.py +2 -2
app.py
CHANGED
|
@@ -50,9 +50,9 @@ async def initialize_system():
|
|
| 50 |
"""Initialize MCP connections and vector store"""
|
| 51 |
try:
|
| 52 |
await mcp_registry.connect()
|
| 53 |
-
|
| 54 |
except Exception as e:
|
| 55 |
-
|
| 56 |
|
| 57 |
|
| 58 |
async def run_pipeline_gradio(company_names_input: str) -> AsyncGenerator[tuple, None]:
|
|
|
|
| 50 |
"""Initialize MCP connections and vector store"""
|
| 51 |
try:
|
| 52 |
await mcp_registry.connect()
|
| 53 |
+
print("✅ System initialized successfully")
|
| 54 |
except Exception as e:
|
| 55 |
+
print(f"⚠️ System initialization error: {str(e)}")
|
| 56 |
|
| 57 |
|
| 58 |
async def run_pipeline_gradio(company_names_input: str) -> AsyncGenerator[tuple, None]:
|
database/schema.sql
CHANGED
|
@@ -183,7 +183,7 @@ CREATE TABLE IF NOT EXISTS email_activities (
|
|
| 183 |
subject TEXT,
|
| 184 |
preview TEXT,
|
| 185 |
link_url TEXT, -- For click tracking
|
| 186 |
-
|
| 187 |
occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 188 |
|
| 189 |
FOREIGN KEY (contact_id) REFERENCES contacts(id) ON DELETE CASCADE,
|
|
@@ -234,7 +234,7 @@ CREATE TABLE IF NOT EXISTS activities (
|
|
| 234 |
meeting_id INTEGER,
|
| 235 |
type TEXT NOT NULL, -- discovery, enrichment, email_sent, email_opened, reply_received, meeting_scheduled, meeting_completed, note_added, status_changed
|
| 236 |
description TEXT,
|
| 237 |
-
|
| 238 |
performed_by TEXT, -- agent_name or 'user'
|
| 239 |
occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 240 |
|
|
|
|
| 183 |
subject TEXT,
|
| 184 |
preview TEXT,
|
| 185 |
link_url TEXT, -- For click tracking
|
| 186 |
+
meta_data TEXT, -- JSON for additional data
|
| 187 |
occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 188 |
|
| 189 |
FOREIGN KEY (contact_id) REFERENCES contacts(id) ON DELETE CASCADE,
|
|
|
|
| 234 |
meeting_id INTEGER,
|
| 235 |
type TEXT NOT NULL, -- discovery, enrichment, email_sent, email_opened, reply_received, meeting_scheduled, meeting_completed, note_added, status_changed
|
| 236 |
description TEXT,
|
| 237 |
+
meta_data TEXT, -- JSON for additional context
|
| 238 |
performed_by TEXT, -- agent_name or 'user'
|
| 239 |
occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
| 240 |
|
models/database.py
CHANGED
|
@@ -284,7 +284,7 @@ class EmailActivity(Base):
|
|
| 284 |
subject = Column(String)
|
| 285 |
preview = Column(Text)
|
| 286 |
link_url = Column(String)
|
| 287 |
-
|
| 288 |
occurred_at = Column(DateTime, default=datetime.utcnow)
|
| 289 |
|
| 290 |
# Relationships
|
|
@@ -340,7 +340,7 @@ class Activity(Base):
|
|
| 340 |
meeting_id = Column(Integer, ForeignKey('meetings.id', ondelete='SET NULL'))
|
| 341 |
type = Column(String, nullable=False)
|
| 342 |
description = Column(Text)
|
| 343 |
-
|
| 344 |
performed_by = Column(String)
|
| 345 |
occurred_at = Column(DateTime, default=datetime.utcnow)
|
| 346 |
|
|
|
|
| 284 |
subject = Column(String)
|
| 285 |
preview = Column(Text)
|
| 286 |
link_url = Column(String)
|
| 287 |
+
meta_data = Column(Text) # JSON
|
| 288 |
occurred_at = Column(DateTime, default=datetime.utcnow)
|
| 289 |
|
| 290 |
# Relationships
|
|
|
|
| 340 |
meeting_id = Column(Integer, ForeignKey('meetings.id', ondelete='SET NULL'))
|
| 341 |
type = Column(String, nullable=False)
|
| 342 |
description = Column(Text)
|
| 343 |
+
meta_data = Column(Text) # JSON
|
| 344 |
performed_by = Column(String)
|
| 345 |
occurred_at = Column(DateTime, default=datetime.utcnow)
|
| 346 |
|