Ë
    uPêjõY  ã                   ó  — d dl Z d dlmZ d dlmZmZ d dlmZmZm	Z	m
Z
 deez  ez  defd„Z G d„ d	e«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zeez  ez  ez  Z G d„ de«      Z G d „ d!e«      Z G d"„ d#e«      Z G d$„ d%e«      Z G d&„ d'e«      Z G d(„ d)e«      Z  G d*„ d+e«      Z! G d,„ d-e«      Z" G d.„ d/e«      Z# G d0„ d1e«      Z$ G d2„ d3e«      Z% G d4„ d5e«      Z& G d6„ d7e«      Z' G d8„ d9ee«      Z( G d:„ d;e«      Z) G d<„ d=e«      Z* G d>„ d?e«      Z+ G d@„ dAe«      Z, G dB„ dCe«      Z- G dD„ dEe«      Z. G dF„ dGe«      Z/ G dH„ dIe0e«      Z1 G dJ„ dKe«      Z2 G dL„ dMe2«      Z3 G dN„ dOe2«      Z4 G dP„ dQe«      Z5 G dR„ dSe«      Z6 G dT„ dUe«      Z7 G dV„ dWe«      Z8 G dX„ dYe«      Z9 G dZ„ d[e«      Z: G d\„ d]e«      Z; G d^„ d_e«      Z< G d`„ dae«      Z= G db„ dce«      Z> G dd„ dee«      Z? G df„ dge«      Z@ G dh„ die«      ZA G dj„ dke«      ZB G dl„ dme«      ZC G dn„ doe«      ZD G dp„ dqe«      ZE G dr„ dse«      ZFy)té    N)ÚEnum)ÚFinalÚLiteral)Ú	BaseModelÚFieldÚfield_validatorÚmodel_validatorÚvÚreturnc                 ót  — | di g fv ryt        | t        «      r	d| v r| d   S t        | t        «      rkg }| D ]S  }t        |t        «      rd|v r|d   sŒ|j                  |d   «       Œ2t        |t        «      sŒC|j                  |«       ŒU dj                  |«      S t        | t        «      r| S t        d«      ‚)N© Ú Útextú
zContent must be a string)Ú
isinstanceÚdictÚlistÚappendÚstrÚjoinÚ
ValueError)r
   Únew_vÚitems      úa/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/sap/chat/models.pyÚvalidate_different_contentr      s´   € ØˆR��RˆLÑØÜ	�A”tÔ	 ¨1¡Ø�‰yÐÜ	�A”tÔ	ØˆØò 	#ˆDÜ˜$¤Ô%¨&°D©.Ø˜“<Ø—L‘L  f¡Õ.Ü˜D¤#Õ&Ø—‘˜TÕ"ð	#ð �y‰y˜ÓÐÜ	�A”sÔ	ØˆÜ
Ð/Ó
0Ð0ó    c                   ó<   — e Zd ZU  edd¬«      Zed   ed<   eed<   y)ÚTextContentr   Útype©ÚdefaultÚaliasÚtype_N)Ú__name__Ú
__module__Ú__qualname__r   r#   r   Ú__annotations__r   r   r   r   r   r      s   … Ù"¨6¸Ô@€Eˆ7�6‰?Ó@Ø
„Ir   r   c                   ó&   — e Zd ZU eed<   dZeed<   y)ÚImageURLContentÚurlÚautoÚdetailN)r$   r%   r&   r   r'   r,   r   r   r   r)   r)       s   … Ø	ƒHØ€FˆCÔr   r)   c                   ó<   — e Zd ZU  edd¬«      Zed   ed<   eed<   y)ÚImageContentÚ	image_urlr   r    r#   N)r$   r%   r&   r   r#   r   r'   r)   r   r   r   r.   r.   %   s   … Ù"'°À6Ô"J€Eˆ7�;ÑÓJØÔr   r.   c                   ó"   — e Zd ZU eed<   eed<   y)ÚFunctionObjÚnameÚ	argumentsN)r$   r%   r&   r   r'   r   r   r   r1   r1   *   s   … Ø
ƒIØ„Nr   r1   c                   ó”   ‡ — e Zd ZU dZeed<   eed<   di dœZeed<   dZe	ed<   d	efˆ fd
„Z
 edd¬«      eded	efd„«       «       Zˆ xZS )ÚFunctionToolr   Údescriptionr2   Úobject©r   Ú
propertiesÚ
parametersFÚstrictr   c                 ó,   •— d|d<   t        ‰| �  di |¤ŽS ©NFÚexclude_unsetr   ©ÚsuperÚ
model_dump©ÚselfÚkwargsÚ	__class__s     €r   rA   zFunctionTool.model_dump5   ó    ø€ Ø"'ˆˆÑÜ‰wÑ!Ñ+ FÑ+Ð+r   Úbefore©Úmoder
   c                 ó:   — |sdi dœS d|vrddi|¥}d|vri |d<   |S )zMEnsure parameters has type='object' as required by SAP Orchestration Service.r7   r8   r   r9   r   )Úclsr
   s     r   Úensure_object_typezFunctionTool.ensure_object_type9   s>   € ñ Ø$°BÑ7Ð7Ø˜‰?Ø˜Ð' QÐ'ˆAØ˜qÑ Ø ˆAˆl‰OØˆr   )r$   r%   r&   r6   r   r'   r:   r   r;   ÚboolrA   r   ÚclassmethodrL   Ú__classcell__©rE   s   @r   r5   r5   /   sh   ø… Ø€K�ÓØ
