Class AIController
java.lang.Object
com.minicrm.mini_crm_api.controllers.AIController
REST controller for handling the audience rules generation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDTO for the prompt input. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateRules(@Valid AIController.PromptDTO payload) Generates a structured RuleGroup from a natural language text prompt.
-
Constructor Details
-
AIController
public AIController()
-
-
Method Details
-
generateRules
@PostMapping("/generate-rules") public Map<String,Object> generateRules(@Valid @RequestBody @Valid AIController.PromptDTO payload) Generates a structured RuleGroup from a natural language text prompt.- Parameters:
payload- A map containing a single key "prompt" with the user's text.- Returns:
- A ResponseEntity containing the generated rules as a Map on success, or an appropriate error status.
-