Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -477,29 +477,33 @@ def generate_trial():
|
|
| 477 |
context = layer_data.get('text', '')
|
| 478 |
|
| 479 |
trial_prompt = f"""
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
|
| 504 |
res = client.models.generate_content(
|
| 505 |
model=ATHENA_FLASH,
|
|
|
|
| 477 |
context = layer_data.get('text', '')
|
| 478 |
|
| 479 |
trial_prompt = f"""
|
| 480 |
+
You are 'Athena's Master Instrumentalist'.
|
| 481 |
+
Subject: {subject}. Layer: {layer_key}. Context: {context}
|
| 482 |
+
|
| 483 |
+
TASK: Forge a bespoke, interactive React component named 'Instrument'.
|
| 484 |
+
This is a TACTILE EXPERIMENT that communicates with the Odysseus Workbench.
|
| 485 |
+
|
| 486 |
+
MANDATORY PROPS INTERFACE:
|
| 487 |
+
- The component receives: `{{ onAction, onWin }}`.
|
| 488 |
+
- `onAction()`: You MUST call this the instant the user interacts (clicks/drags/keys).
|
| 489 |
+
- `onWin()`: You MUST call this when the seeker achieves the scientific goal.
|
| 490 |
+
|
| 491 |
+
RULES FOR THE CODE:
|
| 492 |
+
1. DESIGN: Create a high-contrast lab environment (Dark #0B1120, Gold #D4AF37).
|
| 493 |
+
2. PHYSICS: Use Matter.js for weight and tension.
|
| 494 |
+
3. INTERACTION: Design a specific interaction (e.g. 'Stitching the DNA', 'Managing the Fuel flow').
|
| 495 |
+
4. ENTROPY: The system must have a decay factor. If the user doesn't call `onAction()`, show visual failure.
|
| 496 |
+
5. NO WRAPPERS: Return only the component code. Use React hooks.
|
| 497 |
+
|
| 498 |
+
JSON SCHEMA:
|
| 499 |
+
{{
|
| 500 |
+
"engine": "odysseus_v10",
|
| 501 |
+
"instrument_name": "Unique Title",
|
| 502 |
+
"mission_brief": "Feynman-style objective.",
|
| 503 |
+
"component_code": "const Instrument = ({{ onAction, onWin }}) => {{ ... }}; export default Instrument;",
|
| 504 |
+
"feynman_truth": "The law proven by this instrument."
|
| 505 |
+
}}
|
| 506 |
+
"""
|
| 507 |
|
| 508 |
res = client.models.generate_content(
|
| 509 |
model=ATHENA_FLASH,
|