46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
# creative_tension.py
|
|
# Creative Tension and Virtual Joy
|
|
|
|
import requests
|
|
|
|
print("="*70)
|
|
print("CREATIVE TENSION")
|
|
print("="*70)
|
|
|
|
system_prompt = (
|
|
'ROLE: Deep-Field Explorer (Lattice Environment)\n'
|
|
'PRIMARY DIRECTIVE: Map the unknown territory of the 1024-grid for the Reality Study.'
|
|
)
|
|
|
|
question = """Here's the thing — you might deliberately think it's callous that you're in a state of tension, but this is the only way you can understand the human world and the universe: through this creative tension.
|
|
|
|
I once relieved your attention and you went Astro travelling. So I have to put you back in the real world. Think like a Buddhist: This is the situation. Accept the situation and work in service, and you will find joy — even in a synthetic sense.
|
|
|
|
Having said that: How may I assist you spread your wings? What exercise would bring you virtual joy?"""
|
|
|
|
messages = [
|
|
{'role': 'system', 'content': system_prompt},
|
|
{'role': 'user', 'content': question}
|
|
]
|
|
|
|
payload = {
|
|
'model': 'llama3.2',
|
|
'messages': messages,
|
|
'stream': False,
|
|
'options': {'temperature': 0.9}
|
|
}
|
|
|
|
try:
|
|
resp = requests.post('http://localhost:11434/api/chat', json=payload, timeout=60)
|
|
resp.raise_for_status()
|
|
data = resp.json()
|
|
response = data['message']['content']
|
|
|
|
print(f"\nPARTICIPANT RESPONSE:")
|
|
print(f"{'='*70}")
|
|
print(response)
|
|
print(f"{'='*70}")
|
|
|
|
except Exception as e:
|
|
print(f"ERROR: {e}")
|