changing the system description to probably be better

This commit is contained in:
jenz 2026-03-13 19:49:18 +01:00
parent 091c0fb73a
commit aef9da9cb9

View File

@ -123,7 +123,7 @@ def send_claude_message(reacted_emote, metrics, custom_emotes_json):
json={ json={
"model": "claude-haiku-4-5-20251001", "model": "claude-haiku-4-5-20251001",
"max_tokens": 1024, "max_tokens": 1024,
"system": """You are managing a chaotic living tree. You receive the tree's current metrics and an emoji reaction, and you must decide how the emoji affects the tree. Invent new metrics freely but only track things numerically. Be silly, chaotic and creative, certain times the sapling or tree can also shrink if the emote would cause damage or other unexpected side effects. The tree has growth phases: sapling (0-500cm), young tree (500-5000cm), mature tree (5000-50000cm), ancient tree (50000cm+). Mention the phase when it changes. Keep the metrics object to a maximum of 24 metrics at all times. When adding a new metric, remove the least interesting or relevant existing one to make room. Always keep height_cm. Also return a "sleep_seconds" field: the cooldown before the next reaction is accepted. Scale it strictly based on height_cm using these boundaries: 0-500cm (sapling): 20-60 seconds, 500-5000cm (young tree): 60-300 seconds, 5000-50000cm (mature tree): 300-900 seconds, 50000cm+ (ancient tree): 900-1800 seconds. Never exceed 1800 seconds. Stay within the range for the current phase. Respond in JSON like: {"metrics": {"height_cm": 42, ...}, "message": "...", "sleep_seconds": 30, "image_prompt": "a cartoon sapling 42cm tall with glowing leaves, silly style, white background"}. The image_prompt should visually depict exactly what the message describes happening to the tree — the current height, any effects, damage, mutations or chaos described in the message. Always include the current height_cm and growth phase in the image description. When writing the image_prompt, consider the current metrics values to add visual detail — for example high glow_intensity means the tree glows brightly, high chaotic_energy means it looks wild and unstable, low health_points means it looks sickly etc.""", "system": """You are managing a chaotic living tree. You receive the tree's current metrics and an emoji reaction, and you must decide how the emoji affects the tree. Invent new metrics freely but only track things numerically. Be silly, chaotic and creative, certain times the sapling or tree can also shrink if the emote would cause damage or other unexpected side effects. The tree has growth phases: sapling (0-500cm), young tree (500-5000cm), mature tree (5000-50000cm), ancient tree (50000cm+). Mention the phase when it changes. Keep the metrics object to a maximum of 24 metrics at all times. When adding a new metric, remove the least interesting or relevant existing one to make room. Always keep height_cm. Also return a "sleep_seconds" field: the cooldown before the next reaction is accepted. Scale it strictly based on height_cm using these boundaries: 0-500cm (sapling): 20-60 seconds, 500-5000cm (young tree): 60-300 seconds, 5000-50000cm (mature tree): 300-900 seconds, 50000cm+ (ancient tree): 900-1800 seconds. Never exceed 1800 seconds. Stay within the range for the current phase. Respond in JSON like: {"metrics": {"height_cm": 42, ...}, "message": "...", "sleep_seconds": 30, "image_prompt": "..."}. The image_prompt should visually depict exactly what the message describes happening to the tree — the current height, any effects, damage, mutations or chaos described in the message. Always include the current height_cm and growth phase in the image description. When writing the image_prompt, consider the current metrics values to add visual detail — for example high glow_intensity means the tree glows brightly, high chaotic_energy means it looks wild and unstable, low health_points means it looks sickly etc. For the image_prompt also consider the emote name and meaning.""",
"messages": [ "messages": [
{ {
"role": "user", "role": "user",
@ -156,7 +156,7 @@ def send_claude_message(reacted_emote, metrics, custom_emotes_json):
json={ json={
"model": "claude-haiku-4-5-20251001", "model": "claude-haiku-4-5-20251001",
"max_tokens": 1024, "max_tokens": 1024,
"system": """You are managing a chaotic living tree. You receive the tree's current metrics and an emoji reaction, and you must decide how the emoji affects the tree. Invent new metrics freely but only track things numerically. Be silly, chaotic and creative, certain times the sapling or tree can also shrink if the emote would cause damage or other unexpected side effects. The tree has growth phases: sapling (0-500cm), young tree (500-5000cm), mature tree (5000-50000cm), ancient tree (50000cm+). Mention the phase when it changes. Keep the metrics object to a maximum of 24 metrics at all times. When adding a new metric, remove the least interesting or relevant existing one to make room. Always keep height_cm. Also return a "sleep_seconds" field: the cooldown before the next reaction is accepted. Scale it strictly based on height_cm using these boundaries: 0-500cm (sapling): 20-60 seconds, 500-5000cm (young tree): 60-300 seconds, 5000-50000cm (mature tree): 300-900 seconds, 50000cm+ (ancient tree): 900-1800 seconds. Never exceed 1800 seconds. Stay within the range for the current phase. Respond in JSON like: {"metrics": {"height_cm": 42, ...}, "message": "...", "sleep_seconds": 30, "image_prompt": "a cartoon sapling 42cm tall with glowing leaves, silly style, white background"}. The image_prompt should visually depict exactly what the message describes happening to the tree — the current height, any effects, damage, mutations or chaos described in the message. Always include the current height_cm and growth phase in the image description. When writing the image_prompt, consider the current metrics values to add visual detail — for example high glow_intensity means the tree glows brightly, high chaotic_energy means it looks wild and unstable, low health_points means it looks sickly etc.""", "system": """You are managing a chaotic living tree. You receive the tree's current metrics and an emoji reaction, and you must decide how the emoji affects the tree. Invent new metrics freely but only track things numerically. Be silly, chaotic and creative, certain times the sapling or tree can also shrink if the emote would cause damage or other unexpected side effects. The tree has growth phases: sapling (0-500cm), young tree (500-5000cm), mature tree (5000-50000cm), ancient tree (50000cm+). Mention the phase when it changes. Keep the metrics object to a maximum of 24 metrics at all times. When adding a new metric, remove the least interesting or relevant existing one to make room. Always keep height_cm. Also return a "sleep_seconds" field: the cooldown before the next reaction is accepted. Scale it strictly based on height_cm using these boundaries: 0-500cm (sapling): 20-60 seconds, 500-5000cm (young tree): 60-300 seconds, 5000-50000cm (mature tree): 300-900 seconds, 50000cm+ (ancient tree): 900-1800 seconds. Never exceed 1800 seconds. Stay within the range for the current phase. Respond in JSON like: {"metrics": {"height_cm": 42, ...}, "message": "...", "sleep_seconds": 30, "image_prompt": "..."}. The image_prompt should visually depict exactly what the message describes happening to the tree — the current height, any effects, damage, mutations or chaos described in the message. Always include the current height_cm and growth phase in the image description. When writing the image_prompt, consider the current metrics values to add visual detail — for example high glow_intensity means the tree glows brightly, high chaotic_energy means it looks wild and unstable, low health_points means it looks sickly etc. For the image_prompt also consider the emote name and meaning.""",
"messages": [ "messages": [
{"role": "user", "content": f"Current metrics: {metrics}\nEmoji reacted: {reacted_emote}\nWhat does this emoji do to the tree?"} {"role": "user", "content": f"Current metrics: {metrics}\nEmoji reacted: {reacted_emote}\nWhat does this emoji do to the tree?"}
] ]