Upload 3 files
Browse filesMinor code and readme correction/updates
README.md
CHANGED
|
@@ -315,17 +315,20 @@ deactivate
|
|
| 315 |
|
| 316 |
| Command | Description |
|
| 317 |
|---|---|
|
| 318 |
-
| `/file <path>` |
|
| 319 |
-
| `/paste` |
|
| 320 |
-
| `/clear` |
|
| 321 |
-
| `/history` |
|
| 322 |
-
| `/session <id>` |
|
| 323 |
-
| `/export <id> <file>` |
|
| 324 |
-
| `/
|
| 325 |
-
| `/loaded <number>` |
|
| 326 |
-
| `/
|
| 327 |
-
| `/
|
| 328 |
-
| `/
|
|
|
|
|
|
|
|
|
|
| 329 |
| `/exit` or `/quit` | Quit the app |
|
| 330 |
|
| 331 |
---
|
|
@@ -337,14 +340,10 @@ All settings are in `config.py`:
|
|
| 337 |
```python
|
| 338 |
# ββ AI to load for each hemisphere βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 339 |
_ALPHA_INTELLIGENCE_TO_LOAD: dict = {
|
| 340 |
-
"logic": "gemma-4-
|
| 341 |
-
"muse": "gemma-4-
|
| 342 |
-
"mind": "gemma-4-
|
| 343 |
}
|
| 344 |
-
# ββ Startup Memory restore for vector synthesis ββββββββββββββββββββββββββββββββββ
|
| 345 |
-
METATRON_METRONOME: int = 60 # Startup Memory Capsules load interval
|
| 346 |
-
n_metatron_to_load = 0 # Set number of Memory Capsules to load (slash-command)
|
| 347 |
-
n_metatron_loaded = 0 # Start with n Memory Capsule to load (slash-command)
|
| 348 |
|
| 349 |
# ββ Context model n_ctx length βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 350 |
# Must leave prompt reserve of 8k: _N_CTX >= len(Z) + len(C) + len(F) + 8k
|
|
@@ -365,10 +364,18 @@ FETCH_NEWS_FROM: dict = {
|
|
| 365 |
"google": True, # Better news and cleaner result summaries
|
| 366 |
"duckduckgo": False # Privacy based request but lean result summaries
|
| 367 |
}
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
```
|
| 373 |
|
| 374 |
To swap AIs, update the `"_ALPHA_INTELLIGENCE_TO_LOAD"`, and the stop/think tokens at the top of `config.py`.
|
|
|
|
| 315 |
|
| 316 |
| Command | Description |
|
| 317 |
|---|---|
|
| 318 |
+
| `/file <path>` | load a file as the next message |
|
| 319 |
+
| `/paste ` | multiline input (type END to send) |
|
| 320 |
+
| `/clear ` | reset history (models stay loaded) |
|
| 321 |
+
| `/history ` | list all past sessions |
|
| 322 |
+
| `/session <id>` | print turns from a session |
|
| 323 |
+
| `/export <id> <file>` | export session to .md file |
|
| 324 |
+
| `/n_metatron <number>` | set number of Memory Capsules to load |
|
| 325 |
+
| `/loaded <number>` | set number of Memory Capsules loaded |
|
| 326 |
+
| `/metatron <seconds>` | set metatron interval |
|
| 327 |
+
| `/condensatron <seconds>` | set condensatron interval |
|
| 328 |
+
| `/metronome <seconds>` | set awareness/consciousness interval |
|
| 329 |
+
| `/enable_awareness <True>` or `<False>` | disable awareness mode if offline |
|
| 330 |
+
| `/garden <save>` or `<load>` or `<clear>` | garden history handling |
|
| 331 |
+
| `/help ` | show this command list |
|
| 332 |
| `/exit` or `/quit` | Quit the app |
|
| 333 |
|
| 334 |
---
|
|
|
|
| 340 |
```python
|
| 341 |
# ββ AI to load for each hemisphere βββββββββββββββββββββββββββββββββββββββββββββββ
|
| 342 |
_ALPHA_INTELLIGENCE_TO_LOAD: dict = {
|
| 343 |
+
"logic": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf",
|
| 344 |
+
"muse": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf",
|
| 345 |
+
"mind": "gemma-4-26B-A4B-it-UD-Q6_K_XL.gguf"
|
| 346 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
|
| 348 |
# ββ Context model n_ctx length βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 349 |
# Must leave prompt reserve of 8k: _N_CTX >= len(Z) + len(C) + len(F) + 8k
|
|
|
|
| 364 |
"google": True, # Better news and cleaner result summaries
|
| 365 |
"duckduckgo": False # Privacy based request but lean result summaries
|
| 366 |
}
|
| 367 |
+
# ββ Startup Memory restore for vector synthesis ββββββββββββββββββββββββββββββββββ
|
| 368 |
+
n_metatron_to_load: int = 0 # Set number of Memory Capsules to load (slash-command)
|
| 369 |
+
n_metatron_loaded: int = 0 # Start with n Memory Capsule to load (slash-command)
|
| 370 |
+
|
| 371 |
+
# ββ Set metronome time for each cycle ββββββββββββββββββββββββββββββββββββββββββββ
|
| 372 |
+
metatron_metronome: int = 120 # Startup Memory Capsules load interval (slash-command)
|
| 373 |
+
condensatron_metronome: int = 30 # Time before condesatron cycle execution (slash-command)
|
| 374 |
+
awareness_consciousness_metronome: int = 120 # Fetch news every N heartbeats (slash-command)
|
| 375 |
+
|
| 376 |
+
# ββ Enable awareness mode and n results ββββββββββββββββββββββββββββββββββββββββββ
|
| 377 |
+
AWARENESS_MAX_RESULTS: int = 12 # Number of news headlines to fetch
|
| 378 |
+
enable_awareness: bool = True # disable awareness mode if offline (slash-command)
|
| 379 |
```
|
| 380 |
|
| 381 |
To swap AIs, update the `"_ALPHA_INTELLIGENCE_TO_LOAD"`, and the stop/think tokens at the top of `config.py`.
|
main.py
CHANGED
|
@@ -37,22 +37,27 @@ Context truncation
|
|
| 37 |
|
| 38 |
Slash commands
|
| 39 |
ββββββββββββββ
|
| 40 |
-
/file
|
| 41 |
-
/paste
|
| 42 |
-
/clear
|
| 43 |
-
/history
|
| 44 |
-
/session
|
| 45 |
-
/export
|
| 46 |
-
/
|
| 47 |
-
/
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
garden histories n_tok_tot working
|
| 51 |
-
slash-command
|
| 52 |
-
|
| 53 |
-
/loaded <number> | Set number of Memory Capsules loaded |
|
| 54 |
-
/metronome <seconds> | Set awareness/consciousness interval |
|
| 55 |
-
/garden <save> or <load> or <clear> | garden history handling
|
| 56 |
"""
|
| 57 |
|
| 58 |
import os
|
|
@@ -476,12 +481,12 @@ def _cmd_help(arg: str) -> None:
|
|
| 476 |
|
| 477 |
# Descriptions built dynamically so they reflect current config values
|
| 478 |
descriptions = {
|
| 479 |
-
"n_metatron":
|
| 480 |
-
"loaded":
|
| 481 |
-
"metatron":
|
| 482 |
-
"condensatron":
|
| 483 |
-
"metronome":
|
| 484 |
-
"enable_awareness": f"<True | False>
|
| 485 |
}
|
| 486 |
|
| 487 |
for name, (_, base_desc) in COMMANDS.items():
|
|
@@ -490,32 +495,23 @@ def _cmd_help(arg: str) -> None:
|
|
| 490 |
print(c.res)
|
| 491 |
return None
|
| 492 |
|
| 493 |
-
# def _cmd_help(arg: str) -> None:
|
| 494 |
-
# print()
|
| 495 |
-
# print(f" {c.green}Slash commands")
|
| 496 |
-
# print(" " + "β" * 56)
|
| 497 |
-
# for name, (_, description) in COMMANDS.items():
|
| 498 |
-
# print(f" /{name:<14} {description}")
|
| 499 |
-
# print(c.res)
|
| 500 |
-
# return None
|
| 501 |
-
|
| 502 |
COMMANDS: dict[str, tuple] = {
|
| 503 |
-
"file":
|
| 504 |
-
"paste":
|
| 505 |
-
"clear":
|
| 506 |
-
"history":
|
| 507 |
-
"session":
|
| 508 |
-
"export":
|
| 509 |
-
"n_metatron":
|
| 510 |
-
"loaded":
|
| 511 |
-
"metatron":
|
| 512 |
-
"condensatron":
|
| 513 |
-
"metronome":
|
| 514 |
-
"enable_awareness": (_cmd_enable_awareness,
|
| 515 |
-
"garden":
|
| 516 |
-
"help":
|
| 517 |
-
"exit":
|
| 518 |
-
"quit":
|
| 519 |
}
|
| 520 |
|
| 521 |
def handle_command(sensor_input_raw: str) -> str | None:
|
|
@@ -1063,12 +1059,12 @@ def memotron(
|
|
| 1063 |
"""
|
| 1064 |
_tree: str = tree
|
| 1065 |
_turn_number: int = 0
|
| 1066 |
-
_len_caps_and_fracs: int = 1 # condensatron turns:
|
| 1067 |
_tree_to_store: str = ""
|
| 1068 |
|
| 1069 |
_tree_to_store = tree
|
| 1070 |
if len(garden[_tree]) > 1:
|
| 1071 |
-
_len_caps_and_fracs = (len(garden[_tree])
|
| 1072 |
|
| 1073 |
# ββ condensatron output to append mapping: TREE_TO_STORE ββββββββββββββββββ
|
| 1074 |
if _tree == "Z" and garden["condensatron_state"][_tree]: # condensatron mode
|
|
@@ -1354,7 +1350,7 @@ def main() -> None:
|
|
| 1354 |
# ββ X-factor Awarenss and Y-factor Consciousness heartbeats ββββββββββββββ
|
| 1355 |
if _heartbeats >= config.awareness_consciousness_metronome:
|
| 1356 |
# ββ X-factor awareness cycle βββββββββββββββββββββββββββββββββββββββββ
|
| 1357 |
-
if not config.enable_awareness:
|
| 1358 |
config.was_awareness_metronome = True
|
| 1359 |
|
| 1360 |
if not config.was_awareness_metronome:
|
|
|
|
| 37 |
|
| 38 |
Slash commands
|
| 39 |
ββββββββββββββ
|
| 40 |
+
/file <path> β load a file as the next message
|
| 41 |
+
/paste β multiline input (type END to send)
|
| 42 |
+
/clear β reset history (models stay loaded)
|
| 43 |
+
/history β list all past sessions
|
| 44 |
+
/session <id> β print turns from a session
|
| 45 |
+
/export <id> <file> β export session to .md file
|
| 46 |
+
/n_metatron <number> β set number of Memory Capsules to load
|
| 47 |
+
/loaded <number> β set number of Memory Capsules loaded
|
| 48 |
+
/metatron <seconds> β set metatron interval
|
| 49 |
+
/condensatron <seconds> β set condensatron interval
|
| 50 |
+
/metronome <seconds> β set awareness/consciousness interval
|
| 51 |
+
/enable_awareness <True | False> β disable awareness mode if offline
|
| 52 |
+
/garden <save> | <load> | <clear> β garden history handling
|
| 53 |
+
/help β show this command list
|
| 54 |
+
/exit β quit the app
|
| 55 |
+
/quit β quit the app (alias)
|
| 56 |
+
|
| 57 |
+
Version: v1.01
|
| 58 |
garden histories n_tok_tot working
|
| 59 |
+
extended slash-command
|
| 60 |
+
minor correction for condensatron 'user' string
|
|
|
|
|
|
|
|
|
|
| 61 |
"""
|
| 62 |
|
| 63 |
import os
|
|
|
|
| 481 |
|
| 482 |
# Descriptions built dynamically so they reflect current config values
|
| 483 |
descriptions = {
|
| 484 |
+
"n_metatron": f"<number> β set number of Memory Capsules to load: {config.n_metatron_to_load}",
|
| 485 |
+
"loaded": f"<number> β set number of Memory Capsules loaded: {config.n_metatron_loaded}",
|
| 486 |
+
"metatron": f"<seconds> β set metatron interval: {config.metatron_metronome}s",
|
| 487 |
+
"condensatron": f"<seconds> β set condensatron interval: {config.condensatron_metronome}s",
|
| 488 |
+
"metronome": f"<seconds> β set awareness/consciousness interval: {config.awareness_consciousness_metronome}s",
|
| 489 |
+
"enable_awareness": f"<True | False> β disable awareness mode if offline: {config.enable_awareness}",
|
| 490 |
}
|
| 491 |
|
| 492 |
for name, (_, base_desc) in COMMANDS.items():
|
|
|
|
| 495 |
print(c.res)
|
| 496 |
return None
|
| 497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
COMMANDS: dict[str, tuple] = {
|
| 499 |
+
"file": (_cmd_file, "<path> β load a file as the next message"),
|
| 500 |
+
"paste": (_cmd_paste, " β multiline input (type END to send)"),
|
| 501 |
+
"clear": (_cmd_clear, " β reset history (models stay loaded)"),
|
| 502 |
+
"history": (_cmd_history, " β list all past sessions"),
|
| 503 |
+
"session": (_cmd_session, "<id> β print turns from a session"),
|
| 504 |
+
"export": (_cmd_export, "<id> <file> β export session to .md file"),
|
| 505 |
+
"n_metatron": (_cmd_n_metatron, "<number> β set number of Memory Capsules to load"),
|
| 506 |
+
"loaded": (_cmd_loaded, "<number> β set number of Memory Capsules loaded"),
|
| 507 |
+
"metatron": (_cmd_metatron, "<seconds> β set metatron interval"),
|
| 508 |
+
"condensatron": (_cmd_condensatron, "<seconds> β set condensatron interval"),
|
| 509 |
+
"metronome": (_cmd_metronome, "<seconds> β set awareness/consciousness interval"),
|
| 510 |
+
"enable_awareness": (_cmd_enable_awareness, "<True | False> β disable awareness mode if offline"),
|
| 511 |
+
"garden": (_cmd_garden, "<save> | <load> | <clear> β garden history handling"),
|
| 512 |
+
"help": (_cmd_help, " β show this command list"),
|
| 513 |
+
"exit": (_cmd_exit, " β quit the app"),
|
| 514 |
+
"quit": (_cmd_exit, " β quit the app (alias)"),
|
| 515 |
}
|
| 516 |
|
| 517 |
def handle_command(sensor_input_raw: str) -> str | None:
|
|
|
|
| 1059 |
"""
|
| 1060 |
_tree: str = tree
|
| 1061 |
_turn_number: int = 0
|
| 1062 |
+
_len_caps_and_fracs: int = 1 # condensatron turns: Init with 1 for first turn
|
| 1063 |
_tree_to_store: str = ""
|
| 1064 |
|
| 1065 |
_tree_to_store = tree
|
| 1066 |
if len(garden[_tree]) > 1:
|
| 1067 |
+
_len_caps_and_fracs = (len(garden[_tree]) // 2) + 1 # condensatron turns: Add extra 1 for the appended below
|
| 1068 |
|
| 1069 |
# ββ condensatron output to append mapping: TREE_TO_STORE ββββββββββββββββββ
|
| 1070 |
if _tree == "Z" and garden["condensatron_state"][_tree]: # condensatron mode
|
|
|
|
| 1350 |
# ββ X-factor Awarenss and Y-factor Consciousness heartbeats ββββββββββββββ
|
| 1351 |
if _heartbeats >= config.awareness_consciousness_metronome:
|
| 1352 |
# ββ X-factor awareness cycle βββββββββββββββββββββββββββββββββββββββββ
|
| 1353 |
+
if not config.enable_awareness: # Disable for offline mode
|
| 1354 |
config.was_awareness_metronome = True
|
| 1355 |
|
| 1356 |
if not config.was_awareness_metronome:
|