Major release with significant performance improvements and new processing strategy. ## Core Changes - Implemented simple_full_document processing strategy (default) - Full document → LLM approach: 1-2 passes, ~5-6 minutes processing time - Achieved 100% completeness with 2 API calls (down from 5+) - Removed redundant Document AI passes for faster processing ## Financial Data Extraction - Enhanced deterministic financial table parser - Improved FY3/FY2/FY1/LTM identification from varying CIM formats - Automatic merging of parser results with LLM extraction ## Code Quality & Infrastructure - Cleaned up debug logging (removed emoji markers from production code) - Fixed Firebase Secrets configuration (using modern defineSecret approach) - Updated OpenAI API key - Resolved deployment conflicts (secrets vs environment variables) - Added .env files to Firebase ignore list ## Deployment - Firebase Functions v2 deployment successful - All 7 required secrets verified and configured - Function URL: https://api-y56ccs6wva-uc.a.run.app ## Performance Improvements - Processing time: ~5-6 minutes (down from 23+ minutes) - API calls: 1-2 (down from 5+) - Completeness: 100% achievable - LLM Model: claude-3-7-sonnet-latest ## Breaking Changes - Default processing strategy changed to 'simple_full_document' - RAG processor available as alternative strategy 'document_ai_agentic_rag' ## Files Changed - 36 files changed, 5642 insertions(+), 4451 deletions(-) - Removed deprecated documentation files - Cleaned up unused services and models This release represents a major refactoring focused on speed, accuracy, and maintainability.
47 lines
1.4 KiB
Bash
Executable File
47 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to test file upload to production Firebase Functions
|
|
# This uses the cloud version, not local
|
|
|
|
PROJECT_ID="cim-summarizer"
|
|
REGION="us-central1"
|
|
FUNCTION_NAME="api"
|
|
|
|
# Try to get the function URL
|
|
echo "🔍 Finding production API endpoint..."
|
|
|
|
# For v2 functions, the URL format is different
|
|
FUNCTION_URL="https://${REGION}-${PROJECT_ID}.cloudfunctions.net/${FUNCTION_NAME}"
|
|
echo "Using function URL: ${FUNCTION_URL}"
|
|
|
|
# Test health endpoint first
|
|
echo ""
|
|
echo "📡 Testing health endpoint..."
|
|
HEALTH_RESPONSE=$(curl -s -w "\n%{http_code}" "${FUNCTION_URL}/health")
|
|
HTTP_CODE=$(echo "$HEALTH_RESPONSE" | tail -n1)
|
|
BODY=$(echo "$HEALTH_RESPONSE" | head -n-1)
|
|
|
|
if [ "$HTTP_CODE" = "200" ]; then
|
|
echo "✅ Health check passed"
|
|
echo "Response: $BODY"
|
|
else
|
|
echo "❌ Health check failed with code: $HTTP_CODE"
|
|
echo "Response: $BODY"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "📤 To upload a file, you need:"
|
|
echo "1. A valid Firebase authentication token"
|
|
echo "2. The file to upload"
|
|
echo ""
|
|
echo "Run this script with:"
|
|
echo " ./test-upload-production.sh <firebase-token> <file-path>"
|
|
echo ""
|
|
echo "Or test the upload URL endpoint manually with:"
|
|
echo " curl -X POST ${FUNCTION_URL}/documents/upload-url \\"
|
|
echo " -H 'Authorization: Bearer YOUR_TOKEN' \\"
|
|
echo " -H 'Content-Type: application/json' \\"
|
|
echo " -d '{\"fileName\":\"test.pdf\",\"fileSize\":1000000,\"contentType\":\"application/pdf\"}'"
|
|
|