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.
1 line
2.7 KiB
JSON
1 line
2.7 KiB
JSON
{"repo": "acadex-billio/acadex", "files": {"hnd_backend/test-endpoints.js": {"740dd506f34940bb62bae2f74421425ba33540c2": {"t": 1786068493.7048504, "n": 2503, "h": "e85c2cc901e7d055", "c": "'use strict';\n\nconst path = require('path');\nrequire('dotenv').config({ path: path.resolve(__dirname, './.env') });\n\nconst OPENAI_API_KEY = process.env.OPENAI_API_KEY || '';\nconst OPENAI_BASE_URL = process.env.OPENAI_BASE_URL || 'https://api.openai.com/v1';\nconst DEEPSEEK_API_KEY = process.env.DEEPSEEK_API_KEY || '';\nconst DEEPSEEK_BASE_URL = process.env.DEEPSEEK_BASE_URL || 'https://api.deepseek.com/v1';\nconst GROQ_API_KEY = process.env.GROQ_API_KEY || '';\nconst GROQ_BASE_URL = process.env.GROQ_BASE_URL || 'https://api.groq.com/openai/v1';\n\nconsole.log('=== Environment ===');\nconsole.log('OPENAI_API_KEY:', OPENAI_API_KEY ? 'set' : 'MISSING');\nconsole.log('OPENAI_BASE_URL:', OPENAI_BASE_URL);\nconsole.log('DEEPSEEK_API_KEY:', DEEPSEEK_API_KEY ? 'set' : 'MISSING');\nconsole.log('DEEPSEEK_BASE_URL:', DEEPSEEK_BASE_URL);\nconsole.log('GROQ_API_KEY:', GROQ_API_KEY ? 'set' : 'MISSING');\nconsole.log('GROQ_BASE_URL:', GROQ_BASE_URL);\n\nconst testProvider = async (name, apiKey, baseUrl, model = 'gpt-4o') => {\n console.log(`\\n=== Testing ${name} (model: ${model}) ===`);\n if (!apiKey) {\n console.log('❌ API key not set');\n return;\n }\n\n try {\n const startTime = Date.now();\n const response = await fetch(`${baseUrl}/chat/completions`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${apiKey}`,\n },\n body: JSON.stringify({\n model,\n messages: [{ role: 'user', content: 'Say \"OK\" in one word.' }],\n max_tokens: 10,\n }),\n timeout: 15000,\n });\n\n const elapsed = Date.now() - startTime;\n const text = await response.text();\n \n if (response.ok) {\n console.log(`✅ SUCCESS (${elapsed}ms)`);\n console.log('Response (first 200 chars):', text.slice(0, 200));\n } else {\n console.log(`❌ HTTP ${response.status} (${elapsed}ms)`);\n console.log('Response (first 300 chars):', text.slice(0, 300));\n }\n } catch (err) {\n console.log(`❌ ERROR: ${err.message}`);\n }\n};\n\nconst run = async () => {\n await testProvider('OpenAI', OPENAI_API_KEY, OPENAI_BASE_URL, 'gpt-4o');\n await testProvider('Deepseek', DEEPSEEK_API_KEY, DEEPSEEK_BASE_URL, 'deepseek-chat');\n await testProvider('GROQ (llama-3.1-70b)', GROQ_API_KEY, GROQ_BASE_URL, 'llama-3.1-70b-versatile');\n await testProvider('GROQ (llama-3.1-8b)', GROQ_API_KEY, GROQ_BASE_URL, 'llama-3.1-8b-instant');\n};\n\nrun().then(() => process.exit(0)).catch(e => { console.error(e); process.exit(1); });\n"}}}} |