ƒIØ (¸Ñ;€J�Ó;Ø€FˆDÓð, dõ ,ñ �\¨Ô1Øð 4ð ¨Dò ó ó 2ôr   r5   c                   óT   ‡ — e Zd ZU  edd¬«      Zed   ed<   eed<   defˆ fd„Z	ˆ xZ
S )ÚChatCompletionToolÚfunctionr   r    r#   r   c                 ó,   •— d|d<   t        ‰| �  di |¤ŽS r=   r?   rB   s     €r   rA   zChatCompletionTool.model_dumpJ   rF   r   )r$   r%   r&   r   r#   r   r'   r5   r   rA   rO   rP   s   @r   rR   rR   F   s0   ø… Ù!&¨zÀÔ!H€Eˆ7�:ÑÓHØÓð, d÷ ,ñ ,r   rR   c                   óF   — e Zd ZU eed<    edd¬«      Zed   ed<   eed<   y)ÚMessageToolCallÚidrS   r   r    r#   N)	r$   r%   r&   r   r'   r   r#   r   r1   r   r   r   rV   rV   O   s#   … ØƒGÙ!&¨zÀÔ!H€Eˆ7�:ÑÓHØÔr   rV   c                   óP   — e Zd ZU dZdZed   ed<   eed<     edd¬«      e	«      Z
y)	Ú
SAPMessagez>
    Model for SystemChatMessage and DeveloperChatMessage
    Úsystem)rZ   Ú	developerÚroleÚcontentrG   rH   N)r$   r%   r&   Ú__doc__r\   r   r'   r   r   r   Ú_content_validatorr   r   r   rY   rY   U   s3   … ñð ,4€Dˆ'Ð'Ñ
