LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
UN-3166 [FIX] Use group-shared adapters in Prompt Studio & workflows (#2028)
Kirtiman Mishrac27d32610ff6
diff --git a/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py b/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.pyindex af6ce3a34..a27e4219b 100644--- a/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py+++ b/backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py@@ -11,6 +11,7 @@ from account_v2.models import Userfrom adapter_processor_v2.models import AdapterInstance, UserDefaultAdapterfrom django.conf import settingsfrom django.db import transaction+from permissions.permission import has_group_accessfrom plugins import get_pluginfrom rest_framework.exceptions import APIExceptionfrom rest_framework.request import Request@@ -209,6 +210,7 @@ class PromptStudioHelper:or profile_manager.llm.shared_users.filter(pk=profile_manager_owner.pk).exists()+ or has_group_access(profile_manager_owner, profile_manager.llm))is_vector_store_owned = (profile_manager.vector_store.shared_to_org@@ -216,6 +218,7 @@ class PromptStudioHelper:or profile_manager.vector_store.shared_users.filter(pk=profile_manager_owner.pk).exists()+ or has_group_access(profile_manager_owner, profile_manager.vector_store))is_embedding_model_owned = (profile_manager.embedding_model.shared_to_org@@ -223,6 +226,7 @@ class PromptStudioHelper:or profile_manager.embedding_model.shared_users.filter(pk=profile_manager_owner.pk).exists()+ or has_group_access(profile_manager_owner, profile_manager.embedding_model))is_x2text_owned = (profile_manager.x2text.shared_to_org@@ -230,6 +234,7 @@ class PromptStudioHelper:or profile_manager.x2text.shared_users.filter(pk=profile_manager_owner.pk).exists()+ or has_group_access(profile_manager_owner, profile_manager.x2text))if not (diff --git a/backend/tool_instance_v2/tool_instance_helper.py b/backend/tool_instance_v2/tool_instance_helper.pyindex 107dfc2bc..01d99d8c0 100644--- a/backend/tool_instance_v2/tool_instance_helper.py+++ b/backend/tool_instance_v2/tool_instance_helper.py@@ -9,6 +9,7 @@ from adapter_processor_v2.models import AdapterInstancefrom django.core.exceptions import PermissionDeniedfrom django.core.exceptions import ValidationError as DjangoValidationErrorfrom jsonschema.exceptions import ValidationError as JSONValidationError+from permissions.permission import has_group_accessfrom prompt_studio.prompt_studio_registry_v2.models import PromptStudioRegistryfrom tenant_account_v2.organization_member_service import OrganizationMemberServicefrom workflow_manager.workflow_v2.constants import WorkflowKey@@ -508,6 +509,7 @@ class ToolInstanceHelper:or adapter_instance.shared_to_orgor adapter_instance.created_by == useror adapter_instance.shared_users.filter(pk=user.pk).exists()+ or has_group_access(user, adapter_instance)):logger.error("User %s doesn't have access to adapter %s",