Spaces:
Sleeping
Sleeping
File size: 1,375 Bytes
5c9e936 3ede616 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 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 |