Fix 404 error: Add root route with Streamlit UI link

This commit is contained in:
Russell Ballestrini 2025-07-19 09:12:34 -04:00
parent 0420769752
commit 5a7ead0335

View file

@ -687,6 +687,24 @@ def play_blackjack(bet, agent_id, game_id=None, action=None):
LOCK_TIMEOUT = 2 # Seconds to wait for lock acquisition
@app.route("/", methods=["GET"])
def index():
logger.info("Received / GET request")
return jsonify({
"message": "SLOP API Server",
"version": "1.0",
"streamlit_ui": "https://streamlit.slop.unturf.com/",
"endpoints": {
"/memory": "Memory storage endpoints",
"/chat": "Chat completion endpoint",
"/models": "List available models",
"/tools": "Tool execution endpoints",
"/resources": "Resource management",
"/pay": "Payment processing"
}
})
@app.route("/memory", methods=["POST"])
def store_memory():
logger.info("Received /memory POST request")