Update requirements and enhance environment variable loading in gateway
- Updated requirements.txt to uncomment and ensure the installation of `python-telegram-bot` and `discord.py` packages. - Enhanced the gateway run script to load environment variables from a specified path, improving configuration management and flexibility for different environments.
This commit is contained in:
parent
5d3398aa8a
commit
3e634aa7e4
2 changed files with 10 additions and 2 deletions
|
|
@ -24,6 +24,14 @@ from typing import Dict, Optional, Any, List
|
||||||
# Add parent directory to path
|
# Add parent directory to path
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
|
# Load environment variables from ~/.hermes/.env
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
_env_path = Path.home() / '.hermes' / '.env'
|
||||||
|
if _env_path.exists():
|
||||||
|
load_dotenv(_env_path)
|
||||||
|
# Also try project .env as fallback
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
from gateway.config import (
|
from gateway.config import (
|
||||||
Platform,
|
Platform,
|
||||||
GatewayConfig,
|
GatewayConfig,
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ croniter
|
||||||
|
|
||||||
# Optional: For messaging platform integrations (gateway)
|
# Optional: For messaging platform integrations (gateway)
|
||||||
# Telegram: pip install python-telegram-bot
|
# Telegram: pip install python-telegram-bot
|
||||||
# python-telegram-bot>=20.0
|
python-telegram-bot>=20.0
|
||||||
|
|
||||||
# Discord: pip install discord.py
|
# Discord: pip install discord.py
|
||||||
# discord.py>=2.0
|
discord.py>=2.0
|
||||||
|
|
||||||
# WhatsApp: Requires Node.js bridge (see docs/messaging.md)
|
# WhatsApp: Requires Node.js bridge (see docs/messaging.md)
|
||||||
# aiohttp # For WhatsApp bridge communication
|
# aiohttp # For WhatsApp bridge communication
|
||||||
Loading…
Add table
Add a link
Reference in a new issue