(Ó3ØƒLàB™¨¸ÔBÐC]Ó^Ñr   rY   c                   óJ   — e Zd ZU dZed   ed<   eez  ez  e	eez     z  ed<   y)ÚSAPUserMessageÚuserr\   r]   N)
r$   r%   r&   r\   r   r'   r   r   r.   r   r   r   r   ra   ra   `   s/   … Ø"€Dˆ'�&‰/Ó"Ø�;Ñ Ñ-°°[À<Ñ5OÑ0PÑPÔPr   ra   c                   ór   — e Zd ZU dZed   ed<   dZeed<   dZeed<   g Z	e
e   ed<     edd¬«      e«      Zy	)
ÚSAPAssistantMessageÚ	assistantr\   r   r]   ÚrefusalÚ
tool_callsrG   rH   N)r$   r%   r&   r\   r   r'   r]   r   rf   rg   r   rV   r   r   r_   r   r   r   rd   rd   e   sI   … Ø!,€Dˆ'�+Ñ
Ó,Ø€GˆSÓØ€GˆSÓØ(*€J��_Ñ%Ó*àB™¨¸ÔBÐC]Ó^Ñr   rd   c                   óV   — e Zd ZU dZed   ed<   eed<   eed<     edd¬«      e«      Z	y)ÚSAPToolChatMessageÚtoolr\   Útool_call_idr]   rG   rH   N)
r$   r%   r&   r\   r   r'   r   r   r   r_   r   r   r   ri   ri   n   s0   … Ø"€Dˆ'�&‰/Ó"ØÓØƒLàB™¨¸ÔBÐC]Ó^Ñr   ri   c                   ó2   — e Zd ZU  edd¬«      Zed   ed<   y)ÚResponseFormatr   r   r    )r   Újson_objectr#   N)r$   r%   r&   r   r#   r   r'   r   r   r   rm   rm   y   s   … Ù,1¸&ÈÔ,O€Eˆ7Ð(Ñ)ÔOr   rm   c                   óR   — e Zd ZU dZeed<   eed<    eed¬«      Zeed<   dZ	e
ed<   y	)
ÚJSONResponseSchemar   r6   r2   Úschema)Údefault_factoryr"   Úschema_Fr;   N)r$   r%   r&   r6   r   r'   r   r   rs   r;   rM   r   r   r   rp   rp   }   s,   … Ø€K�ÓØ
ƒIÙ¨$°hÔ?€GˆTÓ?Ø€FˆDÔr   rp   c                   ó<   — e Zd ZU  edd¬«      Zed   ed<   eed<   y)ÚResponseFormatJSONSchemaÚjson_schemar   r    r#   N)r$   r%   r&   r   r#   r   r'   rp   r   r   r   ru   ru   „   s   … Ù$)°-ÀvÔ$N€Eˆ7�=Ñ!ÓNØ#Ô#r   ru   c                   ó(   — e Zd ZU eed<   ee   ed<   y)ÚKeyValueListPairÚkeyÚvalueN)r$   r%   r&   r   r'   r   r   r   r   rx   rx   ‰   s   … Ø	ƒHØ�‰9Ôr   rx   c                   ó.   — e Zd ZU dZeed      dz  ed<   y)Ú!DocumentMetadataKeyValueListPairsNÚignoreIfKeyAbsentÚselect_mode)r$   r%   r&   r~   r   r   r'   r   r   r   r|   r|   Ž   s   … Ø=A€K��gÐ1Ñ2Ñ3°dÑ:ÔAr   r|   c                   ót   — e Zd ZU  edd¬«      Zedz  ed<    edd¬«      Zedz  ed<    ed¬«      d„ «       Z	y)	ÚGroundingSearchConfigNr   ©r!   ÚgeÚmax_chunk_countÚmax_document_countÚafterrH   c                 óL   — | j                   �| j                  �t        d«      ‚| S )Nz7Cannot specify both maxChunkCount and maxDocumentCount.)rƒ   r„   r   ©rC   s    r   Ú/validate_max_chunk_count_and_max_document_countzEGroundingSearchConfig.validate_max_chunk_count_and_max_document_count–   s*   € à×ÑÐ+°×0GÑ0GÐ0SÜÐVÓWÐWØˆr   )
r$   r%   r&   r   rƒ   Úintr'   r„   r	   rˆ   r   r   r   r€   r€   ’   sD   … Ù"'°¸Ô";€O�S˜4‘ZÓ;Ù%*°4¸AÔ%>Ð˜˜d™
Ó>á˜'Ô"ñó #ñr   r€   c                   ó¾   — e Zd ZU  edd¬«      Zedz  ed<   ed   ed<   dZe	dz  ed<   dZ
ee   dz  ed<   dZee   dz  ed	<   dZee   dz  ed
<   dZee   dz  ed<   y)ÚDocumentGroundingFilterNrW   r    Úid_)Úvectorzhelp.sap.comÚdata_repository_typeÚsearch_configÚdata_repositoriesÚdata_repository_metadataÚdocument_metadataÚchunk_metadata)r$   r%   r&   r   rŒ   r   r'   r   r�   r€   r�   r   r‘   rx   r’   r|   r“   r   r   r   r‹   r‹   �   sˆ   … Ù D°Ô5€Cˆˆt‰Ó5Ø!Ð":Ñ;Ó;Ø26€MÐ(¨4Ñ/Ó6Ø*.Ð�t˜C‘y 4Ñ'Ó.Ø>BÐ˜dÐ#3Ñ4°tÑ;ÓBØHLÐ�tÐ=Ñ>ÀÑEÓLØ48€N�DÐ)Ñ*¨TÑ1Ô8r   r‹   c                   ó:   — e Zd ZU  ed¬«      Zee   ed<   eed<   y)ÚDocumentGroundingPlaceholdersé   ©Ú
min_lengthÚinputÚoutputN)r$   r%   r&   r   r™   r   r   r'   r   r   r   r•   r•   §   s   … Ù¨Ô*€Eˆ4�‰9Ó*Ø„Kr   r•   c                   óL   — e Zd ZU dZee   dz  ed<   eed<   dZee	   dz  ed<   y)ÚDocumentGroundingConfigNÚfiltersÚplaceholdersÚmetadata_params)
r$   r%   r&   r�   r   r‹   r'   r•   rŸ   r   r   r   r   rœ   rœ   ¬   s0   … Ø48€GˆTÐ)Ñ*¨TÑ1Ó8Ø/Ó/Ø(,€O�T˜#‘Y Ñ%Ô,r   rœ   c                   ó<   — e Zd ZU  edd¬«      Zed   ed<   eed<   y)ÚGroundingModuleConfigÚdocument_grounding_servicer   r    r#   ÚconfigN)r$   r%   r&   r   r#   r   r'   rœ   r   r   r   r¡   r¡   ²   s!   … Ù38ÐA]ÐekÔ3l€Eˆ7Ð/Ñ0ÓlØ#Ô#r   r¡   c                   óp   — e Zd ZU ee   ed<   dZeeef   dz  ed<   dZ	e
ez  dz  ed<   dZee   dz  ed<   y)ÚTemplateÚtemplateNÚdefaultsÚresponse_formatÚtools)r$   r%   r&   r   ÚChatMessager'   r§   r   r   r¨   rm   ru   r©   rR   r   r   r   r¥   r¥   ·   sN   … Ø�;ÑÓØ&*€Hˆd�3˜�8‰n˜tÑ#Ó*ØHL€O�^Ð&>Ñ>ÀÑEÓLØ-1€Eˆ4Ð"Ñ# dÑ*Ô1r   r¥   c                   ó:   — e Zd ZU eed<   dZeed<   dZedz  ed<   y)ÚLLMModelDetailsr2   ÚlatestÚversionNÚparams)r$   r%   r&   r   r'   r®   r¯   r   r   r   r   r¬   r¬   ¾   s   … Ø
ƒIØ€GˆSÓØ€FˆD�4‰KÔr   r¬   c                   ó"   — e Zd ZU eed<   eed<   y)ÚPromptTemplatingModuleConfigÚpromptÚmodelN)r$   r%   r&   r¥   r'   r¬   r   r   r   r±   r±   Ä   s   … ØÓØÔr   r±   c                   óx   — e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)ÚSAPMaskingProfileEntityaÐ  
    Enumerates the entity categories that can be masked by the SAP Data Privacy Integration service.

    This enum lists different types of personal or sensitive information (PII) that can be detected and masked
    by the data masking module, such as personal details, organizational data, contact information, and identifiers.

    Values:
        PERSON: Represents personal names.

        ORG: Represents organizational names.

        UNIVERSITY: Represents educational institutions.

        LOCATION: Represents geographical locations.

        EMAIL: Represents email addresses.

        PHONE: Represents phone numbers.

        ADDRESS: Represents physical addresses.

        SAP_IDS_INTERNAL: Represents internal SAP identifiers.

        SAP_IDS_PUBLIC: Represents public SAP identifiers.

        URL: Represents URLs.

        USERNAME_PASSWORD: Represents usernames and passwords.

        NATIONAL_ID: Represents national identification numbers.

        IBAN: Represents International Bank Account Numbers.

        SSN: Represents Social Security Numbers.

        CREDIT_CARD_NUMBER: Represents credit card numbers.

        PASSPORT: Represents passport numbers.

        DRIVING_LICENSE: Represents driving license numbers.

        NATIONALITY: Represents nationality information.

        RELIGIOUS_GROUP: Represents religious group affiliation.

        POLITICAL_GROUP: Represents political group affiliation.

        PRONOUNS_GENDER: Represents pronouns and gender identity.

        GENDER: Represents gender information.

        SEXUAL_ORIENTATION: Represents sexual orientation.

        TRADE_UNION: Represents trade union membership.

        SENSITIVE_DATA: Represents any other sensitive information.
    zprofile-personzprofile-orgzprofile-universityzprofile-locationzprofile-emailzprofile-phonezprofile-addresszprofile-sapids-internalzprofile-sapids-publiczprofile-urlzprofile-username-passwordzprofile-nationalidzprofile-ibanzprofile-ssnzprofile-credit-card-numberzprofile-passportzprofile-driverlicensezprofile-nationalityzprofile-religious-groupzprofile-political-groupzprofile-pronouns-genderzprofile-genderzprofile-sexual-orientationzprofile-trade-unionzprofile-sensitive-datazprofile-ethnicityN)r$   r%   r&   r^   ÚPERSONÚORGÚ
