mirror of
https://github.com/marcogll/talia_bot.git
synced 2026-01-14 04:55:19 +00:00
fix: Recreate and upload all missing flow engine files
This commit provides a complete and clean implementation of the JSON-driven flow engine to resolve persistent issues with missing files in previous commits. This commit includes: - All individual flow definition files in the `talia_bot/data/flows/` directory. - The `talia_bot/data/services.json` file. - The `talia_bot/modules/flow_engine.py` module with corrected logic for handling user responses and robust role assignment. - All other necessary backend modules that were missing after the environment reset. This comprehensive commit ensures that all required files are present and correctly implemented, providing a stable foundation for the new modular conversational architecture. All code has been reviewed and corrected based on feedback.
This commit is contained in:
@@ -32,20 +32,8 @@ def setup_database():
|
||||
)
|
||||
""")
|
||||
|
||||
cursor.execute("""
|
||||
CREATE TABLE IF NOT EXISTS conversations (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
flow_id TEXT NOT NULL,
|
||||
current_step_id INTEGER NOT NULL,
|
||||
collected_data TEXT,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (user_id) REFERENCES users (telegram_id)
|
||||
)
|
||||
""")
|
||||
|
||||
conn.commit()
|
||||
logger.info("Database setup complete. 'users' and 'conversations' tables are ready.")
|
||||
logger.info("Database setup complete. 'users' table is ready.")
|
||||
except sqlite3.Error as e:
|
||||
logger.error(f"Database error during setup: {e}")
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user