Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

added workflow id in endpoint and removed manual review destination c… (#1168)

vishnuszipstack68764e0131e8
diff --git a/backend/workflow_manager/endpoint_v2/destination.py b/backend/workflow_manager/endpoint_v2/destination.py
index d1b1fe31b..2e5573ffd 100644
--- a/backend/workflow_manager/endpoint_v2/destination.py
+++ b/backend/workflow_manager/endpoint_v2/destination.py
@@ -597,6 +597,7 @@ class DestinationConnector(BaseConnector):
workflow_id=str(self.workflow_id),
file_content=file_content_base64,
whisper_hash=whisper_hash,
+ execution_id=self.execution_id,
).to_dict()
# Convert the result dictionary to a JSON string
queue_result_json = json.dumps(queue_result)
diff --git a/backend/workflow_manager/endpoint_v2/queue_utils.py b/backend/workflow_manager/endpoint_v2/queue_utils.py
index 2d26a3ad5..d3687e2d5 100644
--- a/backend/workflow_manager/endpoint_v2/queue_utils.py
+++ b/backend/workflow_manager/endpoint_v2/queue_utils.py
@@ -39,6 +39,7 @@ class QueueResult:
workflow_id: str
file_content: str
whisper_hash: Optional[str] = None
+ execution_id: Optional[str] = None
def to_dict(self) -> Any:
return {
@@ -48,4 +49,5 @@ class QueueResult:
"result": self.result,
"workflow_id": self.workflow_id,
"file_content": self.file_content,
+ "execution_id": self.execution_id,
}
diff --git a/backend/workflow_manager/workflow_v2/models/execution.py b/backend/workflow_manager/workflow_v2/models/execution.py
index 12503024e..e3537b570 100644
--- a/backend/workflow_manager/workflow_v2/models/execution.py
+++ b/backend/workflow_manager/workflow_v2/models/execution.py
@@ -100,6 +100,17 @@ class WorkflowExecution(BaseModel):
"""Return a list of tag names associated with the workflow execution."""
return list(self.tags.values_list("name", flat=True))
+ @property
+ def workflow(self) -> Optional[str]:
+ """Obtains the workflow associated to this execution."""
+ try:
+ return Workflow.objects.get(id=self.workflow_id)
+ except ObjectDoesNotExist:
+ logger.warning(
+ f"Expected workflow '{self.workflow_id}' to exist but missing"
+ )
+ return None
+
@property
def workflow_name(self) -> Optional[str]:
"""Obtains the workflow's name associated to this execution."""
diff --git a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
index 8f79d1c17..6435c8703 100644
--- a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
+++ b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
@@ -14,7 +14,6 @@ import {
Space,
Tooltip,
Typography,
- Modal,
} from "antd";
import PropTypes from "prop-types";
import { useEffect, useState } from "react";
@@ -132,12 +131,10 @@ function DsSettingsCard({ type, endpointDetails, message }) {
setOptions({});
} else {
// Filter options based on source connection type
- const filteredOptions = ["API"].includes(source?.connection_type)
- ? inputOptions.filter(
- (option) =>
- option.value === "API" || option.value === "MANUALREVIEW"
- )
- : inputOptions.filter((option) => option.value !== "API");
+ const isAPI = source?.connection_type === "API";
+ const filteredOptions = inputOptions.filter((option) =>
+ isAPI ? option.value === "API" : option.value !== "API"
+ );
setOptions(filteredOptions);
}
@@ -147,9 +144,7 @@ function DsSettingsCard({ type, endpointDetails, message }) {
// Remove Database from Source Dropdown
const filteredOptions = inputOptions.filter(
(option) =>
- option.value !== "DATABASE" &&
- option.value !== "APPDEPLOYMENT" &&
- option.value !== "MANUALREVIEW"
+ option.value !== "DATABASE" && option.value !== "APPDEPLOYMENT"
);
setOptions(filteredOptions);
}
@@ -321,16 +316,6 @@ function DsSettingsCard({ type, endpointDetails, message }) {
} else {
updatedData["destination"] = data;
}
- if (
- type === "output" &&
- updatedData?.destination?.connection_type === "MANUALREVIEW"
- ) {
- Modal.warning({
- title: "Warning",
- content:
- "Please ensure that the tool in use is has highlight enabled in the tool settings.",
- });
- }
updateWorkflow(updatedData);
if (showSuccess) {
setAlertDetails({
@@ -409,7 +394,6 @@ function DsSettingsCard({ type, endpointDetails, message }) {
disabled={
!endpointDetails?.connection_type ||
connType === "API" ||
- connType === "MANUALREVIEW" ||
connType === "APPDEPLOYMENT"
}
>
@@ -432,9 +416,7 @@ function DsSettingsCard({ type, endpointDetails, message }) {
</Space>
) : (
<>
- {connType === "API" ||
- connType === "MANUALREVIEW" ||
- connType === "APPDEPLOYMENT" ? (
+ {connType === "API" || connType === "APPDEPLOYMENT" ? (
<Typography.Text
className="font-size-12 display-flex-align-center"
ellipsis={{ rows: 1, expandable: false }}
diff --git a/frontend/src/components/settings/settings/Settings.jsx b/frontend/src/components/settings/settings/Settings.jsx
index 5699bac2d..d8938e8d5 100644
--- a/frontend/src/components/settings/settings/Settings.jsx
+++ b/frontend/src/components/settings/settings/Settings.jsx
@@ -76,7 +76,7 @@ function Settings() {
strong
onClick={() => navigate("review")}
>
- Manual Review Settings
+ Human In The Loop Settings
</Typography.Link>
</div>
</div>