Class LlmConfigUiController
java.lang.Object
ai.mindconnect.adminui.ui.controller.LlmConfigUiController
@RestController
@RequestMapping("/admin/api/llm-configs")
public class LlmConfigUiController
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionLlmConfigUiController(ai.mindconnect.llm.port.out.LlmConfigRepository repository, LlmConfigTestService testService, ai.mindconnect.common.util.encryption.EncryptionHelper encryption) -
Method Summary
Modifier and TypeMethodDescriptionai.mindconnect.ui.model.UiPatchClose is just "remove the overlay" — the page behind stays as-is.ai.mindconnect.ui.model.UiPageorg.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> detailByName(String name) org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> ai.mindconnect.ui.model.UiPatchencryptKey(String formId, 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 storedenc:form.ai.mindconnect.ui.model.UiPatchisAlias, type or provider switched: re-render every dependent group.ai.mindconnect.ui.model.UiPagelist()ai.mindconnect.ui.model.UiPagenewForm()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> testDialog(UUID id) 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>
-
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 storedenc: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
-
update
-
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)
-