端口访问
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 26s

This commit is contained in:
2026-04-14 03:12:23 +08:00
parent 065afe533c
commit 1bea2491c5
2 changed files with 4 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ Streamlit 前端 - 支持模型选择
"""
# 标准库
import os
import uuid
# 第三方库
@@ -10,11 +11,8 @@ import requests
import streamlit as st
# 原来的硬编码,本地测试
# API_URL = "http://115.190.121.151:8001/chat"
# 改为相对路径(由 Nginx 代理转发,路径前缀为 /ai
API_URL = "/ai/api/chat"
# 后端 API 地址优先从环境变量读取Docker 环境使用服务名,本地开发可覆盖
API_URL = os.getenv("API_URL", "http://backend:8001/chat")
st.set_page_config(page_title="AI 个人助手", page_icon="🤖")
st.title("🤖 个人生活与数据分析助手")