From e960605e5a304934d1601157f278c8dd55720ca9 Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Wed, 5 Jun 2024 15:18:57 -0400 Subject: [PATCH] add error messages for gollm controller (#3768) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../controller/gollm/GoLLMController.java | 424 +++++++++++------- .../knowledge/KnowledgeController.java | 9 +- .../src/main/resources/messages.properties | 11 +- 3 files changed, 264 insertions(+), 180 deletions(-) diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/gollm/GoLLMController.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/gollm/GoLLMController.java index f056028f23..3abc4245fa 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/gollm/GoLLMController.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/gollm/GoLLMController.java @@ -1,5 +1,6 @@ package software.uncharted.terarium.hmiserver.controller.gollm; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; @@ -10,6 +11,8 @@ import java.util.List; import java.util.Optional; import java.util.UUID; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; import java.util.regex.Matcher; import lombok.Data; import lombok.RequiredArgsConstructor; @@ -46,6 +49,7 @@ import software.uncharted.terarium.hmiserver.service.tasks.ModelCardResponseHandler; import software.uncharted.terarium.hmiserver.service.tasks.TaskService; import software.uncharted.terarium.hmiserver.service.tasks.TaskService.TaskMode; +import software.uncharted.terarium.hmiserver.utils.Messages; import software.uncharted.terarium.hmiserver.utils.rebac.Schema; @RequestMapping("/gollm") @@ -67,6 +71,8 @@ public class GoLLMController { private final CompareModelsResponseHandler compareModelsResponseHandler; private final ConfigureFromDatasetResponseHandler configureFromDatasetResponseHandler; + private final Messages messages; + @PostConstruct void init() { taskService.addResponseHandler(modelCardResponseHandler); @@ -109,49 +115,67 @@ public ResponseEntity createModelCardTask( final Schema.Permission permission = projectService.checkPermissionCanRead(currentUserService.get().getId(), projectId); - try { - // Grab the document - final Optional document = documentAssetService.getAsset(documentId, permission); - if (document.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Document not found"); - } + // Grab the document + final Optional document = documentAssetService.getAsset(documentId, permission); + if (document.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("document.not-found")); + } - // make sure there is text in the document - if (document.get().getText() == null || document.get().getText().isEmpty()) { - log.warn("Document {} has no text to send", documentId); - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Document has no text"); - } + // make sure there is text in the document + if (document.get().getText() == null || document.get().getText().isEmpty()) { + log.warn("Document {} has no text to send", documentId); + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("document.extraction.not-done")); + } - // check for input length - if (document.get().getText().length() > ModelCardResponseHandler.MAX_TEXT_SIZE) { - log.warn("Document {} text too long for GoLLM model card task", documentId); - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Document text is too long"); - } + // check for input length + if (document.get().getText().length() > ModelCardResponseHandler.MAX_TEXT_SIZE) { + log.warn("Document {} text too long for GoLLM model card task", documentId); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, messages.get("document.text-length-exceeded")); + } + + final ModelCardResponseHandler.Input input = new ModelCardResponseHandler.Input(); + input.setResearchPaper(document.get().getText()); - final ModelCardResponseHandler.Input input = new ModelCardResponseHandler.Input(); - input.setResearchPaper(document.get().getText()); + // Create the task + final TaskRequest req = new TaskRequest(); + req.setType(TaskType.GOLLM); + req.setScript(ModelCardResponseHandler.NAME); + req.setUserId(currentUserService.get().getId()); - // Create the task - final TaskRequest req = new TaskRequest(); - req.setType(TaskType.GOLLM); - req.setScript(ModelCardResponseHandler.NAME); - req.setUserId(currentUserService.get().getId()); + try { req.setInput(objectMapper.writeValueAsBytes(input)); - req.setProjectId(projectId); + } catch (final Exception e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); + } - final ModelCardResponseHandler.Properties props = new ModelCardResponseHandler.Properties(); - props.setDocumentId(documentId); - req.setAdditionalProperties(props); + req.setProjectId(projectId); - // send the request - return ResponseEntity.ok().body(taskService.runTask(mode, req)); + final ModelCardResponseHandler.Properties props = new ModelCardResponseHandler.Properties(); + props.setDocumentId(documentId); + req.setAdditionalProperties(props); - } catch (final ResponseStatusException e) { - throw e; - } catch (final Exception e) { - final String error = "Unable to dispatch task request"; - throw new ResponseStatusException(org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR, error); + final TaskResponse resp; + try { + resp = taskService.runTask(mode, req); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.json-processing")); + } catch (final TimeoutException e) { + log.error("Timeout while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, messages.get("task.gollm.timeout")); + } catch (final InterruptedException e) { + log.error("Interrupted while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.UNPROCESSABLE_ENTITY, messages.get("task.gollm.interrupted")); + } catch (final ExecutionException e) { + log.error("Error while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.execution-failure")); } + + // send the response + return ResponseEntity.ok().body(resp); } @GetMapping("/configure-model") @@ -187,58 +211,73 @@ public ResponseEntity createConfigureModelTask( final Schema.Permission permission = projectService.checkPermissionCanRead(currentUserService.get().getId(), projectId); - try { + // Grab the document + final Optional document = documentAssetService.getAsset(documentId, permission); + if (document.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("document.not-found")); + } - // Grab the document - final Optional document = documentAssetService.getAsset(documentId, permission); - if (document.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Document not found"); - } + // make sure there is text in the document + if (document.get().getText() == null || document.get().getText().isEmpty()) { + log.warn("Document {} has no text to send", documentId); + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("document.extraction.not-done")); + } - // make sure there is text in the document - if (document.get().getText() == null || document.get().getText().isEmpty()) { - log.warn("Document {} has no text to send", documentId); - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Document has no text"); - } + // Grab the model + final Optional model = modelService.getAsset(modelId, permission); + if (model.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("model.not-found")); + } - // Grab the model - final Optional model = modelService.getAsset(modelId, permission); - if (model.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Model not found"); - } + final ConfigureModelResponseHandler.Input input = new ConfigureModelResponseHandler.Input(); + input.setResearchPaper(document.get().getText()); + // stripping the metadata from the model before its sent since it can cause + // gollm to fail with massive inputs + model.get().setMetadata(null); + input.setAmr(model.get()); + + // Create the task + final TaskRequest req = new TaskRequest(); + req.setType(TaskType.GOLLM); + req.setScript(ConfigureModelResponseHandler.NAME); + req.setUserId(currentUserService.get().getId()); - final ConfigureModelResponseHandler.Input input = new ConfigureModelResponseHandler.Input(); - input.setResearchPaper(document.get().getText()); - // stripping the metadata from the model before its sent since it can cause - // gollm to fail with massive inputs - model.get().setMetadata(null); - input.setAmr(model.get()); - - // Create the task - final TaskRequest req = new TaskRequest(); - req.setType(TaskType.GOLLM); - req.setScript(ConfigureModelResponseHandler.NAME); - req.setUserId(currentUserService.get().getId()); + try { req.setInput(objectMapper.writeValueAsBytes(input)); - req.setProjectId(projectId); + } catch (final Exception e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); + } - final ConfigureModelResponseHandler.Properties props = new ConfigureModelResponseHandler.Properties(); - props.setDocumentId(documentId); - props.setModelId(modelId); - props.setWorkflowId(workflowId); - props.setNodeId(nodeId); - req.setAdditionalProperties(props); + req.setProjectId(projectId); - // send the request - return ResponseEntity.ok().body(taskService.runTask(mode, req)); + final ConfigureModelResponseHandler.Properties props = new ConfigureModelResponseHandler.Properties(); + props.setDocumentId(documentId); + props.setModelId(modelId); + props.setWorkflowId(workflowId); + props.setNodeId(nodeId); + req.setAdditionalProperties(props); - } catch (final ResponseStatusException e) { - throw e; - } catch (final Exception e) { - final String error = "Unable to dispatch task request"; - log.error("Unable to dispatch task request {}: {}", error, e.getMessage()); - throw new ResponseStatusException(org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR, error); + final TaskResponse resp; + try { + resp = taskService.runTask(mode, req); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.json-processing")); + } catch (final TimeoutException e) { + log.error("Timeout while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, messages.get("task.gollm.timeout")); + } catch (final InterruptedException e) { + log.error("Interrupted while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.UNPROCESSABLE_ENTITY, messages.get("task.gollm.interrupted")); + } catch (final ExecutionException e) { + log.error("Error while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.execution-failure")); } + + return ResponseEntity.ok().body(resp); } @Data @@ -284,84 +323,99 @@ public ResponseEntity createConfigFromDatasetTask( final Schema.Permission permission = projectService.checkPermissionCanRead(currentUserService.get().getId(), projectId); - try { - // Grab the datasets - final List datasets = new ArrayList<>(); - for (final UUID datasetId : datasetIds) { - final Optional dataset = datasetService.getAsset(datasetId, permission); - if (dataset.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Dataset not found"); - } + // Grab the datasets + final List datasets = new ArrayList<>(); + for (final UUID datasetId : datasetIds) { + final Optional dataset = datasetService.getAsset(datasetId, permission); + if (dataset.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("dataset.not-found")); + } - // make sure there is text in the document - if (dataset.get().getFileNames() == null - || dataset.get().getFileNames().isEmpty()) { - log.warn("Dataset {} has no source files to send", datasetId); - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Dataset has no filenames"); - } + // make sure there is text in the document + if (dataset.get().getFileNames() == null + || dataset.get().getFileNames().isEmpty()) { + log.error("Dataset {} has no source files to send", datasetId); + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("dataset.files.not-found")); + } - for (final String filename : dataset.get().getFileNames()) { - try { - final Optional datasetText = datasetService.fetchFileAsString(datasetId, filename); - if (datasetText.isPresent()) { - // ensure unescaped newlines are escaped - datasets.add( - datasetText.get().replaceAll("(? datasetText = datasetService.fetchFileAsString(datasetId, filename); + if (datasetText.isPresent()) { + // ensure unescaped newlines are escaped + datasets.add(datasetText.get().replaceAll("(? model = modelService.getAsset(modelId, permission); - if (model.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Model not found"); - } + // Grab the model + final Optional model = modelService.getAsset(modelId, permission); + if (model.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("model.not-found")); + } - final ConfigureFromDatasetResponseHandler.Input input = new ConfigureFromDatasetResponseHandler.Input(); - input.setDatasets(datasets); - // stripping the metadata from the model before its sent since it can cause - // gollm to fail with massive inputs - model.get().setMetadata(null); - input.setAmr(model.get()); + final ConfigureFromDatasetResponseHandler.Input input = new ConfigureFromDatasetResponseHandler.Input(); + input.setDatasets(datasets); + // stripping the metadata from the model before its sent since it can cause + // gollm to fail with massive inputs + model.get().setMetadata(null); + input.setAmr(model.get()); - // set matrix string if provided - if (body != null && !body.getMatrixStr().isEmpty()) { - input.setMatrixStr(body.getMatrixStr()); - } + // set matrix string if provided + if (body != null && !body.getMatrixStr().isEmpty()) { + input.setMatrixStr(body.getMatrixStr()); + } + + // Create the task + final TaskRequest req = new TaskRequest(); + req.setType(TaskType.GOLLM); + req.setScript(ConfigureFromDatasetResponseHandler.NAME); + req.setUserId(currentUserService.get().getId()); - // Create the task - final TaskRequest req = new TaskRequest(); - req.setType(TaskType.GOLLM); - req.setScript(ConfigureFromDatasetResponseHandler.NAME); - req.setUserId(currentUserService.get().getId()); + try { req.setInput(objectMapper.writeValueAsBytes(input)); - req.setProjectId(projectId); + } catch (final Exception e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); + } - final ConfigureFromDatasetResponseHandler.Properties props = - new ConfigureFromDatasetResponseHandler.Properties(); - props.setDatasetIds(datasetIds); - props.setModelId(modelId); - props.setWorkflowId(workflowId); - props.setNodeId(nodeId); - req.setAdditionalProperties(props); + req.setProjectId(projectId); - // send the request - return ResponseEntity.ok().body(taskService.runTask(mode, req)); + final ConfigureFromDatasetResponseHandler.Properties props = + new ConfigureFromDatasetResponseHandler.Properties(); + props.setDatasetIds(datasetIds); + props.setModelId(modelId); + props.setWorkflowId(workflowId); + props.setNodeId(nodeId); + req.setAdditionalProperties(props); - } catch (final ResponseStatusException e) { - throw e; - } catch (final Exception e) { - final String error = "Unable to dispatch task request"; - log.error("Unable to dispatch task request {}: {}", error, e.getMessage()); - throw new ResponseStatusException(org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR, error); + final TaskResponse resp; + try { + resp = taskService.runTask(mode, req); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.json-processing")); + } catch (final TimeoutException e) { + log.error("Timeout while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, messages.get("task.gollm.timeout")); + } catch (final InterruptedException e) { + log.error("Interrupted while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.UNPROCESSABLE_ENTITY, messages.get("task.gollm.interrupted")); + } catch (final ExecutionException e) { + log.error("Error while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.execution-failure")); } + + return ResponseEntity.ok().body(resp); } @GetMapping("/compare-models") @@ -395,52 +449,74 @@ public ResponseEntity createCompareModelsTask( @RequestParam(name = "project-id", required = false) final UUID projectId) { final Schema.Permission permission = projectService.checkPermissionCanWrite(currentUserService.get().getId(), projectId); - try { - final List modelCards = new ArrayList<>(); - for (final UUID modelId : modelIds) { - // Grab the model - final Optional model = modelService.getAsset(modelId, permission); - if (model.isEmpty()) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Model not found"); - } - if (model.get().getMetadata().getGollmCard() != null) { + + final List modelCards = new ArrayList<>(); + for (final UUID modelId : modelIds) { + // Grab the model + final Optional model = modelService.getAsset(modelId, permission); + if (model.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, messages.get("model.not-found")); + } + if (model.get().getMetadata().getGollmCard() != null) { + try { modelCards.add(objectMapper.writeValueAsString( model.get().getMetadata().getGollmCard())); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize model card: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.json-processing")); } } + } - // if the number of models is less than 2, return an error - if (modelCards.size() < 2) { - throw new ResponseStatusException( - HttpStatus.BAD_REQUEST, "At least two models with model cards are required"); - } + // if the number of models is less than 2, return an error + if (modelCards.size() < 2) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, messages.get("task.gollm.model-card.bad-number")); + } - final CompareModelsResponseHandler.Input input = new CompareModelsResponseHandler.Input(); - input.setModelCards(modelCards); + final CompareModelsResponseHandler.Input input = new CompareModelsResponseHandler.Input(); + input.setModelCards(modelCards); - // create the task - final TaskRequest req = new TaskRequest(); - req.setType(TaskType.GOLLM); - req.setScript(CompareModelsResponseHandler.NAME); - req.setUserId(currentUserService.get().getId()); + // create the task + final TaskRequest req = new TaskRequest(); + req.setType(TaskType.GOLLM); + req.setScript(CompareModelsResponseHandler.NAME); + req.setUserId(currentUserService.get().getId()); + + try { req.setInput(objectMapper.writeValueAsBytes(input)); - req.setProjectId(projectId); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); + } - final CompareModelsResponseHandler.Properties props = new CompareModelsResponseHandler.Properties(); - props.setWorkflowId(workflowId); - props.setNodeId(nodeId); - req.setAdditionalProperties(props); + req.setProjectId(projectId); - // send the request - return ResponseEntity.ok().body(taskService.runTask(mode, req)); + final CompareModelsResponseHandler.Properties props = new CompareModelsResponseHandler.Properties(); + props.setWorkflowId(workflowId); + props.setNodeId(nodeId); + req.setAdditionalProperties(props); - } catch (final ResponseStatusException e) { - throw e; - } catch (final Exception e) { - final String error = "Unable to dispatch task request"; - log.error("Unable to dispatch task request {}: {}", error, e.getMessage()); - throw new ResponseStatusException(org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR, error); + final TaskResponse resp; + try { + resp = taskService.runTask(mode, req); + } catch (final JsonProcessingException e) { + log.error("Unable to serialize input: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.json-processing")); + } catch (final TimeoutException e) { + log.error("Timeout while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.SERVICE_UNAVAILABLE, messages.get("task.gollm.timeout")); + } catch (final InterruptedException e) { + log.error("Interrupted while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException(HttpStatus.UNPROCESSABLE_ENTITY, messages.get("task.gollm.interrupted")); + } catch (final ExecutionException e) { + log.error("Error while waiting for task response: {}", e.getMessage()); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("task.gollm.execution-failure")); } + + return ResponseEntity.ok().body(resp); } @PutMapping("/{task-id}") diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/knowledge/KnowledgeController.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/knowledge/KnowledgeController.java index 55944678a1..f28f434609 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/knowledge/KnowledgeController.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/controller/knowledge/KnowledgeController.java @@ -301,14 +301,15 @@ ResponseEntity postCodeToAMR( } } catch (final IOException e) { log.error("Unable to write to zip file", e); - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error")); + throw new ResponseStatusException( + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); } finally { try { zipf.close(); } catch (final IOException e) { log.error("Unable to close zip file", e); throw new ResponseStatusException( - HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error")); + HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); } } @@ -435,7 +436,7 @@ public ResponseEntity codeBlocksToModel( fileAsBytes = input.getBytes(); } catch (final IOException e) { log.error("Unable to read file", e); - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error")); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.read")); } final HttpEntity fileEntity = new ByteArrayEntity(fileAsBytes, ContentType.TEXT_PLAIN); final String filename = input.getOriginalFilename(); @@ -549,7 +550,7 @@ public ResponseEntity postProfileModel( card = mapper.treeToValue(resp.getBody(), Card.class); } catch (final IOException e) { log.error("Unable to convert response to card", e); - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error")); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, messages.get("generic.io-error.write")); } if (model.getHeader() == null) { diff --git a/packages/server/src/main/resources/messages.properties b/packages/server/src/main/resources/messages.properties index 94dbc9dcf8..ae08bdafbd 100644 --- a/packages/server/src/main/resources/messages.properties +++ b/packages/server/src/main/resources/messages.properties @@ -1,6 +1,7 @@ generic.unknown = Oops! Something went wrong. Please try again later. generic.invalid-uuid = The ID you supplied is not a valid UUID. Please ensure that the ID is correct. -generic.io-error = An error occurred while trying to read or write data. Please try again later. +generic.io-error.read = An error occurred while trying to read data. Please try again later. +generic.io-error.write = An error occurred while trying to write data. Please try again later. artifact.not-found = We were unable to find the requested artifact. Please ensure that the artifact ID you supplied is correct or contact support. artifact.unable-to-delete = We were unable to delete the artifact asset. Please try again later. @@ -23,6 +24,7 @@ document.extraction.not-done = The document extraction process has not yet compl document.not-found = We were unable to find the requested document. Please ensure that the dataset ID you supplied is correct or contact support. document.unable-to-delete = We were unable to delete the dataset document. Please try again later. document.unable-to-update = We were unable to update the dataset document. Please try again later. +document.text-length-exceeded = The length of this document exceeds the maximum allowed length of 600,000 words. Please contact support if you require this further analysis of this document. mit.service-unavailable = Terarium's text reading service (MIT-TR) is temporarily unavailable. Please try again later. mit.file.unable-to-read = An error occurred while trying to parce the supplied files. Please try again later. @@ -41,7 +43,6 @@ projects.not-found = We were unable to find the requested project. Please ensure projects.unable-to-delete = We were unable to delete the project. Please try again later. projects.unable-to-get-permissions = Terarium was unable to determine read/write permissions. For safety reasons, we are unable to return results. Please try again later. projects.unable-to-update = We were unable to update the project. Please try again later. -projects.name-required = You must supply a name for the project. projects.import-parse-failure = We were unable to parse the import file. Please ensure that the file is in the correct format and try again. rebac.permissions.unable-to-set = An unknown error occurred while trying to set project permissions. Please try again later. @@ -57,6 +58,12 @@ skema.error.align-model = An error occurred while trying to align the model with skema.internal-error = An error occurred in Terarium's model service (SKEMA), and it was not able to produce a valid model representation based on the provided resource. Please check that it is valid and try again. skema.service-unavailable = Terarium's model service (SKEMA) is temporarily unavailable. Please try again later. +task.gollm.json-processing = An error occurred while trying to process Terarium's LLM service (GoLLM) task data. Please ensure that the data is valid and try again. +task.gollm.timeout = Terarium's LLM service (GoLLM) took too long to complete and was terminated. Please try again later. If this problem persists, please contact support. +task.gollm.interrupted = The task sent to Terarium's LLM service (GoLLM) was interrupted and did not complete. +task.gollm.execution-failure = Terarium's LLM service (GoLLM) failed to execute the supplied task. Please try again later. If this problem persists, please contact support. +task.gollm.model-card.bad-number = At least two models with model cards are required for this task. Please ensure that the models you are trying to compare contain model cards and try again. If this problem persists, please contact support. + workflow.not-found = We were unable to find the requested workflow. Please ensure that the workflow ID you supplied is correct or contact support. workflow.unable-to-delete = We were unable to delete the workflow asset. Please try again later. workflow.unable-to-update = We were unable to update the workflow asset. Please try again later.