LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
fixed highlight typo and alignment (#519)
jagadeeswaran-zipstack9b65f6b9948f
diff --git a/frontend/src/components/custom-tools/combined-output/CombinedOutput.jsx b/frontend/src/components/custom-tools/combined-output/CombinedOutput.jsxindex 9e3ef8fea..863e3ff7d 100644--- a/frontend/src/components/custom-tools/combined-output/CombinedOutput.jsx+++ b/frontend/src/components/custom-tools/combined-output/CombinedOutput.jsx@@ -44,11 +44,6 @@ try {// The component will remain null of it is not available}function CombinedOutput({ docId, setFilledFields }) {- const [combinedOutput, setCombinedOutput] = useState({});- const [isOutputLoading, setIsOutputLoading] = useState(false);- const [adapterData, setAdapterData] = useState([]);- const [activeKey, setActiveKey] = useState("0");- const { id } = useParams();const {details,defaultLlmProfile,@@ -58,6 +53,13 @@ function CombinedOutput({ docId, setFilledFields }) {isSimplePromptStudio,isPublicSource,} = useCustomToolStore();+ const [combinedOutput, setCombinedOutput] = useState({});+ const [isOutputLoading, setIsOutputLoading] = useState(false);+ const [adapterData, setAdapterData] = useState([]);+ const [activeKey, setActiveKey] = useState(+ singlePassExtractMode ? defaultLlmProfile : "0"+ );+ const { id } = useParams();const { sessionDetails } = useSessionStore();const { setAlertDetails } = useAlertStore();const axiosPrivate = useAxiosPrivate();@@ -67,14 +69,14 @@ function CombinedOutput({ docId, setFilledFields }) {useEffect(() => {getAdapterInfo();}, []);+ useEffect(() => {+ setActiveKey(singlePassExtractMode ? defaultLlmProfile : "0");+ setSelectedProfile(singlePassExtractMode ? defaultLlmProfile : null);+ }, [singlePassExtractMode]);useEffect(() => {if (!docId || isSinglePassExtractLoading) {return;}- if (singlePassExtractMode && activeKey === "0") {- setActiveKey("1");- }-let filledFields = 0;setIsOutputLoading(true);setCombinedOutput({});@@ -134,12 +136,7 @@ function CombinedOutput({ docId, setFilledFields }) {.finally(() => {setIsOutputLoading(false);});- }, [- docId,- singlePassExtractMode,- isSinglePassExtractLoading,- selectedProfile,- ]);+ }, [docId, isSinglePassExtractLoading, activeKey]);const handleOutputApiRequest = async () => {let url;@@ -200,7 +197,7 @@ function CombinedOutput({ docId, setFilledFields }) {if (key === "0") {setSelectedProfile(defaultLlmProfile);} else {- setSelectedProfile(adapterData[key - 1]?.profile_id);+ setSelectedProfile(key);}setActiveKey(key);};diff --git a/frontend/src/components/custom-tools/combined-output/JsonView.jsx b/frontend/src/components/custom-tools/combined-output/JsonView.jsxindex 357a57cdc..ddf36777f 100644--- a/frontend/src/components/custom-tools/combined-output/JsonView.jsx+++ b/frontend/src/components/custom-tools/combined-output/JsonView.jsx@@ -25,10 +25,10 @@ function JsonView({{!isSinglePass && (<TabPane tab={<span>Default</span>} key={"0"}></TabPane>)}- {adapterData.map((adapter, index) => (+ {adapterData.map((adapter) => (<TabPanetab={<span>{adapter?.llm_model || adapter?.profile_name}</span>}- key={(index + 1)?.toString()}+ key={adapter?.profile_id}/>))}</Tabs>diff --git a/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.css b/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.cssindex 8fcec2dba..31cae927c 100644--- a/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.css+++ b/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.css@@ -1,3 +1,3 @@-.highlight{- margin-top: 16px;+.highlight-metadata {+ margin-top: 16px;}diff --git a/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.jsx b/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.jsxindex 6cafd4887..b350ac782 100644--- a/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.jsx+++ b/frontend/src/components/custom-tools/highlight-metadata/HighLightMetaData.jsx@@ -68,7 +68,7 @@ function HighLightMetaData({ handleUpdateTool }) {</Space><Space><Alert- className="highlight"+ className="highlight-metadata"message={<>Turn this option on if downstream use cases need you todiff --git a/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx b/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsxindex aea84020d..5fb2deb22 100644--- a/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx+++ b/frontend/src/components/custom-tools/prompt-card/PromptCardItems.jsx@@ -451,7 +451,7 @@ function PromptCardItems({<Tooltip title={tooltipContent(profile?.conf)}><InfoCircleOutlined /></Tooltip>- <Tooltip title="Chunck used">+ <Tooltip title="Chunk used"><DatabaseOutlinedonClick={() => {setIsIndexOpen(true);diff --git a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsxindex 9f0b4c25e..023e14c2e 100644--- a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx+++ b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx@@ -42,7 +42,7 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {getMenuItem("Manage Grammar", 5, <MessageOutlined />),getMenuItem("Preamble", 6, <DiffOutlined />),getMenuItem("Postamble", 7, <DiffOutlined />),- getMenuItem("Manage Higlighting", 8, <CodeOutlined />),+ getMenuItem("Manage Highlighting", 8, <CodeOutlined />),];const listOfComponents = {