Fix qm guest exec timeout, think:false for agent, OSINT direct-SSH path
This commit is contained in:
5
app.py
5
app.py
@@ -68,7 +68,7 @@ def _ssh(cmd, timeout):
|
||||
|
||||
def run_guest(vmid, cmd, timeout=420):
|
||||
"""Run a command inside a VM via Proxmox guest exec; return decoded stdout."""
|
||||
out = _ssh(f"qm guest exec {vmid} -- bash -c {cmd!r}", timeout)
|
||||
out = _ssh(f"qm guest exec {vmid} --timeout 300 -- bash -c {cmd!r}", timeout)
|
||||
try:
|
||||
return json.loads(out).get("out-data", "")
|
||||
except Exception:
|
||||
@@ -98,7 +98,8 @@ def agent_report(kind, target, raw):
|
||||
f"Format as markdown.\n\n=== RAW OUTPUT ===\n{raw[:8000]}"
|
||||
)
|
||||
body = json.dumps({"model": OLLAMA_MODEL, "prompt": prompt, "stream": False,
|
||||
"options": {"num_predict": 1024}}).encode()
|
||||
"think": False,
|
||||
"options": {"num_predict": 1500}}).encode()
|
||||
req = urllib.request.Request(f"{OLLAMA_URL}/api/generate", data=body,
|
||||
headers={"Content-Type": "application/json"})
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user