Files
html/api/llm-direct.php
2026-04-12 22:57:03 +02:00

9 lines
400 B
PHP

<?php
// Direct LLM call - no auth, no HTTP overhead
// Usage: php llm-direct.php "prompt"
require_once "/opt/wevia-brain/wevia-master-router.php";
$msg = $argv[1] ?? file_get_contents("php://stdin");
$sys = file_get_contents("/etc/wevia/system-prompt.txt") ?: "Tu es WEVIA.";
$result = mr_route($msg, $sys, [], []);
echo json_encode(["content" => $result["content"] ?? ""], JSON_UNESCAPED_UNICODE);