Class AixFlowService

java.lang.Object
org.bgerp.plugin.ai.aixflow.model.AixFlowService

public class AixFlowService extends Object
Service for interacting with n8n webhook
  • Constructor Details

    • AixFlowService

      public AixFlowService(Config config)
  • Method Details

    • sendFile

      public AixFlowService.AixFlowResponse sendFile(File file) throws Exception
      Send file to n8n for processing
      Parameters:
      file - the file to send
      Returns:
      response with hash and status
      Throws:
      Exception - if sending fails
    • sendTextForDiarization

      public AixFlowService.AixFlowResponse sendTextForDiarization(String text, String hash) throws Exception
      Send text for diarization (speaker identification)
      Parameters:
      text - the transcribed text to process
      hash - the hash of the original transcription
      Returns:
      response with hash and status
      Throws:
      Exception - if sending fails
    • checkDiarizationTaskStatus

      public AixFlowService.AixFlowTaskData checkDiarizationTaskStatus(String hash) throws Exception
      Check diarization task status in n8n
      Parameters:
      hash - the diarization task hash
      Returns:
      task data with diarization status
      Throws:
      Exception - if checking fails
    • checkTaskStatus

      public AixFlowService.AixFlowTaskData checkTaskStatus(String hash) throws Exception
      Check task status in n8n
      Parameters:
      hash - the task hash
      Returns:
      task data with status
      Throws:
      Exception - if checking fails