feat: file upload + expense report creation from Discuss attachments
- Discuss bot now reads ir.attachment from incoming messages; file-only messages no longer silently dropped - ZIP files are described (contents listed) and bot asks clarifying question before acting; user's follow-up reply looks back for pending attachments so files don't need to be re-uploaded - receipt_parser: extracts text from ZIP (recursive), JPG/PNG/etc (OCR), PDF (pdfplumber), HTML, TXT - expenses_agent: full rewrite fixing broken method signatures; adds create_expense_sheet / create_expense / attach_receipt flow driven by LLM receipt parsing (Ollama, HIPAA-locked) - master_agent: extra_context threads receipts + user_id into directives - FastAPI /upload multipart endpoint; registered in main.py - Odoo /ai/upload controller proxies files to agent service - ab_ai_bot: dispatch_message_with_files() for multipart uploads Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from .config import get_settings
|
||||
from . import app_state
|
||||
from .routers import dispatch, approval, registry, sweep, health
|
||||
from .routers import dispatch, approval, registry, sweep, health, upload
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -224,6 +224,7 @@ def create_app() -> FastAPI:
|
||||
allow_headers=['*'],
|
||||
)
|
||||
app.include_router(dispatch.router)
|
||||
app.include_router(upload.router)
|
||||
app.include_router(approval.router)
|
||||
app.include_router(registry.router)
|
||||
app.include_router(sweep.router)
|
||||
|
||||
Reference in New Issue
Block a user