Commit Graph

66 Commits

Author SHA1 Message Date
bsiggel
9639a375a6 fix: ensure syncStatus is reset to 'synced' for unchanged files in Advoware sync process 2026-03-31 10:40:14 +00:00
bsiggel
0bd397803e fix: reset syncStatus to 'synced' when file is confirmed in-sync in AdvowareDocumentSyncUtils 2026-03-31 07:14:52 +00:00
bsiggel
e1695e530a fix: move calendar_sync_utils to services/ and remove sys.path.insert hacks from all calendar sync steps 2026-03-31 07:08:21 +00:00
bsiggel
141eabae6d feat(sync): Enhance metadata synchronization for unchanged files in Advoware sync process 2026-03-31 06:26:33 +00:00
bsiggel
52c4f84b44 feat(ragflow): Remove unsupported MIME types from the upload filter 2026-03-31 06:01:54 +00:00
bsiggel
b6a0bd8d80 Refactor code structure for improved readability and maintainability 2026-03-31 05:58:20 +00:00
bsiggel
b4ff370823 feat(graphiti): Integrate Langfuse Tracer for enhanced monitoring and tracing of Graphiti operations
feat(graphiti): Define entity and edge types in new graphiti_schema for structured data extraction
feat(graphiti): Enhance ingest_episode_event_step with schema integration for improved episode processing
2026-03-30 22:00:53 +00:00
bsiggel
e255ae1263 feat(graphiti): Implement Graphiti client and related steps for episode ingestion and querying
- Added `graphiti_client.py` to manage the Graphiti client as a singleton.
- Created `ingest_episode_event_step.py` to handle episode ingestion from HTTP webhook events.
- Implemented `ingest_episode_step.py` for validating and enqueuing episode payloads via a POST request.
- Developed `query_graph_step.py` for performing semantic searches in the Graphiti Knowledge-Graph.
- Introduced an `__init__.py` file for the graphiti steps module.
2026-03-30 08:25:49 +00:00
bsiggel
88c9df5995 feat(cron): Add RAGflow Graph Build Cron for periodic status updates and new builds 2026-03-27 11:27:09 +00:00
bsiggel
61113d8f3d feat(sync): Update RAGFlow dataset creation to use stable EspoCRM-ID and improve logging 2026-03-27 00:52:48 +00:00
bsiggel
1cd8de8574 Refactor code structure for improved readability and maintainability 2026-03-26 22:24:07 +00:00
bsiggel
9b2fb5ae4a feat: Implement AI Knowledge Sync Utilities and RAGFlow Service
- Added `aiknowledge_sync_utils.py` for provider-agnostic synchronization logic for CAIKnowledge entities, supporting both xAI and RAGFlow.
- Introduced lifecycle management for CAIKnowledge entities including states: new, active, paused, and deactivated.
- Implemented change detection using Blake3 hash for efficient document synchronization.
- Created `ragflow_service.py` to handle dataset and document management with RAGFlow API.
- Added daily cron job in `aiknowledge_daily_cron_step.py` to synchronize active CAIKnowledge entities with unclean or failed statuses.
- Developed `aiknowledge_sync_event_step.py` to process synchronization events from webhooks and cron jobs.
2026-03-26 21:38:42 +00:00
bsiggel
439101f35d feat(sync): Update document preview trigger to use enqueue method and improve content change detection for xAI re-sync 2026-03-26 16:17:52 +00:00
bsiggel
5e9c791a1b feat(sync): Remove unused file renaming method from XAIService 2026-03-26 14:33:34 +00:00
bsiggel
6682b0bd1f feat(sync): Remove redundant file renaming logic after upload when hash matches 2026-03-26 14:32:04 +00:00
bsiggel
1d0bd9d568 feat(upload): Update document metadata handling to exclude empty fields during upload 2026-03-26 14:26:06 +00:00
bsiggel
c9bdd021e4 feat(sync): Implement orphan cleanup for xAI documents without EspoCRM equivalents 2026-03-26 14:20:33 +00:00
bsiggel
1e202a6233 feat(sync): Update xAI collection file addition endpoint and improve documentation 2026-03-26 13:22:14 +00:00
bsiggel
459fa41033 feat(sync): Refactor Akte sync status handling and remove deprecated event step 2026-03-26 13:06:32 +00:00
bsiggel
52cee5bd16 feat(upload): Enhance document metadata handling with additional fields for better context 2026-03-26 12:51:04 +00:00
bsiggel
a6dc708954 feat(espocrm): Implement automatic pagination for related records and enforce API max page size 2026-03-26 12:41:45 +00:00
bsiggel
3459b9342f feat: Implement Akte webhook for EspoCRM to queue entity IDs for synchronization
fix: Refactor Akte sync logic to handle multiple Redis queues and improve logging
refactor: Enhance parameter flattening for EspoCRM API calls
2026-03-26 09:48:46 +00:00
bsiggel
b4d35b1790 Refactor Akte and Document Sync Logic
- Removed the old VMH Document xAI Sync Handler implementation.
- Introduced new xAI Upload Utilities for shared upload logic across sync flows.
- Created a unified Akte sync structure with cron polling and event handling.
- Implemented Akte Sync Cron Poller to manage pending Aktennummern with a debounce mechanism.
- Developed Akte Sync Event Handler for synchronized processing across Advoware and xAI.
- Enhanced logging and error handling throughout the new sync processes.
- Ensured compatibility with existing Redis and EspoCRM services.
2026-03-26 01:23:16 +00:00
bsiggel
86ec4db9db feat: Implement Advoware Document Sync Handler
- Added advoware_document_sync_step.py to handle 3-way merge sync for documents.
- Introduced locking mechanism for per-Akte synchronization to allow parallel processing.
- Integrated data fetching from EspoCRM, Windows files, and Advoware history.
- Implemented 3-way merge logic for document synchronization and metadata updates.
- Triggered document preview generation for new/changed documents.

