From 083541fe613a8da7687f14c50bff87b1b88c4475 Mon Sep 17 00:00:00 2001 From: David Gauldie Date: Wed, 2 Oct 2024 15:45:35 -0400 Subject: [PATCH] 4991 task update gollm intervention policy schema to align with new intervention policy model (#5010) --- .../intervention-policy-operation.ts | 6 +- .../tera-intervention-policy-drilldown.vue | 75 +++++++++++++++---- .../tera-intervention-policy-node.vue | 37 ++++++++- .../client/hmi-client/src/services/goLLM.ts | 17 +++++ .../src/services/notificationEventHandlers.ts | 14 +++- packages/client/hmi-client/src/types/Types.ts | 1 + .../prompts/equations_from_image.py | 8 ++ .../prompts/interventions_from_document.py | 9 ++- .../gollm_openai/prompts/latex_style_guide.py | 18 +++++ .../schemas/intervention_policy.json | 45 ++++++----- packages/gollm/setup.py | 1 + .../controller/gollm/GoLLMController.java | 22 +++--- .../hmiserver/models/ClientEventType.java | 1 + .../interventions/Intervention.java | 4 +- ...erventionsFromDocumentResponseHandler.java | 13 ---- .../tasks/TaskNotificationEventTypes.java | 15 ++-- 16 files changed, 214 insertions(+), 72 deletions(-) create mode 100644 packages/gollm/gollm_openai/prompts/latex_style_guide.py diff --git a/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/intervention-policy-operation.ts b/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/intervention-policy-operation.ts index 5d96c4e32b..7b97ab562e 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/intervention-policy-operation.ts +++ b/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/intervention-policy-operation.ts @@ -1,10 +1,11 @@ import { InterventionPolicy } from '@/types/Types'; +import type { BaseState, Operation } from '@/types/workflow'; import { WorkflowOperationTypes } from '@/types/workflow'; -import type { Operation, BaseState } from '@/types/workflow'; import { isEqual, omit } from 'lodash'; export interface InterventionPolicyState extends BaseState { interventionPolicy: InterventionPolicy; + taskIds: string[]; } export const InterventionPolicyOperation: Operation = { @@ -24,7 +25,8 @@ export const InterventionPolicyOperation: Operation = { interventionPolicy: { modelId: '', interventions: [] - } + }, + taskIds: [] }; return init; } diff --git a/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/tera-intervention-policy-drilldown.vue b/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/tera-intervention-policy-drilldown.vue index 24a4831051..87b2d1d3de 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/tera-intervention-policy-drilldown.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/intervention-policy/tera-intervention-policy-drilldown.vue @@ -16,14 +16,17 @@