Přeskočit na hlavní obsah

AI Parsing Core Module

This module provides AI-powered parsing capabilities within the EspoCRM system. It allows for intelligent processing and extraction of information from various data sources, particularly focusing on email content and entity-specific data.

The core functionality revolves around the AiParsingTool class, which serves as the main interface for parsing operations. It integrates with external AI services through configurable endpoints and authentication tokens, while also leveraging EspoCRM's built-in entity management and configuration systems.

Key features include:

  • Configurable integration with external AI services
  • Entity-specific email parsing configurations
  • Dynamic endpoint and token management
  • Integration with EspoCRM's core services like EntityManager and Config

The module follows dependency injection patterns through interfaces like AiParsingToolAware and traits like AiParsingToolSetter to provide flexible integration points for other system components.


Technické informace

The core parsing functionality is implemented in AiParsingTool, which implements EntityManagerAware and ConfigAware interfaces. Key methods include:

  • getToken(): Retrieves the authentication token from the integration settings
  • getEndpoint(): Gets and formats the AI service endpoint URL
  • getEntityTypeEmails(): Returns configured emails for parsable entity types
  • Various static helper methods for configuration key generation

The integration is configured through AiParsing.json metadata, which defines required fields (endpoint URL and token). The service is registered in containerServices.json along with related factories.

The client-side interface extends EspoCRM's standard integration edit view, as seen in ai-parsing.ts, which inherits from the core edit.js view.