LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Moving public prefix within try-catch block (#486)
harini-venkataraman142174cf8dfe
diff --git a/backend/backend/public_urls.py b/backend/backend/public_urls.pyindex ffeb5f02e..5eb9ab823 100644--- a/backend/backend/public_urls.py+++ b/backend/backend/public_urls.py@@ -22,7 +22,6 @@ from django.urls import include, pathpath_prefix = settings.PATH_PREFIXapi_path_prefix = settings.API_DEPLOYMENT_PATH_PREFIX-share_path_prefix = settings.PUBLIC_PATH_PREFIXurlpatterns = [path(f"{path_prefix}/", include("account.urls")),@@ -51,6 +50,8 @@ try:import pluggable_apps.platform_admin.urls # noqa # pylint: disable=unused-importimport pluggable_apps.public_shares_share_controller.urls # noqa # pylint: disable=unused-import+ share_path_prefix = settings.PUBLIC_PATH_PREFIX+urlpatterns += [path(f"{path_prefix}/", include("pluggable_apps.platform_admin.urls")),# Public Sharingdiff --git a/frontend/src/components/helpers/custom-tools/CustomToolsHelper.js b/frontend/src/components/helpers/custom-tools/CustomToolsHelper.jsindex 7bd9017c8..529c0f48c 100644--- a/frontend/src/components/helpers/custom-tools/CustomToolsHelper.js+++ b/frontend/src/components/helpers/custom-tools/CustomToolsHelper.js@@ -10,6 +10,13 @@ import { useSocketCustomToolStore } from "../../../store/socket-custom-tool";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader";import { useTokenUsageStore } from "../../../store/token-usage-store";+let shareManagerToolSource;+try {+ shareManagerToolSource =+ require("../../../plugins/prompt-studio-public-share/helpers/PublicShareAPIs").shareManagerToolSource;+} catch (err) {+ // Do nothing, Not-found Page will be triggered.+}function CustomToolsHelper() {const [isLoading, setIsLoading] = useState(true);const { id } = useParams();@@ -82,11 +89,13 @@ function CustomToolsHelper() {.then((res) => {const data = res?.data;updatedCusTool["llmProfiles"] = data;- const reqOpsShare = {- method: "GET",- url: `/api/v1/unstract/${sessionDetails?.orgId}/share-manager/tool-source/?tool_id=${id}`,- };- return handleApiRequest(reqOpsShare);+ if (shareManagerToolSource) {+ const reqOpsShare = {+ method: "GET",+ url: shareManagerToolSource(id, sessionDetails?.orgId),+ };+ return handleApiRequest(reqOpsShare);+ }}).then((res) => {const data = res?.data;