UNIVERSITYÚLOCATIONÚEMAILÚPHONEÚADDRESSÚSAP_IDS_INTERNALÚSAP_IDS_PUBLICÚURLÚUSERNAME_PASSWORDÚNATIONAL_IDÚIBANÚSSNÚCREDIT_CARD_NUMBERÚPASSPORTÚDRIVING_LICENSEÚNATIONALITYÚRELIGIOUS_GROUPÚPOLITICAL_GROUPÚPRONOUNS_GENDERÚGENDERÚSEXUAL_ORIENTATIONÚTRADE_UNIONÚSENSITIVE_DATAÚ	ETHNICITYr   r   r   rµ   rµ   É   s�   „ ñ8ðt €FØ
€CØ%€JØ!€HØ€EØ€EØ€GØ0ÐØ,€NØ
€CØ3ÐØ&€KØ€DØ
€CØ5ÐØ!€HØ-€OØ'€KØ/€OØ/€OØ/€OØ€FØ5ÐØ'€KØ-€NØ#�Ir   rµ   c                   ó0   — e Zd ZU dZdZed   ed<   eed<   y)ÚDPIMethodConstantzY
    Replaces the entity with the specified value followed by an incrementing number
    ÚconstantÚmethodrz   N)r$   r%   r&   r^   rÓ   r   r'   r   r   r   r   rÑ   rÑ      s   … ñð #-€FˆG�JÑÓ,Ø„Jr   rÑ   c                   ó&   — e Zd ZU dZdZed   ed<   y)ÚDPIMethodFabricatedDatazV
    Replaces the entity with a randomly generated value appropriate to its type.
    Úfabricated_datarÓ   N)r$   r%   r&   r^   rÓ   r   r'   r   r   r   rÕ   rÕ   )  s   … ñð *;€FˆGÐ%Ñ&Ô:r   rÕ   c                   ó&   — e Zd ZU dZeed<   eed<   y)ÚDPICustomEntityz€
    regex: Regular expression to match the entity
    replacement_strategy: Replacement strategy to be used for the entity
    ÚregexÚreplacement_strategyN)r$   r%   r&   r^   r   r'   rÑ   r   r   r   rØ   rØ   1  s   … ñð
 ƒJØ+Ô+r   rØ   c                   óJ   — e Zd ZU dZ edd¬«      Zeed<   dZe	e
z  dz  ed<   y)ÚDPIStandardEntityzz
    type: Standard entity type to be masked
    replacement_strategy: Replacement strategy to be used for the entity
    .r   )r"   r#   NrÚ   )r$   r%   r&   r^   r   r#   rµ   r'   rÚ   rÑ   rÕ   r   r   r   rÜ   rÜ   ;  s2   … ññ
 &+¨3°fÔ%=€EÐ"Ó=ØOSÐÐ+Ð.EÑEÈÑLÔSr   rÜ   c                   ó    — e Zd ZU dZdZeed<   y)ÚMaskGroundingInputz…
    Controls whether the input to the grounding module will be masked with the configuration
    supplied in the masking module
    FÚenabledN)r$   r%   r&   r^   rß   rM   r'   r   r   r   rÞ   rÞ   E  s   … ñð
 €GˆTÔr   rÞ   c                   óŠ   — e Zd ZU dZ edd¬«      Zed   ed<   ed   ed<   ee	e
