debut illustration
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
"""Pont Alfred -> Hermes avec session persistante."""
|
||||
from services.dona_hermes_stream import run_jsonl_command as _dona_run_jsonl_command # DONA_HERMES_PERF_V1
|
||||
|
||||
import fcntl
|
||||
import json
|
||||
@@ -379,13 +380,9 @@ def _call_hermes(
|
||||
])
|
||||
|
||||
try:
|
||||
process = subprocess.run(
|
||||
cmd,
|
||||
input=prompt,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=_hermes_timeout(),
|
||||
check=False
|
||||
# DONA_HERMES_PERF_V1: conserver la session, transmettre les deltas en temps réel
|
||||
process = _dona_run_jsonl_command(
|
||||
cmd, prompt, _hermes_timeout()
|
||||
)
|
||||
|
||||
except subprocess.TimeoutExpired as exc:
|
||||
@@ -428,6 +425,12 @@ def _call_hermes(
|
||||
|
||||
def ask_hermes(text: str) -> str:
|
||||
|
||||
# DONA_UNIFIED_ROUTING_V4 — tentative de tableau direct, sinon Hermes intact
|
||||
from services.dona_unified_router_v4 import try_route as _dona_v4_try_route
|
||||
_dona_v4_quick = _dona_v4_try_route(text)
|
||||
if _dona_v4_quick is not None:
|
||||
return _dona_v4_quick
|
||||
|
||||
prompt = _build_prompt(text)
|
||||
|
||||
# Ancien fonctionnement sans session
|
||||
|
||||
Reference in New Issue
Block a user