docs: 更新文档路径引用,移除硬编码密钥,修复 Docker 配置
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 7m1s
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 7m1s
This commit is contained in:
@@ -13,9 +13,20 @@ import argparse
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
QDRANT_URL = os.getenv("QDRANT_URL", "http://127.0.0.1:6333")
|
||||
QDRANT_URL = os.getenv("QDRANT_URL")
|
||||
QDRANT_API_KEY = os.getenv("QDRANT_API_KEY")
|
||||
DB_URI = os.getenv("DB_URI", "postgresql://postgres:huang1998@115.190.121.151:5432/langgraph_db?sslmode=disable")
|
||||
|
||||
# PostgreSQL 配置(使用分离配置,优先于 DB_URI)
|
||||
DB_HOST = os.getenv("DB_HOST")
|
||||
DB_PORT = os.getenv("DB_PORT", "5432")
|
||||
DB_USER = os.getenv("DB_USER")
|
||||
DB_PASSWORD = os.getenv("DB_PASSWORD")
|
||||
DB_NAME = os.getenv("DB_NAME")
|
||||
|
||||
# 构建 DB_URI(如果没有直接配置)
|
||||
DB_URI = os.getenv("DB_URI")
|
||||
if not DB_URI and all([DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME]):
|
||||
DB_URI = f"postgresql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}?sslmode=disable"
|
||||
COLLECTION_NAME = "rag_documents"
|
||||
TABLE_NAME = "parent_documents"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user