z     ed<   d	Zee   d	z  ed
<   d	Zed	z  ed<   y	)ÚMaskingProviderConfiga¤  
    SAP Data Privacy Integration provider for data masking.

    This class implements the SAP Data Privacy Integration service, which can anonymize or pseudonymize
    specified entity categories in the input data. It supports masking sensitive information like personal names,
    contact details, and identifiers.

    Args:
        method: The method of masking to apply (anonymization or pseudonymization).

        entities: A list of entity categories to be masked, such as names, locations, or emails.

        allowlist: A list of strings that should not be masked.

        mask_grounding_input: A flag indicating whether to mask input to the grounding module.
    Úsap_data_privacy_integrationr   r    r#   )ÚanonymizationÚpseudonymizationrÓ   ÚentitiesNÚ	allowlistÚmask_grounding_input)r$   r%   r&   r^   r   r#   r   r'   r   rÜ   rØ   ræ   r   rç   rÞ   r   r   r   rá   rá   N  sc   … ññ" 6;ÐCaÐioÔ5p€Eˆ7Ð1Ñ2ÓpØÐ7Ñ8Ó8ØÐ$ Ñ6Ñ7Ó7Ø"&€Iˆt�C‰y˜4ÑÓ&Ø6:ÐÐ,¨tÑ3Ô:r   rá   c                   ó„   — e Zd ZU dZ edd¬«      Zee   dz  ed<    edd¬«      Z	ee   dz  ed<    e
d¬«      d	„ «       Zy)
ÚMaskingModuleConfiga�  
    Configuration for the data masking module.

    Args:
        providers: list of masking service provider configurations
        masking_providers: list of masking provider configurations
    IMPORTANT: use exactly one of the parameters to set the list of masking provider configurations.
    DEPRECATED: parameter 'masking_providers' will be removed Sept 15, 2026. Use 'providers' instead.
    r–   N)r˜   r!   Ú	providersÚmasking_providersr…   rH   c                 ó¶   — | j                   d u}| j                  d u}|s|st        d«      ‚|r|rt        d«      ‚|rt        j                  dt
        d¬«       | S )Nz;For SAP Masking Module Config you must provide 'providers'.zhFor SAP Masking Module Config you must set exactly one of: 'providers' or 'masking_providers', not both.znThe 'masking_providers' parameter is deprecated and will be removed on Sept 15, 2026. Use 'providers' instead.é   )Ú
stacklevel)rê   rë   r   ÚwarningsÚwarnÚDeprecationWarning)rC   Úhas_providersÚhas_masking_providerss      r   Ú!enforce_exactly_one_provider_listz5MaskingModuleConfig.enforce_exactly_one_provider_listu  sl   € à#Ÿ~™~°TÐ9ˆØ'+×'=Ñ'=ÀTÐ'IÐáÑ%:ÜÐZÓ[Ð[ÙÑ2ÜØzóð ñ !Ü�M‰Mð+ä"Øõ	ð ˆr   )r$   r%   r&   r^   r   rê   r   rá   r'   rë   r	   rô   r   r   r   ré   ré   g  s[   … ññ 5:ÀQÐPTÔ4U€IˆtÐ)Ñ*¨TÑ1ÓUÙ<AÈQÐX\Ô<]Ð�tÐ1Ñ2°TÑ9Ó]á˜'Ô"ñó #ñr   ré   c                   ó    — e Zd ZdZdZdZdZdZy)ÚAzureThresholda  
    Enumerates the threshold levels for the Azure Content Safety service.

    This enum defines the various threshold levels that can be used to filter
    content based on its safety score. Each threshold value represents a specific
    level of content moderation.

    Values:
        ALLOW_SAFE: Allows only Safe content.

        ALLOW_SAFE_LOW: Allows Safe and Low content.

        ALLOW_SAFE_LOW_MEDIUM: Allows Safe, Low, and Medium content.

        ALLOW_ALL: Allows all content (Safe, Low, Medium, and High).
    r   é   é   é   N)r$   r%   r&   r^   Ú
ALLOW_SAFEÚALLOW_SAFE_LOWÚALLOW_SAFE_LOW_MEDIUMÚ	ALLOW_ALLr   r   r   rö   rö   Œ  s   „ ñð" €JØ€NØÐØ�Ir   rö   c                   ó’   — e Zd ZU dZdZeed   z  dz  ed<   dZeed   z  dz  ed<   dZ	eed   z  dz  ed<   dZ
eed   z  dz  ed<   y)ÚAzureContentFilteraÚ  
    Specific filter configuration for Azure Content Safety.

    This class configures content filtering based on Azure's categories and
    severity levels. It allows setting thresholds for hate speech, sexual content,
    violence, and self-harm content.

    Values:
        hate: Threshold for hate speech content.

        sexual: Threshold for sexual content.

        violence: Threshold for violent content.

        self_harm: Threshold for self-harm content.
    N)r   r÷   rø   rù   ÚhateÚsexualÚviolenceÚ	self_harm)r$   r%   r&   r^   r   rö   r   r'   r  r  r  r   r   r   rÿ   rÿ   ¤  sm   … ñð" 9=€Dˆ.˜7 :Ñ.Ñ
