-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
11 lines (11 loc) · 1.59 KB
/
Copy pathrender.yaml
File metadata and controls
11 lines (11 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
services:
# Standalone chatbot service (WebSocket + Streamlit UI)
- type: web
name: faq-rag-agent-chatbot-e5b673
runtime: python
plan: free
buildCommand: pip install torch==2.6.0+cpu scikit-learn==1.6.1 besser-agentic-framework[llms]==4.3.2 --extra-index-url https://download.pytorch.org/whl/cpu && python -c "import nltk; nltk.download('punkt', quiet=True); nltk.download('punkt_tab', quiet=True)"
startCommand: python -c "import yaml, os; c = yaml.safe_load(open('config.yaml')); c['platforms']['websocket']['host'] = '0.0.0.0'; c['platforms']['websocket']['port'] = 8765; ws = c['platforms']['websocket']; streamlit_cfg = ws.setdefault('streamlit', {}); streamlit_cfg['host'] = '0.0.0.0'; streamlit_cfg['port'] = int(os.environ['PORT']); c['db']['monitoring']['enabled'] = False; sdb = c['db'].setdefault('streamlit', {}); db_host = os.environ.get('STREAMLIT_DB_HOST'); sdb['enabled'] = bool(db_host); sdb['dialect'] = os.environ.get('STREAMLIT_DB_DIALECT', 'postgresql'); sdb['host'] = db_host or 'localhost'; sdb['port'] = int(os.environ.get('STREAMLIT_DB_PORT') or 5432); sdb['database'] = os.environ.get('STREAMLIT_DB_NAME', ''); sdb['username'] = os.environ.get('STREAMLIT_DB_USER', ''); sdb['password'] = os.environ.get('STREAMLIT_DB_PASSWORD', ''); nlp_cfg = c.setdefault('nlp', {}); openai_cfg = nlp_cfg.setdefault('openai', {}); api_key = os.environ.get('OPENAI_API_KEY'); openai_cfg['api_key'] = api_key if api_key else openai_cfg.get('api_key', ''); yaml.safe_dump(c, open('config.yaml','w'))" && python -u "FAQ_RAG_Agent.py"
envVars:
- key: PYTHON_VERSION
value: 3.12.3