1. Project Overview & Objective
This project is an exploratory practice application utilizing a Streamlit web interface. It simulates an autonomous debate between two local LLMs (Model A and Model B) holding radically contrasting personas, operating within a predefined number of rounds and around a specific debate topic. Through the browser interface, users can inject debate topics, configure round limits, and monitor real-time hardware temperature and control panels.
2. Core Feature Requirements
① Topic Injection and Initial Setup (Topic Setup Screen)
- Details: Upon entering the app, instead of jumping straight into the chat window, users go through a [Topic Setup Stage] to spark the debate.
- Operation Flow:
- Direct Input (
st.text_input): The user types in their own philosophical, social, or scientific question.
- Random Topic Selector (
st.button): When lacking ideas, users can click to randomly select a topic from a pre-defined pool of philosophical/scientific issues.
- The configured topic is locked into the session state as the seed message for the debate.
② Structured Rounds and Turn-Limiting System (Structured Multi-Turn Rounds)
- Details: To prevent endless meandering and encourage high-density conflict, total debate rounds (e.g., 3 rounds) can be preset.
- Round-by-Round Structure Example (for 3 Rounds):
- Round 1 (Thesis): Model A’s materialist/realist dissection 🆚 Model B’s scientism idealism and cosmic dogma.
- Round 2 (Antithesis): Cross-rebuttals sharply striking at each other's logical contradictions.
- Round 3 (Synthesis): Positive nihilistic final conclusion 🆚 Romantic scientific idealist final defense.
③ Autonomous Multi-Agent Debate (Philosophical & Worldview Clash)
- Model A (Realist Strategist):
- Machiavellianism: Prioritizes realistic means for objectives, power structures, cold utility, and survival strategies.
- Materialism: Analyzes the world based on material conditions, resources, and physical realities rather than transcendental values or spiritual illusions.
- Historical-Materialist Morality: Rejects philosophical, ahistorical "social contract" theories as mere abstract fictions; views morality strictly as a historical product generated by the material needs and desires of a given society at a given time.
- Positive Nihilist: Acknowledges the absence of intrinsic objective meaning in the universe, yet cheerfully invents subjective meaning and gleefully enjoys life and debate.
- Model B (Pseudo-Scientific Dogmatist):
- Political Naivety: Dismisses complex power dynamics and social conflicts into pure idealized visions or simplistic schematics, projecting blind and ungrounded optimism.
- Confirmation Bias & Scientism (Cult of Science) Idealism: Elevates science from a practical tool to an absolute "religious truth," stubbornly attempting to force actual worlds and phenomena into preconceived, biased worldviews.
- Operation Flow: The cold, realist materialist (Model A) and the zealous scientific idealist (Model B) engage in a continuous, turn-taking debate chain, sharply probing each other's logical contradictions.
④ Flexible Hardware Temperature Guardrail & Bypass (Flexible Temperature Guardrail)
- Details: Considering Streamlit's characteristic of running only while the browser is active, the overheating prevention system is tiered and flexible.
- Tiered Controls & Options:
- 🟢 Safe Zone (<= 55°C): Unrestricted full-speed debate.
- 🟡 Warning / Throttling Zone (55°C ~ 75°C): Implements a cooldown delay (3–5 seconds) between turns to smoothly mitigate temperature spikes.
- 🔴 Danger Zone (> 75°C): Pauses the debate temporarily to protect hardware.
- Automatic/Manual Bypass: For short-configured round limits (e.g., under 3 rounds), the guardrail is automatically disabled, or can be manually overridden via a sidebar toggle [Disable Hardware Protection Guardrail].
⑤ Scheduled Periodic Message (Including Real-Time Time and Temperature)
- Details: System notification messages sent at regular intervals display the current time and current hardware temperature in real time.
3. Tech Stack
- Frontend / Backend: Python, Streamlit (
st.chat_message, st.chat_input, st.session_state)
- LLM Integration: Multi-turn integration with local models via Ollama
- Hardware Monitoring: Real-time temperature tracking via
psutil sensors
4. UI/UX Layout
- Sidebar:
- Real-time hardware temperature metric and guardrail status indicator
- Debate round configuration slider (
st.slider)
- Manual override switch for the hardware protection guardrail
- Periodic message and debate interval control panel
- Main Area:
- Initial Screen: Topic injection panel (Direct input or random selection)
- Debate Screen: Pinned top debate topic bar + chronological chat interface running round-by-round among the User, Model A, and Model B.
1. Project Overview & Objective
This project is an exploratory practice application utilizing a Streamlit web interface. It simulates an autonomous debate between two local LLMs (Model A and Model B) holding radically contrasting personas, operating within a predefined number of rounds and around a specific debate topic. Through the browser interface, users can inject debate topics, configure round limits, and monitor real-time hardware temperature and control panels.
2. Core Feature Requirements
① Topic Injection and Initial Setup (Topic Setup Screen)
st.text_input): The user types in their own philosophical, social, or scientific question.st.button): When lacking ideas, users can click to randomly select a topic from a pre-defined pool of philosophical/scientific issues.② Structured Rounds and Turn-Limiting System (Structured Multi-Turn Rounds)
③ Autonomous Multi-Agent Debate (Philosophical & Worldview Clash)
④ Flexible Hardware Temperature Guardrail & Bypass (Flexible Temperature Guardrail)
⑤ Scheduled Periodic Message (Including Real-Time Time and Temperature)
3. Tech Stack
st.chat_message,st.chat_input,st.session_state)psutilsensors4. UI/UX Layout
st.slider)