Spaces:
Sleeping
Sleeping
Deploy Myco from CI
Browse files- game/engine.py +14 -0
game/engine.py
CHANGED
|
@@ -690,4 +690,18 @@ def eat_current(current=None, collection=None, history=None):
|
|
| 690 |
|
| 691 |
reply = _llm(prompt, ctx) or fallback_reply
|
| 692 |
return coll, _append(hist, "assistant", reply)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 693 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 690 |
|
| 691 |
reply = _llm(prompt, ctx) or fallback_reply
|
| 692 |
return coll, _append(hist, "assistant", reply)
|
| 693 |
+
|
| 694 |
+
# Shroom
|
| 695 |
+
|
| 696 |
+
def get_myco_narrative():
|
| 697 |
+
"""
|
| 698 |
+
Asks the AI to generate a short, whimsical mushroom-related thought.
|
| 699 |
+
"""
|
| 700 |
+
prompt = "You are a cute, tiny Myco AI living in a magical garden. Write a very short, friendly, under 80-character thought about mushrooms or the forest."
|
| 701 |
|
| 702 |
+
try:
|
| 703 |
+
# Generate the response via your imported AI
|
| 704 |
+
narrative = generate_text(prompt)
|
| 705 |
+
return narrative[:80] # Hard limit to ensure it fits the UI
|
| 706 |
+
except:
|
| 707 |
+
return "The mycelium is dreaming... ✨"
|