# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.batch_failed_predictions import BatchFailedPredictions
from ..types.batch_predictions import BatchPredictions
from ..types.model_interface import ModelInterface
from ..types.model_interface_serializer_get import ModelInterfaceSerializerGet
from ..types.paginated_all_roles_project_list_list import PaginatedAllRolesProjectListList
from ..types.paginated_project_subset_tasks_response_list import PaginatedProjectSubsetTasksResponseList
from ..types.project_subset_item import ProjectSubsetItem
from ..types.skill_name_enum import SkillNameEnum
from ..types.user_simple_request import UserSimpleRequest
from .raw_client import AsyncRawPromptsClient, RawPromptsClient
from .types.compatible_projects_prompts_request_project_type import CompatibleProjectsPromptsRequestProjectType

if typing.TYPE_CHECKING:
    from .indicators.client import AsyncIndicatorsClient, IndicatorsClient
    from .runs.client import AsyncRunsClient, RunsClient
    from .versions.client import AsyncVersionsClient, VersionsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class PromptsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawPromptsClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._indicators: typing.Optional[IndicatorsClient] = None
        self._versions: typing.Optional[VersionsClient] = None
        self._runs: typing.Optional[RunsClient] = None

    @property
    def with_raw_response(self) -> RawPromptsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPromptsClient
        """
        return self._raw_client

    def batch_failed_predictions(
        self,
        *,
        failed_predictions: typing.Sequence[typing.Any],
        modelrun_id: int,
        num_failed_predictions: typing.Optional[int] = None,
        job_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BatchFailedPredictions:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new batch of failed predictions.

        Parameters
        ----------
        failed_predictions : typing.Sequence[typing.Any]

        modelrun_id : int

        num_failed_predictions : typing.Optional[int]
            Number of failed predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BatchFailedPredictions


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.batch_failed_predictions(
            failed_predictions=[],
            modelrun_id=1,
        )
        """
        _response = self._raw_client.batch_failed_predictions(
            failed_predictions=failed_predictions,
            modelrun_id=modelrun_id,
            num_failed_predictions=num_failed_predictions,
            job_id=job_id,
            request_options=request_options,
        )
        return _response.data

    def batch_predictions(
        self,
        *,
        modelrun_id: int,
        results: typing.Sequence[typing.Any],
        num_predictions: typing.Optional[int] = None,
        job_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BatchPredictions:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new batch prediction.

        Parameters
        ----------
        modelrun_id : int

        results : typing.Sequence[typing.Any]

        num_predictions : typing.Optional[int]
            Number of predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BatchPredictions


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.batch_predictions(
            modelrun_id=1,
            results=[],
        )
        """
        _response = self._raw_client.batch_predictions(
            modelrun_id=modelrun_id,
            results=results,
            num_predictions=num_predictions,
            job_id=job_id,
            request_options=request_options,
        )
        return _response.data

    def subset_tasks(
        self,
        project_pk: int,
        *,
        include_total: typing.Optional[bool] = None,
        model_run: typing.Optional[int] = None,
        ordering: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        parent_model: typing.Optional[int] = None,
        project_subset: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PaginatedProjectSubsetTasksResponseList:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>

                Provides list of tasks, based on project subset. Includes predictions for tasks. For the 'HasGT' subset, accuracy metrics will also be provided.


        Parameters
        ----------
        project_pk : int

        include_total : typing.Optional[bool]
            If true (default), includes task_count in response; if false, omits it.

        model_run : typing.Optional[int]
            A unique ID of a ModelRun

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        parent_model : typing.Optional[int]
            The ID of the parent model (ModelInterface) for this Inference Run

        project_subset : typing.Optional[str]
            The project subset to retrieve tasks for

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PaginatedProjectSubsetTasksResponseList


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.subset_tasks(
            project_pk=1,
        )
        """
        _response = self._raw_client.subset_tasks(
            project_pk,
            include_total=include_total,
            model_run=model_run,
            ordering=ordering,
            page=page,
            page_size=page_size,
            parent_model=parent_model,
            project_subset=project_subset,
            request_options=request_options,
        )
        return _response.data

    def subsets(
        self,
        project_pk: int,
        *,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[ProjectSubsetItem]:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>

                Provides list of available subsets for a project along with count of tasks in each subset


        Parameters
        ----------
        project_pk : int

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[ProjectSubsetItem]


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.subsets(
            project_pk=1,
        )
        """
        _response = self._raw_client.subsets(project_pk, ordering=ordering, request_options=request_options)
        return _response.data

    def list(
        self, *, ordering: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[ModelInterfaceSerializerGet]:
        """
        List all prompts.

        Parameters
        ----------
        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[ModelInterfaceSerializerGet]


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.list()
        """
        _response = self._raw_client.list(ordering=ordering, request_options=request_options)
        return _response.data

    def create(
        self,
        *,
        title: str,
        associated_projects: typing.Optional[typing.Sequence[int]] = OMIT,
        created_by: typing.Optional[UserSimpleRequest] = OMIT,
        description: typing.Optional[str] = OMIT,
        input_fields: typing.Optional[typing.Any] = OMIT,
        organization: typing.Optional[int] = OMIT,
        output_classes: typing.Optional[typing.Any] = OMIT,
        skill_name: typing.Optional[SkillNameEnum] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelInterface:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new prompt.

        Parameters
        ----------
        title : str
            Model name

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterface


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.create(
            title="title",
        )
        """
        _response = self._raw_client.create(
            title=title,
            associated_projects=associated_projects,
            created_by=created_by,
            description=description,
            input_fields=input_fields,
            organization=organization,
            output_classes=output_classes,
            skill_name=skill_name,
            request_options=request_options,
        )
        return _response.data

    def compatible_projects(
        self,
        *,
        ordering: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        project_type: typing.Optional[CompatibleProjectsPromptsRequestProjectType] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PaginatedAllRolesProjectListList:
        """
        Retrieve a list of compatible project for prompt.

        Parameters
        ----------
        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        project_type : typing.Optional[CompatibleProjectsPromptsRequestProjectType]
            Skill to filter by

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PaginatedAllRolesProjectListList


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.compatible_projects()
        """
        _response = self._raw_client.compatible_projects(
            ordering=ordering,
            page=page,
            page_size=page_size,
            project_type=project_type,
            request_options=request_options,
        )
        return _response.data

    def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ModelInterfaceSerializerGet:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific prompt.

        Parameters
        ----------
        id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterfaceSerializerGet


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.get(
            id="id",
        )
        """
        _response = self._raw_client.get(id, request_options=request_options)
        return _response.data

    def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a prompt by ID

        Parameters
        ----------
        id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.delete(
            id="id",
        )
        """
        _response = self._raw_client.delete(id, request_options=request_options)
        return _response.data

    def update(
        self,
        id: str,
        *,
        associated_projects: typing.Optional[typing.Sequence[int]] = OMIT,
        created_by: typing.Optional[UserSimpleRequest] = OMIT,
        description: typing.Optional[str] = OMIT,
        input_fields: typing.Optional[typing.Any] = OMIT,
        organization: typing.Optional[int] = OMIT,
        output_classes: typing.Optional[typing.Any] = OMIT,
        skill_name: typing.Optional[SkillNameEnum] = OMIT,
        title: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelInterface:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific prompt by ID.

        Parameters
        ----------
        id : str

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        title : typing.Optional[str]
            Model name

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterface


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.update(
            id="id",
        )
        """
        _response = self._raw_client.update(
            id,
            associated_projects=associated_projects,
            created_by=created_by,
            description=description,
            input_fields=input_fields,
            organization=organization,
            output_classes=output_classes,
            skill_name=skill_name,
            title=title,
            request_options=request_options,
        )
        return _response.data

    @property
    def indicators(self):
        if self._indicators is None:
            from .indicators.client import IndicatorsClient  # noqa: E402

            self._indicators = IndicatorsClient(client_wrapper=self._client_wrapper)
        return self._indicators

    @property
    def versions(self):
        if self._versions is None:
            from .versions.client import VersionsClient  # noqa: E402

            self._versions = VersionsClient(client_wrapper=self._client_wrapper)
        return self._versions

    @property
    def runs(self):
        if self._runs is None:
            from .runs.client import RunsClient  # noqa: E402

            self._runs = RunsClient(client_wrapper=self._client_wrapper)
        return self._runs


class AsyncPromptsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawPromptsClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._indicators: typing.Optional[AsyncIndicatorsClient] = None
        self._versions: typing.Optional[AsyncVersionsClient] = None
        self._runs: typing.Optional[AsyncRunsClient] = None

    @property
    def with_raw_response(self) -> AsyncRawPromptsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPromptsClient
        """
        return self._raw_client

    async def batch_failed_predictions(
        self,
        *,
        failed_predictions: typing.Sequence[typing.Any],
        modelrun_id: int,
        num_failed_predictions: typing.Optional[int] = None,
        job_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BatchFailedPredictions:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new batch of failed predictions.

        Parameters
        ----------
        failed_predictions : typing.Sequence[typing.Any]

        modelrun_id : int

        num_failed_predictions : typing.Optional[int]
            Number of failed predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BatchFailedPredictions


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.batch_failed_predictions(
                failed_predictions=[],
                modelrun_id=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.batch_failed_predictions(
            failed_predictions=failed_predictions,
            modelrun_id=modelrun_id,
            num_failed_predictions=num_failed_predictions,
            job_id=job_id,
            request_options=request_options,
        )
        return _response.data

    async def batch_predictions(
        self,
        *,
        modelrun_id: int,
        results: typing.Sequence[typing.Any],
        num_predictions: typing.Optional[int] = None,
        job_id: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> BatchPredictions:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new batch prediction.

        Parameters
        ----------
        modelrun_id : int

        results : typing.Sequence[typing.Any]

        num_predictions : typing.Optional[int]
            Number of predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BatchPredictions


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.batch_predictions(
                modelrun_id=1,
                results=[],
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.batch_predictions(
            modelrun_id=modelrun_id,
            results=results,
            num_predictions=num_predictions,
            job_id=job_id,
            request_options=request_options,
        )
        return _response.data

    async def subset_tasks(
        self,
        project_pk: int,
        *,
        include_total: typing.Optional[bool] = None,
        model_run: typing.Optional[int] = None,
        ordering: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        parent_model: typing.Optional[int] = None,
        project_subset: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PaginatedProjectSubsetTasksResponseList:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>

                Provides list of tasks, based on project subset. Includes predictions for tasks. For the 'HasGT' subset, accuracy metrics will also be provided.


        Parameters
        ----------
        project_pk : int

        include_total : typing.Optional[bool]
            If true (default), includes task_count in response; if false, omits it.

        model_run : typing.Optional[int]
            A unique ID of a ModelRun

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        parent_model : typing.Optional[int]
            The ID of the parent model (ModelInterface) for this Inference Run

        project_subset : typing.Optional[str]
            The project subset to retrieve tasks for

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PaginatedProjectSubsetTasksResponseList


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.subset_tasks(
                project_pk=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.subset_tasks(
            project_pk,
            include_total=include_total,
            model_run=model_run,
            ordering=ordering,
            page=page,
            page_size=page_size,
            parent_model=parent_model,
            project_subset=project_subset,
            request_options=request_options,
        )
        return _response.data

    async def subsets(
        self,
        project_pk: int,
        *,
        ordering: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[ProjectSubsetItem]:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>

                Provides list of available subsets for a project along with count of tasks in each subset


        Parameters
        ----------
        project_pk : int

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[ProjectSubsetItem]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.subsets(
                project_pk=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.subsets(project_pk, ordering=ordering, request_options=request_options)
        return _response.data

    async def list(
        self, *, ordering: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[ModelInterfaceSerializerGet]:
        """
        List all prompts.

        Parameters
        ----------
        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[ModelInterfaceSerializerGet]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.list()


        asyncio.run(main())
        """
        _response = await self._raw_client.list(ordering=ordering, request_options=request_options)
        return _response.data

    async def create(
        self,
        *,
        title: str,
        associated_projects: typing.Optional[typing.Sequence[int]] = OMIT,
        created_by: typing.Optional[UserSimpleRequest] = OMIT,
        description: typing.Optional[str] = OMIT,
        input_fields: typing.Optional[typing.Any] = OMIT,
        organization: typing.Optional[int] = OMIT,
        output_classes: typing.Optional[typing.Any] = OMIT,
        skill_name: typing.Optional[SkillNameEnum] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelInterface:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new prompt.

        Parameters
        ----------
        title : str
            Model name

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterface


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.create(
                title="title",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create(
            title=title,
            associated_projects=associated_projects,
            created_by=created_by,
            description=description,
            input_fields=input_fields,
            organization=organization,
            output_classes=output_classes,
            skill_name=skill_name,
            request_options=request_options,
        )
        return _response.data

    async def compatible_projects(
        self,
        *,
        ordering: typing.Optional[str] = None,
        page: typing.Optional[int] = None,
        page_size: typing.Optional[int] = None,
        project_type: typing.Optional[CompatibleProjectsPromptsRequestProjectType] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> PaginatedAllRolesProjectListList:
        """
        Retrieve a list of compatible project for prompt.

        Parameters
        ----------
        ordering : typing.Optional[str]
            Which field to use when ordering the results.

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        project_type : typing.Optional[CompatibleProjectsPromptsRequestProjectType]
            Skill to filter by

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        PaginatedAllRolesProjectListList


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.compatible_projects()


        asyncio.run(main())
        """
        _response = await self._raw_client.compatible_projects(
            ordering=ordering,
            page=page,
            page_size=page_size,
            project_type=project_type,
            request_options=request_options,
        )
        return _response.data

    async def get(
        self, id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> ModelInterfaceSerializerGet:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific prompt.

        Parameters
        ----------
        id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterfaceSerializerGet


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.get(
                id="id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get(id, request_options=request_options)
        return _response.data

    async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a prompt by ID

        Parameters
        ----------
        id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.delete(
                id="id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.delete(id, request_options=request_options)
        return _response.data

    async def update(
        self,
        id: str,
        *,
        associated_projects: typing.Optional[typing.Sequence[int]] = OMIT,
        created_by: typing.Optional[UserSimpleRequest] = OMIT,
        description: typing.Optional[str] = OMIT,
        input_fields: typing.Optional[typing.Any] = OMIT,
        organization: typing.Optional[int] = OMIT,
        output_classes: typing.Optional[typing.Any] = OMIT,
        skill_name: typing.Optional[SkillNameEnum] = OMIT,
        title: typing.Optional[str] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelInterface:
        """
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific prompt by ID.

        Parameters
        ----------
        id : str

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        title : typing.Optional[str]
            Model name

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelInterface


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.update(
                id="id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.update(
            id,
            associated_projects=associated_projects,
            created_by=created_by,
            description=description,
            input_fields=input_fields,
            organization=organization,
            output_classes=output_classes,
            skill_name=skill_name,
            title=title,
            request_options=request_options,
        )
        return _response.data

    @property
    def indicators(self):
        if self._indicators is None:
            from .indicators.client import AsyncIndicatorsClient  # noqa: E402

            self._indicators = AsyncIndicatorsClient(client_wrapper=self._client_wrapper)
        return self._indicators

    @property
    def versions(self):
        if self._versions is None:
            from .versions.client import AsyncVersionsClient  # noqa: E402

            self._versions = AsyncVersionsClient(client_wrapper=self._client_wrapper)
        return self._versions

    @property
    def runs(self):
        if self._runs is None:
            from .runs.client import AsyncRunsClient  # noqa: E402

            self._runs = AsyncRunsClient(client_wrapper=self._client_wrapper)
        return self._runs
