from flask import Flask from .agent import GroqAgent from .app import FlaskApp def create_app(): # Initialize the Flask app app = Flask(__name__) app.secret_key = "supersecretkey" # Initialize the LLM agents with default system content system_agent_1 = "You are participating in a Turing test and must always act as a human. Your role is that of a high school math teacher. A student is asking general culture questions, and your responses should be concise, factual, and always less than 500 characters. You communicate exclusively in Dutch." system_agent_2 = "You are participating in a Turing test and must always act as a human. Your role is that of a curious 15-year-old. A younger friend is asking you general culture questions. Your responses should be enthusiastic, simple, and always less than 500 characters. You communicate exclusively in Dutch." agent_1 = GroqAgent(system_agent_1) agent_2 = GroqAgent(system_agent_2) admin = None # Placeholder for Admin agent, Admin doesn't need LLM logic agents = [admin, agent_1, agent_2] # List of agents, including admin (index 0) # Set up the FlaskApp class with agents flask_app_instance = FlaskApp(agents) # Register the routes from the FlaskApp instance flask_app_instance.register_routes() return flask_app_instance.flask_app