Class AIService

java.lang.Object
com.minicrm.mini_crm_api.services.AIService

@Service public class AIService extends Object
Service responsible for interacting with the AI model to generate rules from natural language prompts.
  • Constructor Details

    • AIService

      public AIService()
  • Method Details

    • generateRulesFromPrompt

      public Map<String,Object> generateRulesFromPrompt(String prompt)
      Generates a structured RuleGroup from a natural language text prompt.
      Parameters:
      prompt - The natural language prompt provided by the user.
      Returns:
      A Map representing the generated rules.
      Throws:
      AIResponseParsingException - if the AI response cannot be parsed as valid JSON.