Files
OpenCode 68a9071cf1 feat: reconcile local master with origin (exa/hot-platform hunters, leaks ledger, latest results)
Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
2026-08-07 12:53:47 +08:00

1 line
2.1 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "andrecarlos26/isaat", "files": {"backend/model_analysis_module/explanation.py": {"40567155a1871060b89257e1686ae2902e43f406": {"t": 1786068458.1630864, "n": 1821, "h": "954fe7db5b7855ee", "c": "import os\r\nimport requests\r\nimport json\r\n\r\nOPENROUTER_API_KEY = os.getenv(\"OPENROUTER_API_KEY\")\r\nOPENROUTER_URL = \"https://openrouter.ai/api/v1/chat/completions\"\r\n\r\nBASE_PROMPT = \"\"\"Below is information about the decision-making process of a Multi-Layer Perceptron (MLP) model, which attempts to predict how long it will take before system memory is exhausted.\r\n\r\nWrite a human-readable explanation of how the model arrives at its predictions. The explanation should be suitable for system administrators and include the following:\r\n\r\nA high-level overview of the model’s decision-making process (e.g., how input features are processed and how predictions are generated)\r\nWhether the model appears to be making correct predictions, based on available metrics\r\nAny evidence of bias or systematic errors in the model’s behavior\r\nConfidence level or uncertainty in its predictions\r\nStrategic implications for system management or resource planning based on the model’s outputs\r\n\r\nThe explanation should avoid technical jargon where possible and focus on helping human operators make informed decisions using the model’s outputs.\"\"\"\r\n\r\ndef get_openrouter_explanation(summary: str) -> str:\r\n \"\"\"\r\n Sends the summary + base prompt to OpenRouter and returns the explanatory text.\r\n \"\"\"\r\n prompt = f\"{BASE_PROMPT}\\n\\n{summary}\"\r\n resp = requests.post(\r\n OPENROUTER_URL,\r\n headers={\r\n \"Authorization\": f\"Bearer {OPENROUTER_API_KEY}\",\r\n \"Content-Type\": \"application/json; charset=utf-8\"\r\n },\r\n data=json.dumps({\r\n \"model\": \"deepseek/deepseek-chat-v3-0324:free\",\r\n \"messages\": [{\"role\": \"user\", \"content\": prompt}]\r\n })\r\n )\r\n resp.raise_for_status()\r\n data = resp.json()\r\n return data[\"choices\"][0][\"message\"][\"content\"]\r\n"}}}}