diff --git a/slop_with_models.py b/slop_with_models.py index 2b0e69d..da8cbec 100644 --- a/slop_with_models.py +++ b/slop_with_models.py @@ -1,4 +1,4 @@ -from flask import Flask, request, jsonify +from flask import Flask, request, jsonify, render_template_string from datetime import datetime import os import json @@ -687,6 +687,99 @@ 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") + html_template = """ + + + + SLOP API Server + + + +

SLOP API Server

+

Welcome to the SLOP API Server v1.0

+ + + +
+

API Endpoints:

+ +
+ + + """ + return render_template_string(html_template) + + @app.route("/memory", methods=["POST"]) def store_memory(): logger.info("Received /memory POST request")