-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnexus_chat_cli.py
More file actions
38 lines (30 loc) · 1.17 KB
/
nexus_chat_cli.py
File metadata and controls
38 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import requests
import sys
import json
SERVER_URL = "http://localhost:3002/chat"
def chat():
print("🛡️ ANTIGRAVITY-UNREALENGINE-MAX - NL AGENT BUILDER")
print("------------------------------------------")
print("Type your message to the Nexus AI (Type 'quit' to exit)")
while True:
user_input = input("\n👤 YOU: ")
if user_input.lower() in ['quit', 'exit', 'q']:
print("Shutting down NLP terminal link...")
break
try:
response = requests.post(SERVER_URL, json={
"message": user_input,
"context": {
"source": "cli",
"system": "Antigravity Nexus V1.0.2"
}
})
if response.status_code == 200:
data = response.json()
print(f"\n🤖 AI: {data['response']}")
else:
print(f"\n❌ Error: Server returned {response.status_code}")
except Exception as e:
print(f"\n❌ Connection Failed: Is the Nexus Bridge running on port 3002?")
if __name__ == "__main__":
chat()