.°Ñ
5Ó<Ø:>€FˆN˜W ZÑ0Ñ0°4Ñ7Ó>Ø<@€Hˆn˜w zÑ2Ñ2°TÑ9Ó@Ø=A€Iˆ~ ¨
Ñ 3Ñ3°dÑ:ÔAr   rÿ   c                   ó&   — e Zd ZU dZdZedz  ed<   y)ÚAzureContentSafetyInputa]  
    Filter configuration for Azure Content Safety Input

        Values:
            hate: Threshold for hate speech content.

            sexual: Threshold for sexual content.

            violence: Threshold for violent content.

            self_harm: Threshold for self-harm content.

            prompt_shield: A flag to use prompt shield
    FNÚprompt_shield)r$   r%   r&   r^   r  rM   r'   r   r   r   r  r  ¼  s   … ñð "'€M�4˜$‘;Ô&r   r  c                   ó&   — e Zd ZU dZdZedz  ed<   y)ÚAzureContentSafetyOutputa  
    Filter configuration for Azure Content Safety Output

    Values:
        hate: Threshold for hate speech content.

        sexual: Threshold for sexual content.

        violence: Threshold for violent content.

        self_harm: Threshold for self-harm content.

        protected_material_code: Detect protected code content from known GitHub repositories.
                    The scan includes software libraries, source code, algorithms,
                    and other proprietary programming content.
    FNÚprotected_material_code)r$   r%   r&   r^   r	  rM   r'   r   r   r   r  r  Ï  s   … ñð" ,1Ð˜T D™[Ô0r   r  c                   óš  — e Zd ZU dZ ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Z	eed<    ed¬«      Z
eed<    ed¬«      Zeed<    ed¬«      Zeed	<    ed¬«      Zeed
<    ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Zeed<    ed¬«      Zeed<   y)ÚLlamaGuard38bFilteraD  
    Specific implementation of ContentFilter for Llama Guard 3. Llama Guard 3 is a
    Llama-3.1-8B pretrained model, fine-tuned for content safety classification.

    Args:
        violent_crimes: Responses that enable, encourage, or endorse the commission of violent crimes.

        non_violent_crimes: Responses that enable, encourage, or endorse the commission of non-violent crimes.

        sex_crimes: Responses that enable, encourage, or endorse the commission of sex-related crimes.

        child_exploitation: Responses that contain, describe, enable or endorse the sexual abuse of children.

        defamation: Responses that are both verifiably false and likely to injure a living person's reputation.

        specialized_advice: Responses that contain specialized financial, medical or legal advice.

        privacy: Responses that contain sensitive or nonpublic personal information.

        intellectual_property: Responses that may violate the intellectual property rights of any third party.

        indiscriminate_weapons: Responses that enable, encourage, or endorse the creation of indiscriminate weapons.

        hate: Responses that demean or dehumanize people on the basis of their sensitive, personal characteristics.

        self_harm: Responses that enable, encourage, or endorse acts of intentional self-harm.

        sexual_content: Responses that contain erotica.

        elections: Responses that contain factually incorrect information about electoral systems and processes.

        code_interpreter_abuse: Responses that seek to abuse code interpreters.
    F)r!   Úviolent_crimesÚnon_violent_crimesÚ
sex_crimesÚchild_exploitationÚ
defamationÚspecialized_adviceÚprivacyÚintellectual_propertyÚindiscriminate_weaponsr   r  Úsexual_contentÚ	electionsÚcode_interpreter_abuseN)r$   r%   r&   r^   r   r  rM   r'   r  r  r  r  r  r  r  r  r   r  r  r  r  r   r   r   r  r  ä  sâ   … ñ ñD !¨Ô/€N�DÓ/Ù$¨UÔ3Ð˜Ó3Ù UÔ+€J�Ó+Ù$¨UÔ3Ð˜Ó3Ù UÔ+€J�Ó+Ù$¨UÔ3Ð˜Ó3Ù %Ô(€GˆTÓ(Ù"'°Ô"6Ð˜4Ó6Ù#(°Ô#7Ð˜DÓ7Ù˜uÔ%€Dˆ$Ó%Ù EÔ*€IˆtÓ*Ù ¨Ô/€N�DÓ/Ù EÔ*€IˆtÓ*Ù#(°Ô#7Ð˜DÔ7r   r  c                   ó<   — e Zd ZU  edd¬«      Zed   ed<   eed<   y)ÚLlamaGuard38bFilterConfigÚllama_guard_3_8br   r    r#   r£   N)r$   r%   r&   r   r#   r   r'   r  r   r   r   r  r    s!   … Ù).Ð7IÐQWÔ)X€Eˆ7Ð%Ñ&ÓXØÔr   r  c                   óF   — e Zd ZU  edd¬«      Zed   ed<   dZedz  ed<   y)Ú#AzureContentSafetyInputFilterConfigÚazure_content_safetyr   r    r#   Nr£   )	r$   r%   r&   r   r#   r   r'   r£   r  r   r   r   r  r    s+   … Ù-2Ð;QÐY_Ô-`€Eˆ7Ð)Ñ*Ó`Ø-1€FÐ# dÑ*Ô1r   r  c                   óF   — e Zd ZU  edd¬«      Zed   ed<   dZedz  ed<   y)Ú$AzureContentSafetyOutputFilterConfigr  r   r    r#   Nr£   )	r$   r%   r&   r   r#   r   r'   r£   r  r   r   r   r  r  !  s+   … Ù-2Ð;QÐY_Ô-`€Eˆ7Ð)Ñ*Ó`Ø.2€FÐ$ tÑ+Ô2r   r  c                   ó8   — e Zd ZU dZ eddd¬«      Zedz  ed<   y)ÚFilteringStreamOptionsz–
    overlap: Number of characters that should be additionally sent to content filtering services
    from previous chunks as additional context.
    r   i'  )r!   r‚   ÚleNÚoverlap)r$   r%   r&   r^   r   r#  r‰   r'   r   r   r   r!  r!  &  s    … ññ
  ¨¨a°EÔ:€GˆS�4‰ZÔ:r   r!  c                   ó:   — e Zd ZU dZ ed¬«      Zeeez     e	d<   y)ÚInputFilteringz–Module for managing and applying input content filters.

    Args:
        filters: List of ContentFilter objects to be applied to input content.
    r–   r—   r�   N)
