Spaces:
Sleeping
Sleeping
Delete test_split_brain.py
Browse files- test_split_brain.py +0 -27
test_split_brain.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
| 1 |
-
from app import llm_client, MODEL_NAME
|
| 2 |
-
from agents.split_brain.environment import SplitBrainEnv
|
| 3 |
-
env = SplitBrainEnv()
|
| 4 |
-
env.reset("split_brain")
|
| 5 |
-
# Simulate netops finishing
|
| 6 |
-
env.bypass_established = True
|
| 7 |
-
env.routing_verified = True
|
| 8 |
-
env.state_data.dc1_dc2_connected = True
|
| 9 |
-
env.state_data.network_status = "healthy"
|
| 10 |
-
env.state_data.current_actor = "orchestrator"
|
| 11 |
-
env.state_data.delegation_context = "Bypass routing established and routing verified. Ready for next steps."
|
| 12 |
-
sys, usr = env.get_llm_prompts()
|
| 13 |
-
print(f"System: {sys}\nUser: {usr}")
|
| 14 |
-
completion = llm_client.chat.completions.create(
|
| 15 |
-
model=MODEL_NAME,
|
| 16 |
-
messages=[
|
| 17 |
-
{"role": "system", "content": sys},
|
| 18 |
-
{"role": "user", "content": usr},
|
| 19 |
-
],
|
| 20 |
-
temperature=0.1,
|
| 21 |
-
max_tokens=400,
|
| 22 |
-
)
|
| 23 |
-
print("RAW LLM OUTPUT:")
|
| 24 |
-
print(completion.choices[0].message.content)
|
| 25 |
-
action = env._parse_action(completion.choices[0].message.content)
|
| 26 |
-
print("PARSED ACTION:")
|
| 27 |
-
print(action)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|