- {isSinglePassExtractLoading ? (
+ {isSinglePassExtractLoading ||
+ spsLoading[selectedDoc?.document_id] ? (
} />
) : (
@@ -246,6 +257,7 @@ function PromptCardItems({
useEffect(() => {
getAdapterInfo(adapters);
}, [llmProfiles, selectedLlmProfileId, enabledProfiles]);
+
return (
@@ -266,6 +278,9 @@ function PromptCardItems({
expandCard={expandCard}
setExpandCard={setExpandCard}
enabledProfiles={enabledProfiles}
+ spsLoading={spsLoading}
+ handleSpsLoading={handleSpsLoading}
+ handleGetOutput={handleGetOutput}
/>
@@ -355,6 +370,7 @@ function PromptCardItems({
{!singlePassExtractMode &&
+ !isSimplePromptStudio &&
llmProfileDetails.map((profile, index) => {
const profileId = profile?.profile_id;
const isChecked = enabledProfiles.includes(profileId);
@@ -578,7 +594,8 @@ function PromptCardItems({
);
})}
- {singlePassExtractMode && renderSinglePassResult()}
+ {(singlePassExtractMode || isSimplePromptStudio) &&
+ renderSinglePassResult()}
@@ -614,6 +631,9 @@ PromptCardItems.propTypes = {
setOpenOutputForDoc: PropTypes.func.isRequired,
selectedLlmProfileId: PropTypes.string,
timers: PropTypes.object.isRequired,
+ spsLoading: PropTypes.object,
+ handleSpsLoading: PropTypes.func.isRequired,
+ handleGetOutput: PropTypes.func.isRequired,
};
export { PromptCardItems };
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 21420c95c..27697caa6 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -123,6 +123,14 @@ body {
height: 100%;
}
+.pad-right-6 {
+ padding-right: 6px;
+}
+
+.pad-left-6 {
+ padding-left: 6px;
+}
+
.cur-pointer {
cursor: pointer;
}
diff --git a/frontend/src/setupProxy.js b/frontend/src/setupProxy.js
index 6ec9ebbda..6b592e3ae 100644
--- a/frontend/src/setupProxy.js
+++ b/frontend/src/setupProxy.js
@@ -8,11 +8,4 @@ module.exports = (app) => {
changeOrigin: true,
})
);
- app.use(
- "/public",
- createProxyMiddleware({
- target: process.env.REACT_APP_BACKEND_URL,
- changeOrigin: true,
- })
- );
};
diff --git a/prompt-service/src/unstract/prompt_service/constants.py b/prompt-service/src/unstract/prompt_service/constants.py
index 2b8dacd58..cad39731e 100644
--- a/prompt-service/src/unstract/prompt_service/constants.py
+++ b/prompt-service/src/unstract/prompt_service/constants.py
@@ -52,6 +52,7 @@ class PromptServiceContants:
EXTRACTION = "extraction"
SUMMARIZE = "summarize"
SINGLE_PASS_EXTRACTION = "single-pass-extraction"
+ SIMPLE_PROMPT_STUDIO = "simple-prompt-studio"
LLM_USAGE_REASON = "llm_usage_reason"
METADATA = "metadata"
OUTPUT = "output"
diff --git a/prompt-service/src/unstract/prompt_service/main.py b/prompt-service/src/unstract/prompt_service/main.py
index f9a05506a..c58543266 100644
--- a/prompt-service/src/unstract/prompt_service/main.py
+++ b/prompt-service/src/unstract/prompt_service/main.py
@@ -803,6 +803,7 @@ def enable_plugins() -> None:
PSKeys.SINGLE_PASS_EXTRACTION, {}
)
summarize_plugin: dict[str, Any] = plugins.get(PSKeys.SUMMARIZE, {})
+ simple_prompt_studio: dict[str, Any] = plugins.get(PSKeys.SIMPLE_PROMPT_STUDIO, {})
if single_pass_extration_plugin:
single_pass_extration_plugin["entrypoint_cls"](
app=app, challenge_plugin=plugins.get(PSKeys.CHALLENGE, {})
@@ -811,6 +812,10 @@ def enable_plugins() -> None:
summarize_plugin["entrypoint_cls"](
app=app,
)
+ if simple_prompt_studio:
+ simple_prompt_studio["entrypoint_cls"](
+ app=app,
+ )
enable_plugins()