封装fastAPI openAI接口规范

This commit is contained in:
jeremygan2021
2025-11-04 23:57:37 +08:00
parent a75989c3e6
commit 8a9aef87aa
15 changed files with 904 additions and 7 deletions

19
fastapi_server/start_server.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
echo "启动Lang Agent Chat API服务器..."
# 检查Python环境
if ! command -v python &> /dev/null; then
echo "错误: 未找到Python。请确保Python已安装并添加到PATH中。"
exit 1
fi
# 检查环境变量
if [ -z "$ALI_API_KEY" ]; then
echo "警告: 未设置ALI_API_KEY环境变量。请确保已设置此变量。"
echo "例如: export ALI_API_KEY='your_api_key'"
fi
# 启动服务器
cd "$(dirname "$0")"
python server.py