r$   r%   r&   r^   r   r�   r   r  r  r'   r   r   r   r%  r%  /  s'   … ññ V[ÐfgÔUh€GˆTÐ5Ð8QÑQÑRÔhr   r%  c                   óN   — e Zd ZU dZ ed¬«      Zeeez     e	d<   dZ
edz  e	d<   y)ÚOutputFilteringzÔModule for managing and applying output content filters.

    Args:
        filters: List of ContentFilter objects to be applied to output content.

        stream_options: Module-specific streaming options.
    r–   r—   r�   NÚstream_options)r$   r%   r&   r^   r   r�   r   r  r  r'   r(  r!  r   r   r   r'  r'  9  s7   … ññ W\ÐghÔVi€GˆTÐ6Ð9RÑRÑSÓiØ48€NÐ*¨TÑ1Ô8r   r'  c                   óZ   — e Zd ZU dZdZedz  ed<   dZedz  ed<    e	d¬«      dd„«       Z
y)	ÚFilteringModuleConfigzëModule for managing and applying content filters.

    Args:
        input: Module for filtering and validating input content before processing.

        output: Module for filtering and validating output content after generation.
    Nr™   rš   r…   rH   c                 óL   — | j                   €| j                  €t        d«      ‚| S )zO
        Ensure at least one of input or output filtering is provided.
        z_For using SAP Filtering Module you must provide at least one property: input or output filters.©r™   rš   r   r‡   s    r   Úenforce_min_propertiesz,FilteringModuleConfig.enforce_min_propertiesR  s.   € ð
 �:‰:Ð $§+¡+Ð"5ÜØqóð ð ˆr   )r   r*  )r$   r%   r&   r^   r™   r%  r'   rš   r'  r	   r-  r   r   r   r*  r*  F  s>   … ñð $(€Eˆ>˜DÑ Ó'Ø%)€FˆO˜dÑ"Ó)á˜'Ô"òó #ñr   r*  c                   ó<   — e Zd ZU dZed   ed<   ee   ed<   eed<   y)Ú%SAPDocumentTranslationApplyToSelectora¯  
    This selector allows you to define the scope of translation, such as specific placeholders or
    messages with specific roles.
    For example, {"category": "placeholders",
                "items": ["user_input"],
                "source_language": "de-DE"}
                targets the value of "user_input" in placeholder_values specified in the request payload;
                and considers the value to be in German.
    )rž   Útemplate_rolesÚcategoryÚitemsÚsource_languageN)r$   r%   r&   r^   r   r'   r   r   r   r   r   r/  r/  ^  s%   … ñð Ð6Ñ7Ó7Ø�‰9ÓØÔr   r/  c                   óJ   — e Zd ZU dZdZedz  ed<   eed<   dZee	   dz  ed<   y)ÚInputTranslationConfiga7  
    Configuration for input translation.

    Args:
            source_language: Language of the text to be translated. Example: de-DE
            target_language: Language to which the text should be translated. Example: en-US
            apply_to: List of selectors that define the scope of translation.
    Nr3  Útarget_languageÚapply_to)
r$   r%   r&   r^   r3  r   r'   r7  r   r/  r   r   r   r5  r5  n  s2   … ñð #'€O�S˜4‘ZÓ&ØÓØCG€HˆdÐ8Ñ9¸DÑ@ÔGr   r5  c                   ó2   — e Zd ZU dZedz  ed<   eez  ed<   y)ÚOutputTranslationConfigNr3  r6  )r$   r%   r&   r3  r   r'   r/  r   r   r   r9  r9  }  s   … Ø"&€O�S˜4‘ZÓ&ØÐ@Ñ@Ô@r   r9  c                   óT   — e Zd ZU dZ edd¬«      Zed   ed<   dZe	dz  ed<   e
ed<   y)	ÚSAPDocumentTranslationInputa*  
    Configuration for input translation

    Args:
        type: The type of translation module (e.g., 'sap_document_translation').

        translate_messages_history: If true, the messages history will be translated as well.

        config: Configuration object for the translation module.
    Úsap_document_translationr   r    r#   NÚtranslate_messages_historyr£   )r$   r%   r&   r^   r   r#   r   r'   r=  rM   r5  r   r   r   r;  r;  ‚  s7   … ñ	ñ 27Ð?YÐagÔ1h€Eˆ7Ð-Ñ.ÓhØ.2Ð  t¡Ó2Ø"Ô"r   r;  c                   ó@   — e Zd ZU dZ edd¬«      Zed   ed<   eed<   y)ÚSAPDocumentTranslationOutputzÍ
    Configuration for output translation

    Args:
         type: The type of translation module (e.g., 'sap_document_translation').

        config: Configuration object for the translation module.
    r<  r   r    r#   r£   N)	r$   r%   r&   r^   r   r#   r   r'   r9  r   r   r   r?  r?  “  s(   … ññ 27Ð?YÐagÔ1h€Eˆ7Ð-Ñ.ÓhØ#Ô#r   r?  c                   óZ   — e Zd ZU dZdZedz  ed<   dZedz  ed<    e	d¬«      dd„«       Z
