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

import typing

from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .....core.request_options import RequestOptions
from .raw_client import AsyncRawSummariesClient, RawSummariesClient
from .types.summaries_get_response_value import SummariesGetResponseValue


class SummariesClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawSummariesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        RawSummariesClient
        """
        return self._raw_client

    def get(
        self,
        *,
        document_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Dict[str, SummariesGetResponseValue]:
        """
        Gets multiple knowledge base document summaries by their IDs.

        Parameters
        ----------
        document_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            The ids of knowledge base documents.

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

        Returns
        -------
        typing.Dict[str, SummariesGetResponseValue]
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.knowledge_base.documents.summaries.get(
            document_ids=["21m00Tcm4TlvDq8ikWAM", "31n11Udm5UmwEr9jkXBN"],
        )
        """
        _response = self._raw_client.get(document_ids=document_ids, request_options=request_options)
        return _response.data


class AsyncSummariesClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawSummariesClient(client_wrapper=client_wrapper)

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

        Returns
        -------
        AsyncRawSummariesClient
        """
        return self._raw_client

    async def get(
        self,
        *,
        document_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.Dict[str, SummariesGetResponseValue]:
        """
        Gets multiple knowledge base document summaries by their IDs.

        Parameters
        ----------
        document_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            The ids of knowledge base documents.

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

        Returns
        -------
        typing.Dict[str, SummariesGetResponseValue]
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.knowledge_base.documents.summaries.get(
                document_ids=["21m00Tcm4TlvDq8ikWAM", "31n11Udm5UmwEr9jkXBN"],
            )


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