Files
cim_summary/backend/check-specific-document.js
Jon 185c780486
Some checks failed
CI/CD Pipeline / Backend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Frontend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Build Backend (push) Has been cancelled
CI/CD Pipeline / Build Frontend (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Tests (push) Has been cancelled
CI/CD Pipeline / Dependency Updates (push) Has been cancelled
🚀 Update to Claude 3.7 latest and fix LLM processing issues
- Updated Anthropic API to latest version (2024-01-01)
- Set Claude 3.7 Sonnet Latest as primary model
- Removed deprecated Opus 3.5 references
- Fixed LLM response validation and JSON parsing
- Improved error handling and logging
- Updated model configurations and pricing
- Enhanced document processing reliability
- Fixed TypeScript type issues
- Updated environment configuration
2025-08-17 17:31:56 -04:00

58 lines
1.7 KiB
JavaScript

const { createClient } = require('@supabase/supabase-js');
const path = require('path');
// Load environment variables
require('dotenv').config({ path: path.join(__dirname, '.env') });
async function checkSpecificDocument() {
try {
const supabase = createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_SERVICE_KEY,
{
auth: {
persistSession: false,
autoRefreshToken: false,
}
}
);
const today = new Date();
today.setHours(0, 0, 0, 0);
const { data: documents, error } = await supabase
.from('documents')
.select('id, original_file_name, status, analysis_data, created_at')
.ilike('original_file_name', '%Restoration Systems%')
.gte('created_at', today.toISOString())
.order('created_at', { ascending: false });
if (error) {
console.error('❌ Query failed:', error);
return;
}
if (documents.length === 0) {
console.log('No documents found for "Restoration Systems" created today.');
return;
}
console.log(`Found ${documents.length} document(s) for "Restoration Systems" created today:`);
documents.forEach(doc => {
console.log(`\n--- Document Details ---`);
console.log(` ID: ${doc.id}`);
console.log(` File Name: ${doc.original_file_name}`);
console.log(` Status: ${doc.status}`);
console.log(` Created At: ${doc.created_at}`);
console.log(` Analysis Data Populated: ${!!doc.analysis_data}`);
if (doc.analysis_data) {
console.log(` Analysis Data Keys: ${Object.keys(doc.analysis_data).join(', ')}`);
}
});
} catch (error) {
console.error('❌ Test failed:', error.message);
}
}
checkSpecificDocument();