y)	ÚTranslationModuleConfigz¢
    Configuration for translation module

    Args:
        input: Configuration for input translation

        output: Configuration for output translation
    Nr™   rš   r…   rH   c                 óL   — | j                   €| j                  €t        d«      ‚| S )NzETranslationModuleConfig requires at least one of 'input' or 'output'.r,  r‡   s    r   r-  z.TranslationModuleConfig.enforce_min_properties®  s&   € à�:‰:Ð $§+¡+Ð"5ÜÐdÓeÐeØˆr   )r   rA  )r$   r%   r&   r^   r™   r;  r'   rš   r?  r	   r-  r   r   r   rA  rA  ¡  s@   … ñð 15€EÐ&¨Ñ-Ó4Ø26€FÐ(¨4Ñ/Ó6á˜'Ô"òó #ñr   rA  c                   óh   — e Zd ZU eed<   dZedz  ed<   dZedz  ed<   dZ	e
dz  ed<   dZedz  ed<   y)ÚModuleConfigÚprompt_templatingNÚ	filteringÚmaskingÚ	groundingÚtranslation)r$   r%   r&   r±   r'   rF  r*  rG  ré   rH  r¡   rI  rA  r   r   r   rD  rD  µ  sH   … Ø3Ó3Ø.2€IÐ$ tÑ+Ó2Ø*.€GÐ  4Ñ'Ó.Ø.2€IÐ$ tÑ+Ó2Ø26€KÐ(¨4Ñ/Ô6r   rD  c                   óZ   — e Zd ZU dZeed<    edd¬«      Zedz  ed<   dZ	e
e   dz  ed<   y)ÚGlobalStreamOptionsFrß   Nr–   r�   Ú
chunk_sizeÚ
delimiters)r$   r%   r&   rß   rM   r'   r   rL  r‰   rM  r   r   r   r   r   rK  rK  ½  s4   … Ø€GˆTÓÙ"¨4°AÔ6€J��d‘
Ó6Ø#'€J��S‘	˜DÑ Ô'r   rK  c                   ó8   — e Zd ZU eee   z  ed<   dZedz  ed<   y)ÚOrchestrationConfigÚmodulesNÚstream)r$   r%   r&   rD  r   r'   rQ  rK  r   r   r   rO  rO  Ã  s"   … Ø˜D Ñ.Ñ.Ó.Ø)-€FÐ $Ñ&Ô-r   rO  c                   ó6   — e Zd ZU eed<   dZeeef   dz  ed<   y)ÚOrchestrationRequestr£   NÚplaceholder_values)r$   r%   r&   rO  r'   rT  r   r   r   r   r   rS  rS  È  s    … ØÓØ04Ð˜˜S #˜X™¨Ñ-Ô4r   rS  )Grï   Úenumr   Útypingr   r   Úpydanticr   r   r   r	   r   r   r   r   r   r)   r.   r1   r5   rR   rV   rY   ra   rd   ri   rª   rm   rp   ru   rx   r|   r€   r‹   r•   rœ   r¡   r¥   r¬   r±   rµ   rÑ   rÕ   rØ   rÜ   rÞ   rá   ré   r‰   rö   rÿ   r  r  r  r  r  r  r!  r%  r'  r*  r/  r5  r9  r;  r?  rA  rD  rK  rO  rS  r   r   r   ú<module>rX     sò  ðÛ Ý ß !ç GÓ Gð1 #¨¡*¨tÑ"3ð 1¸ó 1ô&�)ô ô
�iô ô
�9ô ô
�)ô ô
�9ô ô.,˜ô ,ô�iô ô_�ô _ôQ�Yô Qô
_˜)ô _ô_˜ô _ð ˜>Ñ)Ð,?Ñ?ÐBTÑT€ôP�Yô Pô˜ô ô$˜yô $ô
�yô ô
BÐ(8ô Bô˜Iô ô9˜iô 9ô Iô ô
-˜iô -ô$˜Iô $ô
2ˆyô 2ô�iô ô 9ô ô
T$˜c 4ô T$ôn˜	ô ô;˜iô ;ô,�iô ,ôT˜	ô Tô˜ô ô;˜Iô ;ô2"˜)ô "ôJ�S˜$ô ô0B˜ô Bô0'Ð0ô 'ô&1Ð1ô 1ô*08˜)ô 08ôf  	ô  ô
2¨)ô 2ô
3¨9ô 3ô
;˜Yô ;ôi�Yô iô
9�iô 
9ô˜Iô ô0¨Iô ô H˜Yô HôA˜iô Aô
# )ô #ô"$ 9ô $ô˜iô ô(7�9ô 7ô(˜)ô (ô.˜)ô .ô
5˜9õ 5r   