- 端口从 19007+19008 合并为 19007 - 前台API: http://localhost:19007/v1/chat/completions - 后台管理: http://localhost:19007/admin - 新增 templates 目录,整合管理页面模板 - 更新所有路由为 /admin 路径 - 后台API统一到 /api/admin 路径下
27 lines
522 B
Python
27 lines
522 B
Python
#!/usr/bin/env python3
|
|
"""简单的测试服务"""
|
|
|
|
from flask import Flask, jsonify
|
|
from flask_cors import CORS
|
|
|
|
app = Flask(__name__)
|
|
CORS(app)
|
|
|
|
@app.route('/')
|
|
def index():
|
|
return jsonify({
|
|
"name": "LLM Proxy",
|
|
"status": "running"
|
|
})
|
|
|
|
@app.route('/health')
|
|
def health():
|
|
return jsonify({"status": "ok"})
|
|
|
|
if __name__ == '__main__':
|
|
print("=" * 50)
|
|
print("LLM Proxy Test Server")
|
|
print("=" * 50)
|
|
print("Port: 19007")
|
|
print("=" * 50)
|
|
app.run(host='0.0.0.0', port=19007) |