Commit Graph

5 Commits

Author SHA1 Message Date
hailin 57d21526a5 feat(knowledge): add Docling document parsing microservice
Add IBM Docling as a Python FastAPI microservice for high-quality document
parsing with table structure recognition (TableFormer ~94% accuracy) and
OCR support, replacing pdf-parse/mammoth as the primary text extractor.

Architecture:
- New docling-service (Python FastAPI, port 3007) in Docker network
- knowledge-service calls docling-service via HTTP POST multipart/form-data
- Graceful fallback: if Docling fails, falls back to pdf-parse/mammoth
- Text/Markdown files skip Docling (no benefit for plain text)

Changes:
- New: packages/services/docling-service/ (main.py, Dockerfile, requirements.txt)
- docker-compose.yml: add docling-service, wire DOCLING_SERVICE_URL to
  knowledge-service, add missing FILE_SERVICE_URL to conversation-service
- text-extraction.service.ts: inject ConfigService, add extractViaDocling()
  with automatic fallback to legacy extractors
- .env.example: add FILE_SERVICE_PORT/URL and DOCLING_SERVICE_PORT/URL

Inter-service communication map:
  conversation-service → file-service (FILE_SERVICE_URL, attachments)
  conversation-service → knowledge-service (KNOWLEDGE_SERVICE_URL, RAG)
  knowledge-service → docling-service (DOCLING_SERVICE_URL, document parsing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 05:24:10 -08:00
hailin 91f8792110 feat(embedding): add OpenAI proxy support for IP-based URLs
- Add OPENAI_BASE_URL configuration to .env.example
- Update EmbeddingService to disable TLS verification for IP-based proxy URLs
- Mirror the same proxy handling pattern used in Anthropic API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 05:42:22 -08:00
hailin d5b751fdf8 chore: add real-time tools API key configs to .env.example
Add optional configuration for:
- GOOGLE_SEARCH_API_KEY + GOOGLE_CSE_ID (for web_search tool)
- EXCHANGE_RATE_API_KEY (optional, v4 API is free without key)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 00:53:37 -08:00
hailin 3ac83e9305 feat: 添加 SSL 证书自动申请和 Kong API Gateway 配置
新增功能:
- deploy.sh 添加 ssl 命令支持 Let's Encrypt 证书自动申请
- deploy.sh 添加 kong 命令支持 API Gateway 路由配置
- deploy.sh 添加 deploy-full 命令一键完整部署(含SSL)
- Nginx 配置更新为 HTTPS,支持 HTTP->HTTPS 重定向
- 域名配置为 iconsulting.szaiai.com

SSL 功能:
- ./deploy.sh ssl install    安装 certbot
- ./deploy.sh ssl obtain     申请证书
- ./deploy.sh ssl renew      续期证书
- ./deploy.sh ssl auto-renew 配置自动续期

Kong 功能:
- ./deploy.sh kong setup     配置所有微服务路由
- ./deploy.sh kong status    查看网关状态
- ./deploy.sh kong services  查看服务列表
- ./deploy.sh kong routes    查看路由列表

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 00:07:26 -08:00
hailin a7add8ff90 Initial commit: iConsulting 香港移民咨询智能客服系统
项目架构:
- Monorepo (pnpm + Turborepo)
- 后端: NestJS 微服务 + Claude Agent SDK
- 前端: React + Vite + Ant Design

包含服务:
- conversation-service: 对话服务 (Claude AI)
- user-service: 用户认证服务
- payment-service: 支付服务 (支付宝/微信/Stripe)
- knowledge-service: 知识库服务 (RAG + Neo4j)
- evolution-service: 自我进化服务
- web-client: 用户前端
- admin-client: 管理后台

基础设施:
- PostgreSQL + Redis + Neo4j
- Kong API Gateway
- Nginx 反向代理
- Docker Compose 部署配置

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 00:01:12 -08:00