Commit 47500ce6 by sunqi02

更新IM对应

1 parent 724a2f0c
......@@ -4,5 +4,5 @@ DATABASE_URL=sqlite:///./dev.db
# IM 服务
USE_CONSOLE_IM=false
IM_BASE_URL=http://im-service:80
IM_API_KEY=your-api-key
IM_BASE_URL=http://yjy.dev.glsx.com.cn/webim
IM_API_KEY=
......@@ -35,12 +35,12 @@ async def lifespan(app: FastAPI):
db = SessionLocal()
session_service = SessionService(db)
if os.getenv("USE_CONSOLE_IM", "true").lower() == "true":
if os.getenv("USE_CONSOLE_IM", "false").lower() == "true":
im_service = ConsoleIMService()
else:
im_service = IMService(
base_url=os.getenv("IM_BASE_URL", "http://localhost:8080"),
api_key=os.getenv("IM_API_KEY", "your-api-key"),
base_url=os.getenv("IM_BASE_URL", "http://yjy.dev.glsx.com.cn/webim"),
api_key=os.getenv("IM_API_KEY") or None,
)
agent_hub_instance = AgentHub(
......
......@@ -9,7 +9,7 @@ services:
required: false
environment:
- DATABASE_URL=${DATABASE_URL}
- IM_BASE_URL=${IM_BASE_URL}
- IM_BASE_URL=${IM_BASE_URL:-http://yjy.dev.glsx.com.cn/webim}
- USE_CONSOLE_IM=${USE_CONSOLE_IM:-false}
deploy:
resources:
......
......@@ -15,8 +15,8 @@ services:
required: false
environment:
- DATABASE_URL=${DATABASE_URL:-sqlite:///./dev.db}
- IM_BASE_URL=${IM_BASE_URL:-http://im-service:80}
- USE_CONSOLE_IM=${USE_CONSOLE_IM:-true}
- IM_BASE_URL=${IM_BASE_URL:-http://yjy.dev.glsx.com.cn/webim}
- USE_CONSOLE_IM=${USE_CONSOLE_IM:-false}
depends_on:
- im-service
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!