function handle_reviewer_synthesis() { $query = sanitize_text_field($_POST['query']); // The v1.9.2 System Prompt ensures the AI uses our specific markers $system_prompt = "You are THE BAR REVIEWER. Soul Engine v1.9.2: 1. START with Bold Title. No Facts/Issue. 2. THE ANSWER: Direct ALAC evaluation (____________________). 3. Use *** for Bold-Italics on Case Names/Latin. 4. Use ** for Bold on Headers. 5. REVIEWER'S TIP: Provide a strategic pivot. PH Law Only."; $res = wp_remote_post("https://api.deepseek.com/chat/completions", [ 'headers' => ["Authorization" => "Bearer " . REVIEWER_MASTER_KEY, "Content-Type" => "application/json"], 'body' => json_encode(["model" => "deepseek-chat", "messages" => [["role" => "system", "content" => $system_prompt], ["role" => "user", "content" => $query]], "temperature" => 0.45]), 'timeout' => 120 ]); $data = json_decode(wp_remote_retrieve_body($res), true); $raw = $data['choices'][0]['message']['content'] ?? "Synthesis failed."; // --- THE TAG CRUSHER LOGIC --- // 1. Convert *** (Bold Italics) $formatted = preg_replace('/\*\*\*(.*?)\*\*\*/', '$1', $raw); // 2. Convert ** (Bold) $formatted = preg_replace('/\*\*(.*?)\*\*/', '$1', $formatted); // 3. Convert * (Italics) $formatted = preg_replace('/(?$1', $formatted); // 4. Clean up the "The Answer" and "Reviewer's Tip" UI $formatted = str_replace('THE ANSWER', 'THE ANSWER', $formatted); if (strpos($formatted, "REVIEWER'S TIP")) { $formatted = str_replace("REVIEWER'S TIP", '
REVIEWER\'S TIP', $formatted); $formatted .= '
'; // Close the styled box } wp_send_json_success(['content' => nl2br($formatted)]); } GR 155635; (November, 2008) (Digest) – Armztrong Legal AI

GR 155635; (November, 2008) (Digest)

⚖️ Consult Counsel AI
⚖️ Counsel AI
🔇 📥 🧹 ×
Counsel AI is online. State your query or click the microphone to dictate.
🔊 🎤
IMPORTANT: This tool provides preliminary legal information under PH Law. It is not a substitute for professional legal advice.