feat: Create Shared Steps Module

- Added shared/__init__.py for shared steps across multiple modules.
- Introduced generate_document_preview_step.py for generating document previews.
- Implemented logic to download documents, generate previews, and upload to EspoCRM.

feat: Add VMH Document xAI Sync Handler

- Created document_xai_sync_step.py to manage document synchronization with xAI collections.
- Handled create, update, and delete actions for documents in EspoCRM.
- Integrated logic for triggering preview generation and managing xAI collections.
- Implemented error handling and logging for synchronization processes.
2026-03-26 01:00:49 +00:00
bsiggel
d78a4ee67e fix: Update timestamp format for metadata synchronization to match EspoCRM requirements 2026-03-25 21:37:49 +00:00
bsiggel
50c5070894 fix: Update metadata synchronization logic to always sync changes and correct field mappings 2026-03-25 21:34:18 +00:00
bsiggel
1ffc37b0b7 feat: Add Advoware History and Watcher services for document synchronization
- Implement AdvowareHistoryService for fetching and creating history entries.
- Implement AdvowareWatcherService for file operations including listing, downloading, and uploading with Blake3 hash verification.
- Introduce Blake3 utility functions for hash computation and verification.
- Create document sync cron step to poll Redis for pending Aktennummern and emit sync events.
- Develop document sync event handler to manage 3-way merge synchronization for Akten, including metadata updates and error handling.
2026-03-25 21:24:31 +00:00
bsiggel
2ac83df1e0 fix: Update default chat model to grok-4-1-fast-reasoning and enhance logging for LLM responses 2026-03-19 09:50:31 +00:00
bsiggel
8e53fd6345 fix: Enhance tool binding in LangChainXAIService to support web search and update API handler for new parameters 2026-03-15 16:37:57 +00:00
bsiggel
59fdd7d9ec fix: Normalize MIME type for PDF uploads and update collection management endpoint to use vector store API 2026-03-15 16:34:13 +00:00
bsiggel
eaab14ae57 fix: Adjust multipart form to use raw UTF-8 encoding for filenames in file uploads 2026-03-14 23:00:49 +00:00
bsiggel
331d43390a fix: Import unquote for URL decoding in AI Knowledge synchronization utilities 2026-03-14 22:50:59 +00:00
bsiggel
18f2ff775e fix: URL-decode filenames in document synchronization to handle special characters 2026-03-14 22:49:07 +00:00
bsiggel
4a5065aea4 feat: Add Aktenzeichen utility functions and LangChain xAI service integration
- Implemented utility functions for extracting, validating, and normalizing Aktenzeichen in 'aktenzeichen_utils.py'.
- Created LangChainXAIService for integrating LangChain ChatXAI with file search capabilities in 'langchain_xai_service.py'.
- Developed VMH xAI Chat Completions API to handle OpenAI-compatible requests with support for Aktenzeichen detection and file search in 'xai_chat_completion_api_step.py'.
2026-03-13 10:10:33 +00:00
bsiggel
bb13d59ddb fix: Improve orphan detection and Blake3 hash verification in document synchronization 2026-03-13 08:40:20 +00:00
bsiggel
b0fceef4e2 fix: Update sync mode logging to clarify Blake3 hash verification status 2026-03-12 23:09:21 +00:00
bsiggel
e727582584 fix: Update JunctionData URL construction to use API Gateway instead of direct EspoCRM endpoint 2026-03-12 23:07:33 +00:00
bsiggel
2292fd4762 feat: Enhance document synchronization logic to continue syncing after collection activation 2026-03-12 23:06:40 +00:00
bsiggel
9ada48d8c8 fix: Update collection ID retrieval logic and simplify error logging in AI Knowledge sync event handler 2026-03-12 23:04:01 +00:00
bsiggel
e945333c1a feat: Update activation status references to 'aktivierungsstatus' for consistency across AI Knowledge sync utilities 2026-03-12 22:53:47 +00:00
bsiggel
46c0bbf381 feat: Refactor AI Knowledge sync processes to remove full sync parameter and ensure Blake3 verification is always performed 2026-03-12 22:41:19 +00:00
bsiggel
8f1533337c feat: Enhance AI Knowledge sync process with full sync mode and attachment handling 2026-03-12 22:35:48 +00:00
bsiggel
6bf2343a12 feat: Enhance document synchronization by integrating CAIKnowledge handling and improving error logging 2026-03-12 22:30:11 +00:00
bsiggel
9bbfa61b3b feat: Implement AI Knowledge Sync Utilities and Event Handlers
- Added AIKnowledgeActivationStatus and AIKnowledgeSyncStatus enums to models.py for managing activation and sync states.
- Introduced AIKnowledgeSync class in aiknowledge_sync_utils.py for synchronizing CAIKnowledge entities with XAI Collections, including collection lifecycle management, document synchronization, and metadata updates.
- Created a daily cron job (aiknowledge_full_sync_cron_step.py) to perform a full sync of CAIKnowledge entities.
- Developed an event handler (aiknowledge_sync_event_step.py) to synchronize CAIKnowledge entities with XAI Collections triggered by webhooks and cron jobs.
- Implemented a webhook handler (aiknowledge_update_api_step.py) to receive updates from EspoCRM for CAIKnowledge entities and enqueue sync events.
- Enhanced xai_service.py with methods for collection management, document listing, and metadata updates.
2026-03-11 21:14:52 +00:00
bsiggel
a5a122b688 refactor(logging): enhance error handling and resource management in rate limiting and sync operations 2026-03-08 22:47:05 +00:00
bsiggel
6c3cf3ca91 refactor(logging): remove unused logger instances and enhance error logging in webhook steps 2026-03-08 22:21:08 +00:00
bsiggel
a0cf845877 Refactor and enhance logging in webhook handlers and Redis client
- Translated comments and docstrings from German to English for better clarity.
- Improved logging consistency across various webhook handlers for create, delete, and update operations.
- Centralized logging functionality by utilizing a dedicated logger utility.
- Added new enums for file and XAI sync statuses in models.
- Updated Redis client factory to use a centralized logger and improved error handling.
- Enhanced API responses to include more descriptive messages and status codes.
2026-03-08 21:50:34 +00:00
bsiggel
2532bd89ee refactor(logging): standardize logging approach across services and steps 2026-03-08 21:20:49 +00:00
bsiggel
93d4d89531 feat(document-sync): update xaiSyncStatus handling and logging for document synchronization 2026-03-08 19:21:17 +00:00
bsiggel
4ed752b19e feat(document-sync): enhance metadata update to reset file status after preview generation 2026-03-08 18:59:56 +00:00