Download knowledgeArcheologyService.ts from VoidBreach/Chancellor: direct link, hf CLI and curl.
- Browser
- Download file 958 Bytes
-
https://huggingface.co/VoidBreach/Chancellor/resolve/main/knowledgeArcheologyService.ts
- Command line
-
hf download hf://VoidBreach/Chancellor/knowledgeArcheologyService.ts
-
curl -L -o knowledgeArcheologyService.ts https://huggingface.co/VoidBreach/Chancellor/resolve/main/knowledgeArcheologyService.ts
958 Bytes
| import { ArcheologicalArtifact } from '../types'; | |
| export async function performArcheologicalInference( | |
| topic: string, | |
| _apiKey?: string, // Kept for signature compatibility but not used | |
| ): Promise<{ artifacts: ArcheologicalArtifact[]; report: string }> { | |
| try { | |
| const response = await fetch('/api/scholastic/archeology', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ topic }), | |
| }); | |
| if (!response.ok) { | |
| throw new Error(`Synthesis protocol status: ${response.status}`); | |
| } | |
| const data = await response.json(); | |
| return { | |
| artifacts: data.artifacts || [], | |
| report: data.report || 'Extraction complete. The substrate reveals its debt.', | |
| }; | |
| } catch (error) { | |
| console.error('[ARCHEOLOGY_FAILURE]', error); | |
| return { | |
| artifacts: [], | |
| report: 'The digging was halted by a cognitive collapse. The Chancellor demands a retry.', | |
| }; | |
| } | |
| } | |