Class LlmConfigUiController

java.lang.Object
ai.mindconnect.adminui.ui.controller.LlmConfigUiController

@RestController @RequestMapping("/admin/api/llm-configs") public class LlmConfigUiController extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    LlmConfigUiController(ai.mindconnect.llm.port.out.LlmConfigRepository repository, LlmConfigTestService testService, ai.mindconnect.common.util.encryption.EncryptionHelper encryption)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ai.mindconnect.ui.model.UiPatch
    Close is just "remove the overlay" — the page behind stays as-is.
    ai.mindconnect.ui.model.UiPage
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    ai.mindconnect.ui.model.UiPatch
    Backs the form's trailing "Encrypt" helper: takes the form's current field values and patches the apiKey field back with the key in its stored enc: form.
    ai.mindconnect.ui.model.UiPatch
    fieldGroups(String formId, UUID id, Map<String,Object> raw)
    isAlias, type or provider switched: re-render every dependent group.
    ai.mindconnect.ui.model.UiPage
     
    ai.mindconnect.ui.model.UiPage
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    Executes the test — one user-turn for a chat config, text → vector for an embedding config — and re-renders the dialog in place with the result underneath the form so the admin can re-send.
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    Opens the "Test config" dialog as a patch over whatever is on screen — the page underneath is untouched.
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LlmConfigUiController

      public LlmConfigUiController(ai.mindconnect.llm.port.out.LlmConfigRepository repository, LlmConfigTestService testService, ai.mindconnect.common.util.encryption.EncryptionHelper encryption)
  • Method Details

    • encryptKey

      @PostMapping("/encrypt-key") public ai.mindconnect.ui.model.UiPatch encryptKey(@RequestParam("form") String formId, @RequestBody Map<String,Object> raw)
      Backs the form's trailing "Encrypt" helper: takes the form's current field values and patches the apiKey field back with the key in its stored enc: form. Already-tagged values (enc: / plain:) and ${VAR} placeholders pass through unchanged — a placeholder must stay a placeholder.
    • fieldGroups

      @PostMapping("/field-groups") public ai.mindconnect.ui.model.UiPatch fieldGroups(@RequestParam("form") String formId, @RequestParam(value="id",required=false) UUID id, @RequestBody Map<String,Object> raw)
      isAlias, type or provider switched: re-render every dependent group. Alias mode collapses the form to the delegation target; provider mode shows the base fields plus the type- and provider-specific groups. Values the admin already typed ride along in the submitted form body and win over the stored config, so toggling never loses input.
    • list

      @GetMapping public ai.mindconnect.ui.model.UiPage list()
    • newForm

      @GetMapping("/new") public ai.mindconnect.ui.model.UiPage newForm()
    • detail

      @GetMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> detail(@PathVariable UUID id)
    • detailByName

      @GetMapping("/byName/{name}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> detailByName(@PathVariable String name)
    • editForm

      @GetMapping("/{id}/edit") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> editForm(@PathVariable UUID id)
    • create

      @PostMapping public ai.mindconnect.ui.model.UiPage create(@RequestBody Map<String,Object> raw)
    • update

      @PutMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> update(@PathVariable UUID id, @RequestBody Map<String,Object> raw)
    • testDialog

      @GetMapping("/{id}/test") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> testDialog(@PathVariable UUID id)
      Opens the "Test config" dialog as a patch over whatever is on screen — the page underneath is untouched. Empty body / no result yet; the admin types a message (chat) or a text to embed (embedding config) and submits via the form's POST.
    • runTest

      @PostMapping("/{id}/test") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> runTest(@PathVariable UUID id, @RequestBody Map<String,Object> raw)
      Executes the test — one user-turn for a chat config, text → vector for an embedding config — and re-renders the dialog in place with the result underneath the form so the admin can re-send.
    • closeTestDialog

      @PostMapping("/test-dialog/close") public ai.mindconnect.ui.model.UiPatch closeTestDialog()
      Close is just "remove the overlay" — the page behind stays as-is.
    • delete

      @DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> delete(@PathVariable UUID id)